From 3a6ab2f54573536c329755a027c0d8170577872b Mon Sep 17 00:00:00 2001 From: markiantorno Date: Mon, 3 Feb 2020 11:44:07 -0500 Subject: [PATCH 01/12] Specimen convertor written differently than other convertors, making difficult to parse. --- org.hl7.fhir.convertors/pom.xml | 7 +++++++ .../org/hl7/fhir/convertors/conv10_30/Specimen10_30.java | 5 ++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/org.hl7.fhir.convertors/pom.xml b/org.hl7.fhir.convertors/pom.xml index c31501189..0dbc844b6 100644 --- a/org.hl7.fhir.convertors/pom.xml +++ b/org.hl7.fhir.convertors/pom.xml @@ -59,6 +59,13 @@ true + + + com.github.javaparser + javaparser-symbol-solver-core + 3.15.9 + + diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Specimen10_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Specimen10_30.java index e87fb0d9b..98bac12fe 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Specimen10_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Specimen10_30.java @@ -1,12 +1,11 @@ package org.hl7.fhir.convertors.conv10_30; import org.hl7.fhir.convertors.VersionConvertor_10_30; -import org.hl7.fhir.dstu3.model.Specimen; import org.hl7.fhir.exceptions.FHIRException; public class Specimen10_30 { - static public org.hl7.fhir.dstu2.model.Specimen convertSpecimen(Specimen src) { + static public org.hl7.fhir.dstu2.model.Specimen convertSpecimen(org.hl7.fhir.dstu3.model.Specimen src) { if (src == null) { return null; } @@ -93,7 +92,7 @@ public class Specimen10_30 { return tgt; } - static public org.hl7.fhir.dstu2.model.Specimen.SpecimenStatus convertSpecimenStatus(Specimen.SpecimenStatus status) { + static public org.hl7.fhir.dstu2.model.Specimen.SpecimenStatus convertSpecimenStatus(org.hl7.fhir.dstu3.model.Specimen.SpecimenStatus status) { if (status == null) { return null; } From 147164d66db9ee4b3fe853872aea1e61e954e251 Mon Sep 17 00:00:00 2001 From: markiantorno Date: Wed, 5 Feb 2020 13:28:43 -0500 Subject: [PATCH 02/12] Changing filenames to reflect version --- .../convertors/SpecDifferenceEvaluator.java | 6 +- .../fhir/convertors/TerminologyClientR4.java | 3 +- .../convertors/VersionConvertor_40_50.java | 512 +++-- .../{Account.java => Account40_50.java} | 2 +- ...tion.java => ActivityDefinition40_50.java} | 6 +- ...ance.java => AllergyIntolerance40_50.java} | 2 +- ...Appointment.java => Appointment40_50.java} | 2 +- ...nse.java => AppointmentResponse40_50.java} | 2 +- .../{AuditEvent.java => AuditEvent40_50.java} | 2 +- .../conv40_50/{Basic.java => Basic40_50.java} | 2 +- .../{Binary.java => Binary40_50.java} | 2 +- ...a => BiologicallyDerivedProduct40_50.java} | 2 +- ...Structure.java => BodyStructure40_50.java} | 2 +- .../{Bundle.java => Bundle40_50.java} | 2 +- ...ent.java => CapabilityStatement40_50.java} | 15 +- .../{CarePlan.java => CarePlan40_50.java} | 2 +- .../{CareTeam.java => CareTeam40_50.java} | 2 +- .../{ChargeItem.java => ChargeItem40_50.java} | 2 +- ...on.java => ChargeItemDefinition40_50.java} | 6 +- .../conv40_50/{Claim.java => Claim40_50.java} | 2 +- ...mResponse.java => ClaimResponse40_50.java} | 6 +- ...sion.java => ClinicalImpression40_50.java} | 2 +- .../{CodeSystem.java => CodeSystem40_50.java} | 6 +- ...unication.java => Communication40_50.java} | 2 +- ...st.java => CommunicationRequest40_50.java} | 2 +- ...n.java => CompartmentDefinition40_50.java} | 6 +- ...Composition.java => Composition40_50.java} | 2 +- .../{ConceptMap.java => ConceptMap40_50.java} | 10 +- .../{Condition.java => Condition40_50.java} | 2 +- .../{Consent.java => Consent40_50.java} | 2 +- .../{Contract.java => Contract40_50.java} | 2 +- .../{Coverage.java => Coverage40_50.java} | 2 +- ...a => CoverageEligibilityRequest40_50.java} | 2 +- ... => CoverageEligibilityResponse40_50.java} | 2 +- ...ctedIssue.java => DetectedIssue40_50.java} | 2 +- .../{Device.java => Device40_50.java} | 2 +- ...nition.java => DeviceDefinition40_50.java} | 2 +- ...viceMetric.java => DeviceMetric40_50.java} | 2 +- ...ceRequest.java => DeviceRequest40_50.java} | 2 +- ...ment.java => DeviceUseStatement40_50.java} | 2 +- ...Report.java => DiagnosticReport40_50.java} | 2 +- ...nifest.java => DocumentManifest40_50.java} | 6 +- ...rence.java => DocumentReference40_50.java} | 6 +- .../{Encounter.java => Encounter40_50.java} | 2 +- .../{Endpoint.java => Endpoint40_50.java} | 2 +- ...quest.java => EnrollmentRequest40_50.java} | 2 +- ...onse.java => EnrollmentResponse40_50.java} | 2 +- ...umerations.java => Enumerations40_50.java} | 2 +- ...odeOfCare.java => EpisodeOfCare40_50.java} | 2 +- ...inition.java => EventDefinition40_50.java} | 6 +- ...cenario.java => ExampleScenario40_50.java} | 6 +- ...it.java => ExplanationOfBenefit40_50.java} | 6 +- ...ory.java => FamilyMemberHistory40_50.java} | 2 +- .../conv40_50/{Flag.java => Flag40_50.java} | 2 +- .../conv40_50/{Goal.java => Goal40_50.java} | 2 +- ...inition.java => GraphDefinition40_50.java} | 9 +- .../conv40_50/{Group.java => Group40_50.java} | 2 +- ...sponse.java => GuidanceResponse40_50.java} | 2 +- ...rvice.java => HealthcareService40_50.java} | 2 +- ...agingStudy.java => ImagingStudy40_50.java} | 2 +- ...munization.java => Immunization40_50.java} | 2 +- ....java => ImmunizationEvaluation40_50.java} | 2 +- ...a => ImmunizationRecommendation40_50.java} | 2 +- ...ide.java => ImplementationGuide40_50.java} | 14 +- ...rancePlan.java => InsurancePlan40_50.java} | 6 +- .../{Invoice.java => Invoice40_50.java} | 2 +- .../{Library.java => Library40_50.java} | 6 +- .../{Linkage.java => Linkage40_50.java} | 2 +- ...stResource.java => ListResource40_50.java} | 2 +- .../{Location.java => Location40_50.java} | 2 +- .../{Measure.java => Measure40_50.java} | 6 +- ...ureReport.java => MeasureReport40_50.java} | 2 +- .../conv40_50/{Media.java => Media40_50.java} | 2 +- .../{Medication.java => Medication40_50.java} | 2 +- ...ava => MedicationAdministration40_50.java} | 2 +- ...ense.java => MedicationDispense40_50.java} | 2 +- ...dge.java => MedicationKnowledge40_50.java} | 2 +- ...quest.java => MedicationRequest40_50.java} | 2 +- ...ent.java => MedicationStatement40_50.java} | 2 +- ...ition.java => MessageDefinition40_50.java} | 6 +- ...ageHeader.java => MessageHeader40_50.java} | 2 +- ...uence.java => MolecularSequence40_50.java} | 2 +- ...mingSystem.java => NamingSystem40_50.java} | 6 +- ...ionOrder.java => NutritionOrder40_50.java} | 2 +- ...Observation.java => Observation40_50.java} | 2 +- ...n.java => ObservationDefinition40_50.java} | 6 +- ...ion.java => OperationDefinition40_50.java} | 20 +- ...utcome.java => OperationOutcome40_50.java} | 2 +- ...ganization.java => Organization40_50.java} | 2 +- ...java => OrganizationAffiliation40_50.java} | 2 +- .../{Parameters.java => Parameters40_50.java} | 2 +- .../{Patient.java => Patient40_50.java} | 10 +- ...entNotice.java => PaymentNotice40_50.java} | 2 +- ...n.java => PaymentReconciliation40_50.java} | 6 +- .../{Person.java => Person40_50.java} | 6 +- ...finition.java => PlanDefinition40_50.java} | 6 +- ...actitioner.java => Practitioner40_50.java} | 6 +- ...erRole.java => PractitionerRole40_50.java} | 2 +- .../{Procedure.java => Procedure40_50.java} | 2 +- .../{Provenance.java => Provenance40_50.java} | 2 +- ...tionnaire.java => Questionnaire40_50.java} | 8 +- ...e.java => QuestionnaireResponse40_50.java} | 2 +- ...tedPerson.java => RelatedPerson40_50.java} | 6 +- ...questGroup.java => RequestGroup40_50.java} | 2 +- ...archStudy.java => ResearchStudy40_50.java} | 2 +- ...Subject.java => ResearchSubject40_50.java} | 2 +- ...sessment.java => RiskAssessment40_50.java} | 2 +- .../{Schedule.java => Schedule40_50.java} | 2 +- ...rameter.java => SearchParameter40_50.java} | 13 +- ...eRequest.java => ServiceRequest40_50.java} | 2 +- .../conv40_50/{Slot.java => Slot40_50.java} | 2 +- .../{Specimen.java => Specimen40_50.java} | 2 +- ...tion.java => SpecimenDefinition40_50.java} | 2 +- ...ion.java => StructureDefinition40_50.java} | 10 +- ...ructureMap.java => StructureMap40_50.java} | 6 +- .../{Substance.java => Substance40_50.java} | 2 +- ...id.java => SubstanceNucleicAcid40_50.java} | 2 +- ...olymer.java => SubstancePolymer40_50.java} | 2 +- ...rotein.java => SubstanceProtein40_50.java} | 2 +- ...> SubstanceReferenceInformation40_50.java} | 2 +- ...java => SubstanceSourceMaterial40_50.java} | 2 +- ...Delivery.java => SupplyDelivery40_50.java} | 2 +- ...lyRequest.java => SupplyRequest40_50.java} | 2 +- .../conv40_50/{Task.java => Task40_50.java} | 2 +- ...java => TerminologyCapabilities40_50.java} | 6 +- .../{TestReport.java => TestReport40_50.java} | 2 +- .../{TestScript.java => TestScript40_50.java} | 6 +- .../{ValueSet.java => ValueSet40_50.java} | 6 +- ...sult.java => VerificationResult40_50.java} | 2 +- ...tion.java => VisionPrescription40_50.java} | 2 +- .../hl7/fhir/convertors/parser/Parser.java | 1743 +++++++++++++++++ .../fhir/convertors/parser/ParserTest.java | 12 + 132 files changed, 2230 insertions(+), 491 deletions(-) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{Account.java => Account40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{ActivityDefinition.java => ActivityDefinition40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{AllergyIntolerance.java => AllergyIntolerance40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{Appointment.java => Appointment40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{AppointmentResponse.java => AppointmentResponse40_50.java} (98%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{AuditEvent.java => AuditEvent40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{Basic.java => Basic40_50.java} (98%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{Binary.java => Binary40_50.java} (98%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{BiologicallyDerivedProduct.java => BiologicallyDerivedProduct40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{BodyStructure.java => BodyStructure40_50.java} (98%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{Bundle.java => Bundle40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{CapabilityStatement.java => CapabilityStatement40_50.java} (98%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{CarePlan.java => CarePlan40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{CareTeam.java => CareTeam40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{ChargeItem.java => ChargeItem40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{ChargeItemDefinition.java => ChargeItemDefinition40_50.java} (98%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{Claim.java => Claim40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{ClaimResponse.java => ClaimResponse40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{ClinicalImpression.java => ClinicalImpression40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{CodeSystem.java => CodeSystem40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{Communication.java => Communication40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{CommunicationRequest.java => CommunicationRequest40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{CompartmentDefinition.java => CompartmentDefinition40_50.java} (97%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{Composition.java => Composition40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{ConceptMap.java => ConceptMap40_50.java} (97%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{Condition.java => Condition40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{Consent.java => Consent40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{Contract.java => Contract40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{Coverage.java => Coverage40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{CoverageEligibilityRequest.java => CoverageEligibilityRequest40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{CoverageEligibilityResponse.java => CoverageEligibilityResponse40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{DetectedIssue.java => DetectedIssue40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{Device.java => Device40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{DeviceDefinition.java => DeviceDefinition40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{DeviceMetric.java => DeviceMetric40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{DeviceRequest.java => DeviceRequest40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{DeviceUseStatement.java => DeviceUseStatement40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{DiagnosticReport.java => DiagnosticReport40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{DocumentManifest.java => DocumentManifest40_50.java} (96%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{DocumentReference.java => DocumentReference40_50.java} (98%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{Encounter.java => Encounter40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{Endpoint.java => Endpoint40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{EnrollmentRequest.java => EnrollmentRequest40_50.java} (98%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{EnrollmentResponse.java => EnrollmentResponse40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{Enumerations.java => Enumerations40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{EpisodeOfCare.java => EpisodeOfCare40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{EventDefinition.java => EventDefinition40_50.java} (97%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{ExampleScenario.java => ExampleScenario40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{ExplanationOfBenefit.java => ExplanationOfBenefit40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{FamilyMemberHistory.java => FamilyMemberHistory40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{Flag.java => Flag40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{Goal.java => Goal40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{GraphDefinition.java => GraphDefinition40_50.java} (98%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{Group.java => Group40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{GuidanceResponse.java => GuidanceResponse40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{HealthcareService.java => HealthcareService40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{ImagingStudy.java => ImagingStudy40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{Immunization.java => Immunization40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{ImmunizationEvaluation.java => ImmunizationEvaluation40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{ImmunizationRecommendation.java => ImmunizationRecommendation40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{ImplementationGuide.java => ImplementationGuide40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{InsurancePlan.java => InsurancePlan40_50.java} (98%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{Invoice.java => Invoice40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{Library.java => Library40_50.java} (97%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{Linkage.java => Linkage40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{ListResource.java => ListResource40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{Location.java => Location40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{Measure.java => Measure40_50.java} (98%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{MeasureReport.java => MeasureReport40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{Media.java => Media40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{Medication.java => Medication40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{MedicationAdministration.java => MedicationAdministration40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{MedicationDispense.java => MedicationDispense40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{MedicationKnowledge.java => MedicationKnowledge40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{MedicationRequest.java => MedicationRequest40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{MedicationStatement.java => MedicationStatement40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{MessageDefinition.java => MessageDefinition40_50.java} (98%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{MessageHeader.java => MessageHeader40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{MolecularSequence.java => MolecularSequence40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{NamingSystem.java => NamingSystem40_50.java} (97%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{NutritionOrder.java => NutritionOrder40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{Observation.java => Observation40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{ObservationDefinition.java => ObservationDefinition40_50.java} (98%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{OperationDefinition.java => OperationDefinition40_50.java} (96%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{OperationOutcome.java => OperationOutcome40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{Organization.java => Organization40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{OrganizationAffiliation.java => OrganizationAffiliation40_50.java} (98%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{Parameters.java => Parameters40_50.java} (98%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{Patient.java => Patient40_50.java} (96%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{PaymentNotice.java => PaymentNotice40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{PaymentReconciliation.java => PaymentReconciliation40_50.java} (98%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{Person.java => Person40_50.java} (97%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{PlanDefinition.java => PlanDefinition40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{Practitioner.java => Practitioner40_50.java} (96%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{PractitionerRole.java => PractitionerRole40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{Procedure.java => Procedure40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{Provenance.java => Provenance40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{Questionnaire.java => Questionnaire40_50.java} (98%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{QuestionnaireResponse.java => QuestionnaireResponse40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{RelatedPerson.java => RelatedPerson40_50.java} (96%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{RequestGroup.java => RequestGroup40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{ResearchStudy.java => ResearchStudy40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{ResearchSubject.java => ResearchSubject40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{RiskAssessment.java => RiskAssessment40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{Schedule.java => Schedule40_50.java} (98%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{SearchParameter.java => SearchParameter40_50.java} (97%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{ServiceRequest.java => ServiceRequest40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{Slot.java => Slot40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{Specimen.java => Specimen40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{SpecimenDefinition.java => SpecimenDefinition40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{StructureDefinition.java => StructureDefinition40_50.java} (97%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{StructureMap.java => StructureMap40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{Substance.java => Substance40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{SubstanceNucleicAcid.java => SubstanceNucleicAcid40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{SubstancePolymer.java => SubstancePolymer40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{SubstanceProtein.java => SubstanceProtein40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{SubstanceReferenceInformation.java => SubstanceReferenceInformation40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{SubstanceSourceMaterial.java => SubstanceSourceMaterial40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{SupplyDelivery.java => SupplyDelivery40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{SupplyRequest.java => SupplyRequest40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{Task.java => Task40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{TerminologyCapabilities.java => TerminologyCapabilities40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{TestReport.java => TestReport40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{TestScript.java => TestScript40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{ValueSet.java => ValueSet40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{VerificationResult.java => VerificationResult40_50.java} (99%) rename org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/{VisionPrescription.java => VisionPrescription40_50.java} (99%) create mode 100644 org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/parser/Parser.java create mode 100644 org.hl7.fhir.convertors/src/test/java/org/hl7/fhir/convertors/parser/ParserTest.java diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/SpecDifferenceEvaluator.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/SpecDifferenceEvaluator.java index 25d2d1a4c..201870595 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/SpecDifferenceEvaluator.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/SpecDifferenceEvaluator.java @@ -32,6 +32,8 @@ import java.util.List; import java.util.Map; import java.util.Set; +import org.hl7.fhir.convertors.conv40_50.StructureDefinition40_50; +import org.hl7.fhir.convertors.conv40_50.ValueSet40_50; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.exceptions.FHIRFormatError; import org.hl7.fhir.r5.elementmodel.Manager.FhirFormat; @@ -164,7 +166,7 @@ public class SpecDifferenceEvaluator { for (org.hl7.fhir.r4.model.Bundle.BundleEntryComponent be : bundle.getEntry()) { if (be.getResource() instanceof org.hl7.fhir.r4.model.StructureDefinition) { org.hl7.fhir.r4.model.StructureDefinition sd = (org.hl7.fhir.r4.model.StructureDefinition) be.getResource(); - map.put(sd.getName(), org.hl7.fhir.convertors.conv40_50.StructureDefinition.convertStructureDefinition(sd)); + map.put(sd.getName(), StructureDefinition40_50.convertStructureDefinition(sd)); } } @@ -184,7 +186,7 @@ public class SpecDifferenceEvaluator { for (org.hl7.fhir.r4.model.Bundle.BundleEntryComponent be : bundle.getEntry()) { if (be.getResource() instanceof org.hl7.fhir.r4.model.ValueSet) { org.hl7.fhir.r4.model.ValueSet sd = (org.hl7.fhir.r4.model.ValueSet) be.getResource(); - map.put(sd.getName(), org.hl7.fhir.convertors.conv40_50.ValueSet.convertValueSet(sd)); + map.put(sd.getName(), ValueSet40_50.convertValueSet(sd)); } } } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/TerminologyClientR4.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/TerminologyClientR4.java index 726903fe4..9e96bc6ea 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/TerminologyClientR4.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/TerminologyClientR4.java @@ -24,6 +24,7 @@ package org.hl7.fhir.convertors; import java.net.URISyntaxException; import java.util.Map; +import org.hl7.fhir.convertors.conv40_50.TerminologyCapabilities40_50; import org.hl7.fhir.r4.utils.client.FHIRToolingClient; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r5.utils.client.ToolingClientLogger; @@ -43,7 +44,7 @@ public class TerminologyClientR4 implements TerminologyClient { @Override public TerminologyCapabilities getTerminologyCapabilities() throws FHIRException { - return (TerminologyCapabilities) org.hl7.fhir.convertors.conv40_50.TerminologyCapabilities.convertTerminologyCapabilities(client.getTerminologyCapabilities()); + return (TerminologyCapabilities) TerminologyCapabilities40_50.convertTerminologyCapabilities(client.getTerminologyCapabilities()); } @Override diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/VersionConvertor_40_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/VersionConvertor_40_50.java index f759a07b7..af6f3b243 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/VersionConvertor_40_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/VersionConvertor_40_50.java @@ -28,11 +28,7 @@ package org.hl7.fhir.convertors; */ import org.hl7.fhir.convertors.conv40_50.*; import org.hl7.fhir.exceptions.FHIRException; -import org.hl7.fhir.r4.model.CodeType; import org.hl7.fhir.r5.model.CodeableReference; -import org.hl7.fhir.r5.model.Enumeration; -import org.hl7.fhir.r5.model.Enumerations.ResourceTypeEnum; -import org.hl7.fhir.r5.model.Enumerations.ResourceTypeEnumEnumFactory; /* @@ -2853,7 +2849,7 @@ public class VersionConvertor_40_50 { org.hl7.fhir.r5.model.ElementDefinition.ElementDefinitionBindingComponent tgt = new org.hl7.fhir.r5.model.ElementDefinition.ElementDefinitionBindingComponent(); copyElement(src, tgt); if (src.hasStrength()) - tgt.setStrength(Enumerations.convertBindingStrength(src.getStrength())); + tgt.setStrength(Enumerations40_50.convertBindingStrength(src.getStrength())); if (src.hasDescription()) tgt.setDescriptionElement(convertString(src.getDescriptionElement())); if (src.hasValueSet()) @@ -2867,7 +2863,7 @@ public class VersionConvertor_40_50 { org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionBindingComponent tgt = new org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionBindingComponent(); copyElement(src, tgt); if (src.hasStrength()) - tgt.setStrength(Enumerations.convertBindingStrength(src.getStrength())); + tgt.setStrength(Enumerations40_50.convertBindingStrength(src.getStrength())); if (src.hasDescription()) tgt.setDescriptionElement(convertString(src.getDescriptionElement())); if (src.hasValueSet()) @@ -3278,263 +3274,263 @@ public class VersionConvertor_40_50 { if (src == null) return null; if (src instanceof org.hl7.fhir.r4.model.Parameters) - return Parameters.convertParameters((org.hl7.fhir.r4.model.Parameters) src); + return Parameters40_50.convertParameters((org.hl7.fhir.r4.model.Parameters) src); if (src instanceof org.hl7.fhir.r4.model.Account) - return Account.convertAccount((org.hl7.fhir.r4.model.Account) src); + return Account40_50.convertAccount((org.hl7.fhir.r4.model.Account) src); if (src instanceof org.hl7.fhir.r4.model.ActivityDefinition) - return ActivityDefinition.convertActivityDefinition((org.hl7.fhir.r4.model.ActivityDefinition) src); + return ActivityDefinition40_50.convertActivityDefinition((org.hl7.fhir.r4.model.ActivityDefinition) src); // if (src instanceof org.hl7.fhir.r4.model.AdverseEvent) // return AdverseEvent.convertAdverseEvent((org.hl7.fhir.r4.model.AdverseEvent) src); if (src instanceof org.hl7.fhir.r4.model.AllergyIntolerance) - return AllergyIntolerance.convertAllergyIntolerance((org.hl7.fhir.r4.model.AllergyIntolerance) src); + return AllergyIntolerance40_50.convertAllergyIntolerance((org.hl7.fhir.r4.model.AllergyIntolerance) src); if (src instanceof org.hl7.fhir.r4.model.Appointment) - return Appointment.convertAppointment((org.hl7.fhir.r4.model.Appointment) src); + return Appointment40_50.convertAppointment((org.hl7.fhir.r4.model.Appointment) src); if (src instanceof org.hl7.fhir.r4.model.AppointmentResponse) - return AppointmentResponse.convertAppointmentResponse((org.hl7.fhir.r4.model.AppointmentResponse) src); + return AppointmentResponse40_50.convertAppointmentResponse((org.hl7.fhir.r4.model.AppointmentResponse) src); if (src instanceof org.hl7.fhir.r4.model.AuditEvent) - return AuditEvent.convertAuditEvent((org.hl7.fhir.r4.model.AuditEvent) src); + return AuditEvent40_50.convertAuditEvent((org.hl7.fhir.r4.model.AuditEvent) src); if (src instanceof org.hl7.fhir.r4.model.Basic) - return Basic.convertBasic((org.hl7.fhir.r4.model.Basic) src); + return Basic40_50.convertBasic((org.hl7.fhir.r4.model.Basic) src); if (src instanceof org.hl7.fhir.r4.model.Binary) - return Binary.convertBinary((org.hl7.fhir.r4.model.Binary) src); + return Binary40_50.convertBinary((org.hl7.fhir.r4.model.Binary) src); if (src instanceof org.hl7.fhir.r4.model.BiologicallyDerivedProduct) - return BiologicallyDerivedProduct.convertBiologicallyDerivedProduct((org.hl7.fhir.r4.model.BiologicallyDerivedProduct) src); + return BiologicallyDerivedProduct40_50.convertBiologicallyDerivedProduct((org.hl7.fhir.r4.model.BiologicallyDerivedProduct) src); if (src instanceof org.hl7.fhir.r4.model.BodyStructure) - return BodyStructure.convertBodyStructure((org.hl7.fhir.r4.model.BodyStructure) src); + return BodyStructure40_50.convertBodyStructure((org.hl7.fhir.r4.model.BodyStructure) src); if (src instanceof org.hl7.fhir.r4.model.Bundle) - return Bundle.convertBundle((org.hl7.fhir.r4.model.Bundle) src); + return Bundle40_50.convertBundle((org.hl7.fhir.r4.model.Bundle) src); if (src instanceof org.hl7.fhir.r4.model.CapabilityStatement) - return CapabilityStatement.convertCapabilityStatement((org.hl7.fhir.r4.model.CapabilityStatement) src); + return CapabilityStatement40_50.convertCapabilityStatement((org.hl7.fhir.r4.model.CapabilityStatement) src); if (src instanceof org.hl7.fhir.r4.model.CarePlan) - return CarePlan.convertCarePlan((org.hl7.fhir.r4.model.CarePlan) src); + return CarePlan40_50.convertCarePlan((org.hl7.fhir.r4.model.CarePlan) src); if (src instanceof org.hl7.fhir.r4.model.CareTeam) - return CareTeam.convertCareTeam((org.hl7.fhir.r4.model.CareTeam) src); + return CareTeam40_50.convertCareTeam((org.hl7.fhir.r4.model.CareTeam) src); // if (src instanceof org.hl7.fhir.r4.model.CatalogEntry) // return CatalogEntry.convertCatalogEntry((org.hl7.fhir.r4.model.CatalogEntry) src); if (src instanceof org.hl7.fhir.r4.model.ChargeItem) - return ChargeItem.convertChargeItem((org.hl7.fhir.r4.model.ChargeItem) src); + return ChargeItem40_50.convertChargeItem((org.hl7.fhir.r4.model.ChargeItem) src); if (src instanceof org.hl7.fhir.r4.model.ChargeItemDefinition) - return ChargeItemDefinition.convertChargeItemDefinition((org.hl7.fhir.r4.model.ChargeItemDefinition) src); + return ChargeItemDefinition40_50.convertChargeItemDefinition((org.hl7.fhir.r4.model.ChargeItemDefinition) src); if (src instanceof org.hl7.fhir.r4.model.Claim) - return Claim.convertClaim((org.hl7.fhir.r4.model.Claim) src); + return Claim40_50.convertClaim((org.hl7.fhir.r4.model.Claim) src); if (src instanceof org.hl7.fhir.r4.model.ClaimResponse) - return ClaimResponse.convertClaimResponse((org.hl7.fhir.r4.model.ClaimResponse) src); + return ClaimResponse40_50.convertClaimResponse((org.hl7.fhir.r4.model.ClaimResponse) src); if (src instanceof org.hl7.fhir.r4.model.ClinicalImpression) - return ClinicalImpression.convertClinicalImpression((org.hl7.fhir.r4.model.ClinicalImpression) src); + return ClinicalImpression40_50.convertClinicalImpression((org.hl7.fhir.r4.model.ClinicalImpression) src); if (src instanceof org.hl7.fhir.r4.model.CodeSystem) - return CodeSystem.convertCodeSystem((org.hl7.fhir.r4.model.CodeSystem) src); + return CodeSystem40_50.convertCodeSystem((org.hl7.fhir.r4.model.CodeSystem) src); if (src instanceof org.hl7.fhir.r4.model.Communication) - return Communication.convertCommunication((org.hl7.fhir.r4.model.Communication) src); + return Communication40_50.convertCommunication((org.hl7.fhir.r4.model.Communication) src); if (src instanceof org.hl7.fhir.r4.model.CommunicationRequest) - return CommunicationRequest.convertCommunicationRequest((org.hl7.fhir.r4.model.CommunicationRequest) src); + return CommunicationRequest40_50.convertCommunicationRequest((org.hl7.fhir.r4.model.CommunicationRequest) src); if (src instanceof org.hl7.fhir.r4.model.CompartmentDefinition) - return CompartmentDefinition.convertCompartmentDefinition((org.hl7.fhir.r4.model.CompartmentDefinition) src); + return CompartmentDefinition40_50.convertCompartmentDefinition((org.hl7.fhir.r4.model.CompartmentDefinition) src); if (src instanceof org.hl7.fhir.r4.model.Composition) - return Composition.convertComposition((org.hl7.fhir.r4.model.Composition) src); + return Composition40_50.convertComposition((org.hl7.fhir.r4.model.Composition) src); if (src instanceof org.hl7.fhir.r4.model.ConceptMap) - return ConceptMap.convertConceptMap((org.hl7.fhir.r4.model.ConceptMap) src); + return ConceptMap40_50.convertConceptMap((org.hl7.fhir.r4.model.ConceptMap) src); if (src instanceof org.hl7.fhir.r4.model.Condition) - return Condition.convertCondition((org.hl7.fhir.r4.model.Condition) src); + return Condition40_50.convertCondition((org.hl7.fhir.r4.model.Condition) src); if (src instanceof org.hl7.fhir.r4.model.Consent) - return Consent.convertConsent((org.hl7.fhir.r4.model.Consent) src); + return Consent40_50.convertConsent((org.hl7.fhir.r4.model.Consent) src); if (src instanceof org.hl7.fhir.r4.model.Contract) - return Contract.convertContract((org.hl7.fhir.r4.model.Contract) src); + return Contract40_50.convertContract((org.hl7.fhir.r4.model.Contract) src); if (src instanceof org.hl7.fhir.r4.model.Coverage) - return Coverage.convertCoverage((org.hl7.fhir.r4.model.Coverage) src); + return Coverage40_50.convertCoverage((org.hl7.fhir.r4.model.Coverage) src); if (src instanceof org.hl7.fhir.r4.model.CoverageEligibilityRequest) - return CoverageEligibilityRequest.convertCoverageEligibilityRequest((org.hl7.fhir.r4.model.CoverageEligibilityRequest) src); + return CoverageEligibilityRequest40_50.convertCoverageEligibilityRequest((org.hl7.fhir.r4.model.CoverageEligibilityRequest) src); if (src instanceof org.hl7.fhir.r4.model.CoverageEligibilityResponse) - return CoverageEligibilityResponse.convertCoverageEligibilityResponse((org.hl7.fhir.r4.model.CoverageEligibilityResponse) src); + return CoverageEligibilityResponse40_50.convertCoverageEligibilityResponse((org.hl7.fhir.r4.model.CoverageEligibilityResponse) src); if (src instanceof org.hl7.fhir.r4.model.DetectedIssue) - return DetectedIssue.convertDetectedIssue((org.hl7.fhir.r4.model.DetectedIssue) src); + return DetectedIssue40_50.convertDetectedIssue((org.hl7.fhir.r4.model.DetectedIssue) src); if (src instanceof org.hl7.fhir.r4.model.Device) - return Device.convertDevice((org.hl7.fhir.r4.model.Device) src); + return Device40_50.convertDevice((org.hl7.fhir.r4.model.Device) src); if (src instanceof org.hl7.fhir.r4.model.DeviceDefinition) - return DeviceDefinition.convertDeviceDefinition((org.hl7.fhir.r4.model.DeviceDefinition) src); + return DeviceDefinition40_50.convertDeviceDefinition((org.hl7.fhir.r4.model.DeviceDefinition) src); if (src instanceof org.hl7.fhir.r4.model.DeviceMetric) - return DeviceMetric.convertDeviceMetric((org.hl7.fhir.r4.model.DeviceMetric) src); + return DeviceMetric40_50.convertDeviceMetric((org.hl7.fhir.r4.model.DeviceMetric) src); if (src instanceof org.hl7.fhir.r4.model.DeviceRequest) - return DeviceRequest.convertDeviceRequest((org.hl7.fhir.r4.model.DeviceRequest) src); + return DeviceRequest40_50.convertDeviceRequest((org.hl7.fhir.r4.model.DeviceRequest) src); if (src instanceof org.hl7.fhir.r4.model.DeviceUseStatement) - return DeviceUseStatement.convertDeviceUseStatement((org.hl7.fhir.r4.model.DeviceUseStatement) src); + return DeviceUseStatement40_50.convertDeviceUseStatement((org.hl7.fhir.r4.model.DeviceUseStatement) src); if (src instanceof org.hl7.fhir.r4.model.DiagnosticReport) - return DiagnosticReport.convertDiagnosticReport((org.hl7.fhir.r4.model.DiagnosticReport) src); + return DiagnosticReport40_50.convertDiagnosticReport((org.hl7.fhir.r4.model.DiagnosticReport) src); if (src instanceof org.hl7.fhir.r4.model.DocumentManifest) - return DocumentManifest.convertDocumentManifest((org.hl7.fhir.r4.model.DocumentManifest) src); + return DocumentManifest40_50.convertDocumentManifest((org.hl7.fhir.r4.model.DocumentManifest) src); if (src instanceof org.hl7.fhir.r4.model.DocumentReference) - return DocumentReference.convertDocumentReference((org.hl7.fhir.r4.model.DocumentReference) src); + return DocumentReference40_50.convertDocumentReference((org.hl7.fhir.r4.model.DocumentReference) src); if (src instanceof org.hl7.fhir.r4.model.Encounter) - return Encounter.convertEncounter((org.hl7.fhir.r4.model.Encounter) src); + return Encounter40_50.convertEncounter((org.hl7.fhir.r4.model.Encounter) src); if (src instanceof org.hl7.fhir.r4.model.Endpoint) - return Endpoint.convertEndpoint((org.hl7.fhir.r4.model.Endpoint) src); + return Endpoint40_50.convertEndpoint((org.hl7.fhir.r4.model.Endpoint) src); if (src instanceof org.hl7.fhir.r4.model.EnrollmentRequest) - return EnrollmentRequest.convertEnrollmentRequest((org.hl7.fhir.r4.model.EnrollmentRequest) src); + return EnrollmentRequest40_50.convertEnrollmentRequest((org.hl7.fhir.r4.model.EnrollmentRequest) src); if (src instanceof org.hl7.fhir.r4.model.EnrollmentResponse) - return EnrollmentResponse.convertEnrollmentResponse((org.hl7.fhir.r4.model.EnrollmentResponse) src); + return EnrollmentResponse40_50.convertEnrollmentResponse((org.hl7.fhir.r4.model.EnrollmentResponse) src); if (src instanceof org.hl7.fhir.r4.model.EpisodeOfCare) - return EpisodeOfCare.convertEpisodeOfCare((org.hl7.fhir.r4.model.EpisodeOfCare) src); + return EpisodeOfCare40_50.convertEpisodeOfCare((org.hl7.fhir.r4.model.EpisodeOfCare) src); if (src instanceof org.hl7.fhir.r4.model.EventDefinition) - return EventDefinition.convertEventDefinition((org.hl7.fhir.r4.model.EventDefinition) src); + return EventDefinition40_50.convertEventDefinition((org.hl7.fhir.r4.model.EventDefinition) src); if (src instanceof org.hl7.fhir.r4.model.ExampleScenario) - return ExampleScenario.convertExampleScenario((org.hl7.fhir.r4.model.ExampleScenario) src); + return ExampleScenario40_50.convertExampleScenario((org.hl7.fhir.r4.model.ExampleScenario) src); if (src instanceof org.hl7.fhir.r4.model.ExplanationOfBenefit) - return ExplanationOfBenefit.convertExplanationOfBenefit((org.hl7.fhir.r4.model.ExplanationOfBenefit) src); + return ExplanationOfBenefit40_50.convertExplanationOfBenefit((org.hl7.fhir.r4.model.ExplanationOfBenefit) src); if (src instanceof org.hl7.fhir.r4.model.FamilyMemberHistory) - return FamilyMemberHistory.convertFamilyMemberHistory((org.hl7.fhir.r4.model.FamilyMemberHistory) src); + return FamilyMemberHistory40_50.convertFamilyMemberHistory((org.hl7.fhir.r4.model.FamilyMemberHistory) src); if (src instanceof org.hl7.fhir.r4.model.Flag) - return Flag.convertFlag((org.hl7.fhir.r4.model.Flag) src); + return Flag40_50.convertFlag((org.hl7.fhir.r4.model.Flag) src); if (src instanceof org.hl7.fhir.r4.model.Goal) - return Goal.convertGoal((org.hl7.fhir.r4.model.Goal) src); + return Goal40_50.convertGoal((org.hl7.fhir.r4.model.Goal) src); if (src instanceof org.hl7.fhir.r4.model.GraphDefinition) - return GraphDefinition.convertGraphDefinition((org.hl7.fhir.r4.model.GraphDefinition) src); + return GraphDefinition40_50.convertGraphDefinition((org.hl7.fhir.r4.model.GraphDefinition) src); if (src instanceof org.hl7.fhir.r4.model.Group) - return Group.convertGroup((org.hl7.fhir.r4.model.Group) src); + return Group40_50.convertGroup((org.hl7.fhir.r4.model.Group) src); if (src instanceof org.hl7.fhir.r4.model.GuidanceResponse) - return GuidanceResponse.convertGuidanceResponse((org.hl7.fhir.r4.model.GuidanceResponse) src); + return GuidanceResponse40_50.convertGuidanceResponse((org.hl7.fhir.r4.model.GuidanceResponse) src); if (src instanceof org.hl7.fhir.r4.model.HealthcareService) - return HealthcareService.convertHealthcareService((org.hl7.fhir.r4.model.HealthcareService) src); + return HealthcareService40_50.convertHealthcareService((org.hl7.fhir.r4.model.HealthcareService) src); if (src instanceof org.hl7.fhir.r4.model.ImagingStudy) - return ImagingStudy.convertImagingStudy((org.hl7.fhir.r4.model.ImagingStudy) src); + return ImagingStudy40_50.convertImagingStudy((org.hl7.fhir.r4.model.ImagingStudy) src); if (src instanceof org.hl7.fhir.r4.model.Immunization) - return Immunization.convertImmunization((org.hl7.fhir.r4.model.Immunization) src); + return Immunization40_50.convertImmunization((org.hl7.fhir.r4.model.Immunization) src); if (src instanceof org.hl7.fhir.r4.model.ImmunizationEvaluation) - return ImmunizationEvaluation.convertImmunizationEvaluation((org.hl7.fhir.r4.model.ImmunizationEvaluation) src); + return ImmunizationEvaluation40_50.convertImmunizationEvaluation((org.hl7.fhir.r4.model.ImmunizationEvaluation) src); if (src instanceof org.hl7.fhir.r4.model.ImmunizationRecommendation) - return ImmunizationRecommendation.convertImmunizationRecommendation((org.hl7.fhir.r4.model.ImmunizationRecommendation) src); + return ImmunizationRecommendation40_50.convertImmunizationRecommendation((org.hl7.fhir.r4.model.ImmunizationRecommendation) src); if (src instanceof org.hl7.fhir.r4.model.ImplementationGuide) - return ImplementationGuide.convertImplementationGuide((org.hl7.fhir.r4.model.ImplementationGuide) src); + return ImplementationGuide40_50.convertImplementationGuide((org.hl7.fhir.r4.model.ImplementationGuide) src); if (src instanceof org.hl7.fhir.r4.model.InsurancePlan) - return InsurancePlan.convertInsurancePlan((org.hl7.fhir.r4.model.InsurancePlan) src); + return InsurancePlan40_50.convertInsurancePlan((org.hl7.fhir.r4.model.InsurancePlan) src); if (src instanceof org.hl7.fhir.r4.model.Invoice) - return Invoice.convertInvoice((org.hl7.fhir.r4.model.Invoice) src); + return Invoice40_50.convertInvoice((org.hl7.fhir.r4.model.Invoice) src); if (src instanceof org.hl7.fhir.r4.model.Library) - return Library.convertLibrary((org.hl7.fhir.r4.model.Library) src); + return Library40_50.convertLibrary((org.hl7.fhir.r4.model.Library) src); if (src instanceof org.hl7.fhir.r4.model.Linkage) - return Linkage.convertLinkage((org.hl7.fhir.r4.model.Linkage) src); + return Linkage40_50.convertLinkage((org.hl7.fhir.r4.model.Linkage) src); if (src instanceof org.hl7.fhir.r4.model.ListResource) - return ListResource.convertListResource((org.hl7.fhir.r4.model.ListResource) src); + return ListResource40_50.convertListResource((org.hl7.fhir.r4.model.ListResource) src); if (src instanceof org.hl7.fhir.r4.model.Location) - return Location.convertLocation((org.hl7.fhir.r4.model.Location) src); + return Location40_50.convertLocation((org.hl7.fhir.r4.model.Location) src); if (src instanceof org.hl7.fhir.r4.model.Measure) - return Measure.convertMeasure((org.hl7.fhir.r4.model.Measure) src); + return Measure40_50.convertMeasure((org.hl7.fhir.r4.model.Measure) src); if (src instanceof org.hl7.fhir.r4.model.MeasureReport) - return MeasureReport.convertMeasureReport((org.hl7.fhir.r4.model.MeasureReport) src); + return MeasureReport40_50.convertMeasureReport((org.hl7.fhir.r4.model.MeasureReport) src); if (src instanceof org.hl7.fhir.r4.model.Media) - return Media.convertMedia((org.hl7.fhir.r4.model.Media) src); + return Media40_50.convertMedia((org.hl7.fhir.r4.model.Media) src); if (src instanceof org.hl7.fhir.r4.model.Medication) - return Medication.convertMedication((org.hl7.fhir.r4.model.Medication) src); + return Medication40_50.convertMedication((org.hl7.fhir.r4.model.Medication) src); if (src instanceof org.hl7.fhir.r4.model.MedicationAdministration) - return MedicationAdministration.convertMedicationAdministration((org.hl7.fhir.r4.model.MedicationAdministration) src); + return MedicationAdministration40_50.convertMedicationAdministration((org.hl7.fhir.r4.model.MedicationAdministration) src); if (src instanceof org.hl7.fhir.r4.model.MedicationDispense) - return MedicationDispense.convertMedicationDispense((org.hl7.fhir.r4.model.MedicationDispense) src); + return MedicationDispense40_50.convertMedicationDispense((org.hl7.fhir.r4.model.MedicationDispense) src); if (src instanceof org.hl7.fhir.r4.model.MedicationKnowledge) - return MedicationKnowledge.convertMedicationKnowledge((org.hl7.fhir.r4.model.MedicationKnowledge) src); + return MedicationKnowledge40_50.convertMedicationKnowledge((org.hl7.fhir.r4.model.MedicationKnowledge) src); if (src instanceof org.hl7.fhir.r4.model.MedicationRequest) - return MedicationRequest.convertMedicationRequest((org.hl7.fhir.r4.model.MedicationRequest) src); + return MedicationRequest40_50.convertMedicationRequest((org.hl7.fhir.r4.model.MedicationRequest) src); if (src instanceof org.hl7.fhir.r4.model.MedicationStatement) - return MedicationStatement.convertMedicationStatement((org.hl7.fhir.r4.model.MedicationStatement) src); + return MedicationStatement40_50.convertMedicationStatement((org.hl7.fhir.r4.model.MedicationStatement) src); if (src instanceof org.hl7.fhir.r4.model.MessageDefinition) - return MessageDefinition.convertMessageDefinition((org.hl7.fhir.r4.model.MessageDefinition) src); + return MessageDefinition40_50.convertMessageDefinition((org.hl7.fhir.r4.model.MessageDefinition) src); if (src instanceof org.hl7.fhir.r4.model.MessageHeader) - return MessageHeader.convertMessageHeader((org.hl7.fhir.r4.model.MessageHeader) src); + return MessageHeader40_50.convertMessageHeader((org.hl7.fhir.r4.model.MessageHeader) src); if (src instanceof org.hl7.fhir.r4.model.MolecularSequence) - return MolecularSequence.convertMolecularSequence((org.hl7.fhir.r4.model.MolecularSequence) src); + return MolecularSequence40_50.convertMolecularSequence((org.hl7.fhir.r4.model.MolecularSequence) src); if (src instanceof org.hl7.fhir.r4.model.NamingSystem) - return NamingSystem.convertNamingSystem((org.hl7.fhir.r4.model.NamingSystem) src); + return NamingSystem40_50.convertNamingSystem((org.hl7.fhir.r4.model.NamingSystem) src); if (src instanceof org.hl7.fhir.r4.model.NutritionOrder) - return NutritionOrder.convertNutritionOrder((org.hl7.fhir.r4.model.NutritionOrder) src); + return NutritionOrder40_50.convertNutritionOrder((org.hl7.fhir.r4.model.NutritionOrder) src); if (src instanceof org.hl7.fhir.r4.model.Observation) - return Observation.convertObservation((org.hl7.fhir.r4.model.Observation) src); + return Observation40_50.convertObservation((org.hl7.fhir.r4.model.Observation) src); if (src instanceof org.hl7.fhir.r4.model.ObservationDefinition) - return ObservationDefinition.convertObservationDefinition((org.hl7.fhir.r4.model.ObservationDefinition) src); + return ObservationDefinition40_50.convertObservationDefinition((org.hl7.fhir.r4.model.ObservationDefinition) src); if (src instanceof org.hl7.fhir.r4.model.OperationDefinition) - return OperationDefinition.convertOperationDefinition((org.hl7.fhir.r4.model.OperationDefinition) src); + return OperationDefinition40_50.convertOperationDefinition((org.hl7.fhir.r4.model.OperationDefinition) src); if (src instanceof org.hl7.fhir.r4.model.OperationOutcome) - return OperationOutcome.convertOperationOutcome((org.hl7.fhir.r4.model.OperationOutcome) src); + return OperationOutcome40_50.convertOperationOutcome((org.hl7.fhir.r4.model.OperationOutcome) src); if (src instanceof org.hl7.fhir.r4.model.Organization) - return Organization.convertOrganization((org.hl7.fhir.r4.model.Organization) src); + return Organization40_50.convertOrganization((org.hl7.fhir.r4.model.Organization) src); if (src instanceof org.hl7.fhir.r4.model.OrganizationAffiliation) - return OrganizationAffiliation.convertOrganizationAffiliation((org.hl7.fhir.r4.model.OrganizationAffiliation) src); + return OrganizationAffiliation40_50.convertOrganizationAffiliation((org.hl7.fhir.r4.model.OrganizationAffiliation) src); if (src instanceof org.hl7.fhir.r4.model.Patient) - return Patient.convertPatient((org.hl7.fhir.r4.model.Patient) src); + return Patient40_50.convertPatient((org.hl7.fhir.r4.model.Patient) src); if (src instanceof org.hl7.fhir.r4.model.PaymentNotice) - return PaymentNotice.convertPaymentNotice((org.hl7.fhir.r4.model.PaymentNotice) src); + return PaymentNotice40_50.convertPaymentNotice((org.hl7.fhir.r4.model.PaymentNotice) src); if (src instanceof org.hl7.fhir.r4.model.PaymentReconciliation) - return PaymentReconciliation.convertPaymentReconciliation((org.hl7.fhir.r4.model.PaymentReconciliation) src); + return PaymentReconciliation40_50.convertPaymentReconciliation((org.hl7.fhir.r4.model.PaymentReconciliation) src); if (src instanceof org.hl7.fhir.r4.model.Person) - return Person.convertPerson((org.hl7.fhir.r4.model.Person) src); + return Person40_50.convertPerson((org.hl7.fhir.r4.model.Person) src); if (src instanceof org.hl7.fhir.r4.model.PlanDefinition) - return PlanDefinition.convertPlanDefinition((org.hl7.fhir.r4.model.PlanDefinition) src); + return PlanDefinition40_50.convertPlanDefinition((org.hl7.fhir.r4.model.PlanDefinition) src); if (src instanceof org.hl7.fhir.r4.model.Practitioner) - return Practitioner.convertPractitioner((org.hl7.fhir.r4.model.Practitioner) src); + return Practitioner40_50.convertPractitioner((org.hl7.fhir.r4.model.Practitioner) src); if (src instanceof org.hl7.fhir.r4.model.PractitionerRole) - return PractitionerRole.convertPractitionerRole((org.hl7.fhir.r4.model.PractitionerRole) src); + return PractitionerRole40_50.convertPractitionerRole((org.hl7.fhir.r4.model.PractitionerRole) src); if (src instanceof org.hl7.fhir.r4.model.Procedure) - return Procedure.convertProcedure((org.hl7.fhir.r4.model.Procedure) src); + return Procedure40_50.convertProcedure((org.hl7.fhir.r4.model.Procedure) src); if (src instanceof org.hl7.fhir.r4.model.Provenance) - return Provenance.convertProvenance((org.hl7.fhir.r4.model.Provenance) src); + return Provenance40_50.convertProvenance((org.hl7.fhir.r4.model.Provenance) src); if (src instanceof org.hl7.fhir.r4.model.Questionnaire) - return Questionnaire.convertQuestionnaire((org.hl7.fhir.r4.model.Questionnaire) src); + return Questionnaire40_50.convertQuestionnaire((org.hl7.fhir.r4.model.Questionnaire) src); if (src instanceof org.hl7.fhir.r4.model.QuestionnaireResponse) - return QuestionnaireResponse.convertQuestionnaireResponse((org.hl7.fhir.r4.model.QuestionnaireResponse) src); + return QuestionnaireResponse40_50.convertQuestionnaireResponse((org.hl7.fhir.r4.model.QuestionnaireResponse) src); if (src instanceof org.hl7.fhir.r4.model.RelatedPerson) - return RelatedPerson.convertRelatedPerson((org.hl7.fhir.r4.model.RelatedPerson) src); + return RelatedPerson40_50.convertRelatedPerson((org.hl7.fhir.r4.model.RelatedPerson) src); if (src instanceof org.hl7.fhir.r4.model.RequestGroup) - return RequestGroup.convertRequestGroup((org.hl7.fhir.r4.model.RequestGroup) src); + return RequestGroup40_50.convertRequestGroup((org.hl7.fhir.r4.model.RequestGroup) src); if (src instanceof org.hl7.fhir.r4.model.ResearchStudy) - return ResearchStudy.convertResearchStudy((org.hl7.fhir.r4.model.ResearchStudy) src); + return ResearchStudy40_50.convertResearchStudy((org.hl7.fhir.r4.model.ResearchStudy) src); if (src instanceof org.hl7.fhir.r4.model.ResearchSubject) - return ResearchSubject.convertResearchSubject((org.hl7.fhir.r4.model.ResearchSubject) src); + return ResearchSubject40_50.convertResearchSubject((org.hl7.fhir.r4.model.ResearchSubject) src); if (src instanceof org.hl7.fhir.r4.model.RiskAssessment) - return RiskAssessment.convertRiskAssessment((org.hl7.fhir.r4.model.RiskAssessment) src); + return RiskAssessment40_50.convertRiskAssessment((org.hl7.fhir.r4.model.RiskAssessment) src); if (src instanceof org.hl7.fhir.r4.model.Schedule) - return Schedule.convertSchedule((org.hl7.fhir.r4.model.Schedule) src); + return Schedule40_50.convertSchedule((org.hl7.fhir.r4.model.Schedule) src); if (src instanceof org.hl7.fhir.r4.model.SearchParameter) - return SearchParameter.convertSearchParameter((org.hl7.fhir.r4.model.SearchParameter) src); + return SearchParameter40_50.convertSearchParameter((org.hl7.fhir.r4.model.SearchParameter) src); if (src instanceof org.hl7.fhir.r4.model.ServiceRequest) - return ServiceRequest.convertServiceRequest((org.hl7.fhir.r4.model.ServiceRequest) src); + return ServiceRequest40_50.convertServiceRequest((org.hl7.fhir.r4.model.ServiceRequest) src); if (src instanceof org.hl7.fhir.r4.model.Slot) - return Slot.convertSlot((org.hl7.fhir.r4.model.Slot) src); + return Slot40_50.convertSlot((org.hl7.fhir.r4.model.Slot) src); if (src instanceof org.hl7.fhir.r4.model.Specimen) - return Specimen.convertSpecimen((org.hl7.fhir.r4.model.Specimen) src); + return Specimen40_50.convertSpecimen((org.hl7.fhir.r4.model.Specimen) src); if (src instanceof org.hl7.fhir.r4.model.SpecimenDefinition) - return SpecimenDefinition.convertSpecimenDefinition((org.hl7.fhir.r4.model.SpecimenDefinition) src); + return SpecimenDefinition40_50.convertSpecimenDefinition((org.hl7.fhir.r4.model.SpecimenDefinition) src); if (src instanceof org.hl7.fhir.r4.model.StructureDefinition) - return StructureDefinition.convertStructureDefinition((org.hl7.fhir.r4.model.StructureDefinition) src); + return StructureDefinition40_50.convertStructureDefinition((org.hl7.fhir.r4.model.StructureDefinition) src); if (src instanceof org.hl7.fhir.r4.model.StructureMap) - return StructureMap.convertStructureMap((org.hl7.fhir.r4.model.StructureMap) src); + return StructureMap40_50.convertStructureMap((org.hl7.fhir.r4.model.StructureMap) src); // if (src instanceof org.hl7.fhir.r4.model.Subscription) // return Subscription.convertSubscription((org.hl7.fhir.r4.model.Subscription) src); if (src instanceof org.hl7.fhir.r4.model.Substance) - return Substance.convertSubstance((org.hl7.fhir.r4.model.Substance) src); + return Substance40_50.convertSubstance((org.hl7.fhir.r4.model.Substance) src); if (src instanceof org.hl7.fhir.r4.model.SubstanceNucleicAcid) - return SubstanceNucleicAcid.convertSubstanceNucleicAcid((org.hl7.fhir.r4.model.SubstanceNucleicAcid) src); + return SubstanceNucleicAcid40_50.convertSubstanceNucleicAcid((org.hl7.fhir.r4.model.SubstanceNucleicAcid) src); if (src instanceof org.hl7.fhir.r4.model.SubstancePolymer) - return SubstancePolymer.convertSubstancePolymer((org.hl7.fhir.r4.model.SubstancePolymer) src); + return SubstancePolymer40_50.convertSubstancePolymer((org.hl7.fhir.r4.model.SubstancePolymer) src); if (src instanceof org.hl7.fhir.r4.model.SubstanceProtein) - return SubstanceProtein.convertSubstanceProtein((org.hl7.fhir.r4.model.SubstanceProtein) src); + return SubstanceProtein40_50.convertSubstanceProtein((org.hl7.fhir.r4.model.SubstanceProtein) src); if (src instanceof org.hl7.fhir.r4.model.SubstanceReferenceInformation) - return SubstanceReferenceInformation.convertSubstanceReferenceInformation((org.hl7.fhir.r4.model.SubstanceReferenceInformation) src); + return SubstanceReferenceInformation40_50.convertSubstanceReferenceInformation((org.hl7.fhir.r4.model.SubstanceReferenceInformation) src); if (src instanceof org.hl7.fhir.r4.model.SubstanceSourceMaterial) - return SubstanceSourceMaterial.convertSubstanceSourceMaterial((org.hl7.fhir.r4.model.SubstanceSourceMaterial) src); + return SubstanceSourceMaterial40_50.convertSubstanceSourceMaterial((org.hl7.fhir.r4.model.SubstanceSourceMaterial) src); if (src instanceof org.hl7.fhir.r4.model.SupplyDelivery) - return SupplyDelivery.convertSupplyDelivery((org.hl7.fhir.r4.model.SupplyDelivery) src); + return SupplyDelivery40_50.convertSupplyDelivery((org.hl7.fhir.r4.model.SupplyDelivery) src); if (src instanceof org.hl7.fhir.r4.model.SupplyRequest) - return SupplyRequest.convertSupplyRequest((org.hl7.fhir.r4.model.SupplyRequest) src); + return SupplyRequest40_50.convertSupplyRequest((org.hl7.fhir.r4.model.SupplyRequest) src); if (src instanceof org.hl7.fhir.r4.model.Task) - return Task.convertTask((org.hl7.fhir.r4.model.Task) src); + return Task40_50.convertTask((org.hl7.fhir.r4.model.Task) src); if (src instanceof org.hl7.fhir.r4.model.TerminologyCapabilities) - return TerminologyCapabilities.convertTerminologyCapabilities((org.hl7.fhir.r4.model.TerminologyCapabilities) src); + return TerminologyCapabilities40_50.convertTerminologyCapabilities((org.hl7.fhir.r4.model.TerminologyCapabilities) src); if (src instanceof org.hl7.fhir.r4.model.TestReport) - return TestReport.convertTestReport((org.hl7.fhir.r4.model.TestReport) src); + return TestReport40_50.convertTestReport((org.hl7.fhir.r4.model.TestReport) src); if (src instanceof org.hl7.fhir.r4.model.TestScript) - return TestScript.convertTestScript((org.hl7.fhir.r4.model.TestScript) src); + return TestScript40_50.convertTestScript((org.hl7.fhir.r4.model.TestScript) src); if (src instanceof org.hl7.fhir.r4.model.ValueSet) - return ValueSet.convertValueSet((org.hl7.fhir.r4.model.ValueSet) src); + return ValueSet40_50.convertValueSet((org.hl7.fhir.r4.model.ValueSet) src); if (src instanceof org.hl7.fhir.r4.model.VerificationResult) - return VerificationResult.convertVerificationResult((org.hl7.fhir.r4.model.VerificationResult) src); + return VerificationResult40_50.convertVerificationResult((org.hl7.fhir.r4.model.VerificationResult) src); if (src instanceof org.hl7.fhir.r4.model.VisionPrescription) - return VisionPrescription.convertVisionPrescription((org.hl7.fhir.r4.model.VisionPrescription) src); + return VisionPrescription40_50.convertVisionPrescription((org.hl7.fhir.r4.model.VisionPrescription) src); throw new Error("Unknown resource "+src.fhirType()); } @@ -3542,263 +3538,263 @@ public class VersionConvertor_40_50 { if (src == null) return null; if (src instanceof org.hl7.fhir.r5.model.Parameters) - return Parameters.convertParameters((org.hl7.fhir.r5.model.Parameters) src); + return Parameters40_50.convertParameters((org.hl7.fhir.r5.model.Parameters) src); if (src instanceof org.hl7.fhir.r5.model.Account) - return Account.convertAccount((org.hl7.fhir.r5.model.Account) src); + return Account40_50.convertAccount((org.hl7.fhir.r5.model.Account) src); if (src instanceof org.hl7.fhir.r5.model.ActivityDefinition) - return ActivityDefinition.convertActivityDefinition((org.hl7.fhir.r5.model.ActivityDefinition) src); + return ActivityDefinition40_50.convertActivityDefinition((org.hl7.fhir.r5.model.ActivityDefinition) src); // if (src instanceof org.hl7.fhir.r5.model.AdverseEvent) // return AdverseEvent.convertAdverseEvent((org.hl7.fhir.r5.model.AdverseEvent) src); if (src instanceof org.hl7.fhir.r5.model.AllergyIntolerance) - return AllergyIntolerance.convertAllergyIntolerance((org.hl7.fhir.r5.model.AllergyIntolerance) src); + return AllergyIntolerance40_50.convertAllergyIntolerance((org.hl7.fhir.r5.model.AllergyIntolerance) src); if (src instanceof org.hl7.fhir.r5.model.Appointment) - return Appointment.convertAppointment((org.hl7.fhir.r5.model.Appointment) src); + return Appointment40_50.convertAppointment((org.hl7.fhir.r5.model.Appointment) src); if (src instanceof org.hl7.fhir.r5.model.AppointmentResponse) - return AppointmentResponse.convertAppointmentResponse((org.hl7.fhir.r5.model.AppointmentResponse) src); + return AppointmentResponse40_50.convertAppointmentResponse((org.hl7.fhir.r5.model.AppointmentResponse) src); if (src instanceof org.hl7.fhir.r5.model.AuditEvent) - return AuditEvent.convertAuditEvent((org.hl7.fhir.r5.model.AuditEvent) src); + return AuditEvent40_50.convertAuditEvent((org.hl7.fhir.r5.model.AuditEvent) src); if (src instanceof org.hl7.fhir.r5.model.Basic) - return Basic.convertBasic((org.hl7.fhir.r5.model.Basic) src); + return Basic40_50.convertBasic((org.hl7.fhir.r5.model.Basic) src); if (src instanceof org.hl7.fhir.r5.model.Binary) - return Binary.convertBinary((org.hl7.fhir.r5.model.Binary) src); + return Binary40_50.convertBinary((org.hl7.fhir.r5.model.Binary) src); if (src instanceof org.hl7.fhir.r5.model.BiologicallyDerivedProduct) - return BiologicallyDerivedProduct.convertBiologicallyDerivedProduct((org.hl7.fhir.r5.model.BiologicallyDerivedProduct) src); + return BiologicallyDerivedProduct40_50.convertBiologicallyDerivedProduct((org.hl7.fhir.r5.model.BiologicallyDerivedProduct) src); if (src instanceof org.hl7.fhir.r5.model.BodyStructure) - return BodyStructure.convertBodyStructure((org.hl7.fhir.r5.model.BodyStructure) src); + return BodyStructure40_50.convertBodyStructure((org.hl7.fhir.r5.model.BodyStructure) src); if (src instanceof org.hl7.fhir.r5.model.Bundle) - return Bundle.convertBundle((org.hl7.fhir.r5.model.Bundle) src); + return Bundle40_50.convertBundle((org.hl7.fhir.r5.model.Bundle) src); if (src instanceof org.hl7.fhir.r5.model.CapabilityStatement) - return CapabilityStatement.convertCapabilityStatement((org.hl7.fhir.r5.model.CapabilityStatement) src); + return CapabilityStatement40_50.convertCapabilityStatement((org.hl7.fhir.r5.model.CapabilityStatement) src); if (src instanceof org.hl7.fhir.r5.model.CarePlan) - return CarePlan.convertCarePlan((org.hl7.fhir.r5.model.CarePlan) src); + return CarePlan40_50.convertCarePlan((org.hl7.fhir.r5.model.CarePlan) src); if (src instanceof org.hl7.fhir.r5.model.CareTeam) - return CareTeam.convertCareTeam((org.hl7.fhir.r5.model.CareTeam) src); + return CareTeam40_50.convertCareTeam((org.hl7.fhir.r5.model.CareTeam) src); // if (src instanceof org.hl7.fhir.r5.model.CatalogEntry) // return CatalogEntry.convertCatalogEntry((org.hl7.fhir.r5.model.CatalogEntry) src); if (src instanceof org.hl7.fhir.r5.model.ChargeItem) - return ChargeItem.convertChargeItem((org.hl7.fhir.r5.model.ChargeItem) src); + return ChargeItem40_50.convertChargeItem((org.hl7.fhir.r5.model.ChargeItem) src); if (src instanceof org.hl7.fhir.r5.model.ChargeItemDefinition) - return ChargeItemDefinition.convertChargeItemDefinition((org.hl7.fhir.r5.model.ChargeItemDefinition) src); + return ChargeItemDefinition40_50.convertChargeItemDefinition((org.hl7.fhir.r5.model.ChargeItemDefinition) src); if (src instanceof org.hl7.fhir.r5.model.Claim) - return Claim.convertClaim((org.hl7.fhir.r5.model.Claim) src); + return Claim40_50.convertClaim((org.hl7.fhir.r5.model.Claim) src); if (src instanceof org.hl7.fhir.r5.model.ClaimResponse) - return ClaimResponse.convertClaimResponse((org.hl7.fhir.r5.model.ClaimResponse) src); + return ClaimResponse40_50.convertClaimResponse((org.hl7.fhir.r5.model.ClaimResponse) src); if (src instanceof org.hl7.fhir.r5.model.ClinicalImpression) - return ClinicalImpression.convertClinicalImpression((org.hl7.fhir.r5.model.ClinicalImpression) src); + return ClinicalImpression40_50.convertClinicalImpression((org.hl7.fhir.r5.model.ClinicalImpression) src); if (src instanceof org.hl7.fhir.r5.model.CodeSystem) - return CodeSystem.convertCodeSystem((org.hl7.fhir.r5.model.CodeSystem) src); + return CodeSystem40_50.convertCodeSystem((org.hl7.fhir.r5.model.CodeSystem) src); if (src instanceof org.hl7.fhir.r5.model.Communication) - return Communication.convertCommunication((org.hl7.fhir.r5.model.Communication) src); + return Communication40_50.convertCommunication((org.hl7.fhir.r5.model.Communication) src); if (src instanceof org.hl7.fhir.r5.model.CommunicationRequest) - return CommunicationRequest.convertCommunicationRequest((org.hl7.fhir.r5.model.CommunicationRequest) src); + return CommunicationRequest40_50.convertCommunicationRequest((org.hl7.fhir.r5.model.CommunicationRequest) src); if (src instanceof org.hl7.fhir.r5.model.CompartmentDefinition) - return CompartmentDefinition.convertCompartmentDefinition((org.hl7.fhir.r5.model.CompartmentDefinition) src); + return CompartmentDefinition40_50.convertCompartmentDefinition((org.hl7.fhir.r5.model.CompartmentDefinition) src); if (src instanceof org.hl7.fhir.r5.model.Composition) - return Composition.convertComposition((org.hl7.fhir.r5.model.Composition) src); + return Composition40_50.convertComposition((org.hl7.fhir.r5.model.Composition) src); if (src instanceof org.hl7.fhir.r5.model.ConceptMap) - return ConceptMap.convertConceptMap((org.hl7.fhir.r5.model.ConceptMap) src); + return ConceptMap40_50.convertConceptMap((org.hl7.fhir.r5.model.ConceptMap) src); if (src instanceof org.hl7.fhir.r5.model.Condition) - return Condition.convertCondition((org.hl7.fhir.r5.model.Condition) src); + return Condition40_50.convertCondition((org.hl7.fhir.r5.model.Condition) src); if (src instanceof org.hl7.fhir.r5.model.Consent) - return Consent.convertConsent((org.hl7.fhir.r5.model.Consent) src); + return Consent40_50.convertConsent((org.hl7.fhir.r5.model.Consent) src); if (src instanceof org.hl7.fhir.r5.model.Contract) - return Contract.convertContract((org.hl7.fhir.r5.model.Contract) src); + return Contract40_50.convertContract((org.hl7.fhir.r5.model.Contract) src); if (src instanceof org.hl7.fhir.r5.model.Coverage) - return Coverage.convertCoverage((org.hl7.fhir.r5.model.Coverage) src); + return Coverage40_50.convertCoverage((org.hl7.fhir.r5.model.Coverage) src); if (src instanceof org.hl7.fhir.r5.model.CoverageEligibilityRequest) - return CoverageEligibilityRequest.convertCoverageEligibilityRequest((org.hl7.fhir.r5.model.CoverageEligibilityRequest) src); + return CoverageEligibilityRequest40_50.convertCoverageEligibilityRequest((org.hl7.fhir.r5.model.CoverageEligibilityRequest) src); if (src instanceof org.hl7.fhir.r5.model.CoverageEligibilityResponse) - return CoverageEligibilityResponse.convertCoverageEligibilityResponse((org.hl7.fhir.r5.model.CoverageEligibilityResponse) src); + return CoverageEligibilityResponse40_50.convertCoverageEligibilityResponse((org.hl7.fhir.r5.model.CoverageEligibilityResponse) src); if (src instanceof org.hl7.fhir.r5.model.DetectedIssue) - return DetectedIssue.convertDetectedIssue((org.hl7.fhir.r5.model.DetectedIssue) src); + return DetectedIssue40_50.convertDetectedIssue((org.hl7.fhir.r5.model.DetectedIssue) src); if (src instanceof org.hl7.fhir.r5.model.Device) - return Device.convertDevice((org.hl7.fhir.r5.model.Device) src); + return Device40_50.convertDevice((org.hl7.fhir.r5.model.Device) src); if (src instanceof org.hl7.fhir.r5.model.DeviceDefinition) - return DeviceDefinition.convertDeviceDefinition((org.hl7.fhir.r5.model.DeviceDefinition) src); + return DeviceDefinition40_50.convertDeviceDefinition((org.hl7.fhir.r5.model.DeviceDefinition) src); if (src instanceof org.hl7.fhir.r5.model.DeviceMetric) - return DeviceMetric.convertDeviceMetric((org.hl7.fhir.r5.model.DeviceMetric) src); + return DeviceMetric40_50.convertDeviceMetric((org.hl7.fhir.r5.model.DeviceMetric) src); if (src instanceof org.hl7.fhir.r5.model.DeviceRequest) - return DeviceRequest.convertDeviceRequest((org.hl7.fhir.r5.model.DeviceRequest) src); + return DeviceRequest40_50.convertDeviceRequest((org.hl7.fhir.r5.model.DeviceRequest) src); if (src instanceof org.hl7.fhir.r5.model.DeviceUseStatement) - return DeviceUseStatement.convertDeviceUseStatement((org.hl7.fhir.r5.model.DeviceUseStatement) src); + return DeviceUseStatement40_50.convertDeviceUseStatement((org.hl7.fhir.r5.model.DeviceUseStatement) src); if (src instanceof org.hl7.fhir.r5.model.DiagnosticReport) - return DiagnosticReport.convertDiagnosticReport((org.hl7.fhir.r5.model.DiagnosticReport) src); + return DiagnosticReport40_50.convertDiagnosticReport((org.hl7.fhir.r5.model.DiagnosticReport) src); if (src instanceof org.hl7.fhir.r5.model.DocumentManifest) - return DocumentManifest.convertDocumentManifest((org.hl7.fhir.r5.model.DocumentManifest) src); + return DocumentManifest40_50.convertDocumentManifest((org.hl7.fhir.r5.model.DocumentManifest) src); if (src instanceof org.hl7.fhir.r5.model.DocumentReference) - return DocumentReference.convertDocumentReference((org.hl7.fhir.r5.model.DocumentReference) src); + return DocumentReference40_50.convertDocumentReference((org.hl7.fhir.r5.model.DocumentReference) src); if (src instanceof org.hl7.fhir.r5.model.Encounter) - return Encounter.convertEncounter((org.hl7.fhir.r5.model.Encounter) src); + return Encounter40_50.convertEncounter((org.hl7.fhir.r5.model.Encounter) src); if (src instanceof org.hl7.fhir.r5.model.Endpoint) - return Endpoint.convertEndpoint((org.hl7.fhir.r5.model.Endpoint) src); + return Endpoint40_50.convertEndpoint((org.hl7.fhir.r5.model.Endpoint) src); if (src instanceof org.hl7.fhir.r5.model.EnrollmentRequest) - return EnrollmentRequest.convertEnrollmentRequest((org.hl7.fhir.r5.model.EnrollmentRequest) src); + return EnrollmentRequest40_50.convertEnrollmentRequest((org.hl7.fhir.r5.model.EnrollmentRequest) src); if (src instanceof org.hl7.fhir.r5.model.EnrollmentResponse) - return EnrollmentResponse.convertEnrollmentResponse((org.hl7.fhir.r5.model.EnrollmentResponse) src); + return EnrollmentResponse40_50.convertEnrollmentResponse((org.hl7.fhir.r5.model.EnrollmentResponse) src); if (src instanceof org.hl7.fhir.r5.model.EpisodeOfCare) - return EpisodeOfCare.convertEpisodeOfCare((org.hl7.fhir.r5.model.EpisodeOfCare) src); + return EpisodeOfCare40_50.convertEpisodeOfCare((org.hl7.fhir.r5.model.EpisodeOfCare) src); if (src instanceof org.hl7.fhir.r5.model.EventDefinition) - return EventDefinition.convertEventDefinition((org.hl7.fhir.r5.model.EventDefinition) src); + return EventDefinition40_50.convertEventDefinition((org.hl7.fhir.r5.model.EventDefinition) src); if (src instanceof org.hl7.fhir.r5.model.ExampleScenario) - return ExampleScenario.convertExampleScenario((org.hl7.fhir.r5.model.ExampleScenario) src); + return ExampleScenario40_50.convertExampleScenario((org.hl7.fhir.r5.model.ExampleScenario) src); if (src instanceof org.hl7.fhir.r5.model.ExplanationOfBenefit) - return ExplanationOfBenefit.convertExplanationOfBenefit((org.hl7.fhir.r5.model.ExplanationOfBenefit) src); + return ExplanationOfBenefit40_50.convertExplanationOfBenefit((org.hl7.fhir.r5.model.ExplanationOfBenefit) src); if (src instanceof org.hl7.fhir.r5.model.FamilyMemberHistory) - return FamilyMemberHistory.convertFamilyMemberHistory((org.hl7.fhir.r5.model.FamilyMemberHistory) src); + return FamilyMemberHistory40_50.convertFamilyMemberHistory((org.hl7.fhir.r5.model.FamilyMemberHistory) src); if (src instanceof org.hl7.fhir.r5.model.Flag) - return Flag.convertFlag((org.hl7.fhir.r5.model.Flag) src); + return Flag40_50.convertFlag((org.hl7.fhir.r5.model.Flag) src); if (src instanceof org.hl7.fhir.r5.model.Goal) - return Goal.convertGoal((org.hl7.fhir.r5.model.Goal) src); + return Goal40_50.convertGoal((org.hl7.fhir.r5.model.Goal) src); if (src instanceof org.hl7.fhir.r5.model.GraphDefinition) - return GraphDefinition.convertGraphDefinition((org.hl7.fhir.r5.model.GraphDefinition) src); + return GraphDefinition40_50.convertGraphDefinition((org.hl7.fhir.r5.model.GraphDefinition) src); if (src instanceof org.hl7.fhir.r5.model.Group) - return Group.convertGroup((org.hl7.fhir.r5.model.Group) src); + return Group40_50.convertGroup((org.hl7.fhir.r5.model.Group) src); if (src instanceof org.hl7.fhir.r5.model.GuidanceResponse) - return GuidanceResponse.convertGuidanceResponse((org.hl7.fhir.r5.model.GuidanceResponse) src); + return GuidanceResponse40_50.convertGuidanceResponse((org.hl7.fhir.r5.model.GuidanceResponse) src); if (src instanceof org.hl7.fhir.r5.model.HealthcareService) - return HealthcareService.convertHealthcareService((org.hl7.fhir.r5.model.HealthcareService) src); + return HealthcareService40_50.convertHealthcareService((org.hl7.fhir.r5.model.HealthcareService) src); if (src instanceof org.hl7.fhir.r5.model.ImagingStudy) - return ImagingStudy.convertImagingStudy((org.hl7.fhir.r5.model.ImagingStudy) src); + return ImagingStudy40_50.convertImagingStudy((org.hl7.fhir.r5.model.ImagingStudy) src); if (src instanceof org.hl7.fhir.r5.model.Immunization) - return Immunization.convertImmunization((org.hl7.fhir.r5.model.Immunization) src); + return Immunization40_50.convertImmunization((org.hl7.fhir.r5.model.Immunization) src); if (src instanceof org.hl7.fhir.r5.model.ImmunizationEvaluation) - return ImmunizationEvaluation.convertImmunizationEvaluation((org.hl7.fhir.r5.model.ImmunizationEvaluation) src); + return ImmunizationEvaluation40_50.convertImmunizationEvaluation((org.hl7.fhir.r5.model.ImmunizationEvaluation) src); if (src instanceof org.hl7.fhir.r5.model.ImmunizationRecommendation) - return ImmunizationRecommendation.convertImmunizationRecommendation((org.hl7.fhir.r5.model.ImmunizationRecommendation) src); + return ImmunizationRecommendation40_50.convertImmunizationRecommendation((org.hl7.fhir.r5.model.ImmunizationRecommendation) src); if (src instanceof org.hl7.fhir.r5.model.ImplementationGuide) - return ImplementationGuide.convertImplementationGuide((org.hl7.fhir.r5.model.ImplementationGuide) src); + return ImplementationGuide40_50.convertImplementationGuide((org.hl7.fhir.r5.model.ImplementationGuide) src); if (src instanceof org.hl7.fhir.r5.model.InsurancePlan) - return InsurancePlan.convertInsurancePlan((org.hl7.fhir.r5.model.InsurancePlan) src); + return InsurancePlan40_50.convertInsurancePlan((org.hl7.fhir.r5.model.InsurancePlan) src); if (src instanceof org.hl7.fhir.r5.model.Invoice) - return Invoice.convertInvoice((org.hl7.fhir.r5.model.Invoice) src); + return Invoice40_50.convertInvoice((org.hl7.fhir.r5.model.Invoice) src); if (src instanceof org.hl7.fhir.r5.model.Library) - return Library.convertLibrary((org.hl7.fhir.r5.model.Library) src); + return Library40_50.convertLibrary((org.hl7.fhir.r5.model.Library) src); if (src instanceof org.hl7.fhir.r5.model.Linkage) - return Linkage.convertLinkage((org.hl7.fhir.r5.model.Linkage) src); + return Linkage40_50.convertLinkage((org.hl7.fhir.r5.model.Linkage) src); if (src instanceof org.hl7.fhir.r5.model.ListResource) - return ListResource.convertListResource((org.hl7.fhir.r5.model.ListResource) src); + return ListResource40_50.convertListResource((org.hl7.fhir.r5.model.ListResource) src); if (src instanceof org.hl7.fhir.r5.model.Location) - return Location.convertLocation((org.hl7.fhir.r5.model.Location) src); + return Location40_50.convertLocation((org.hl7.fhir.r5.model.Location) src); if (src instanceof org.hl7.fhir.r5.model.Measure) - return Measure.convertMeasure((org.hl7.fhir.r5.model.Measure) src); + return Measure40_50.convertMeasure((org.hl7.fhir.r5.model.Measure) src); if (src instanceof org.hl7.fhir.r5.model.MeasureReport) - return MeasureReport.convertMeasureReport((org.hl7.fhir.r5.model.MeasureReport) src); + return MeasureReport40_50.convertMeasureReport((org.hl7.fhir.r5.model.MeasureReport) src); if (src instanceof org.hl7.fhir.r5.model.DocumentReference) // todo: will never get here (doesn't work anyway) - return Media.convertMedia((org.hl7.fhir.r5.model.DocumentReference) src); + return Media40_50.convertMedia((org.hl7.fhir.r5.model.DocumentReference) src); if (src instanceof org.hl7.fhir.r5.model.Medication) - return Medication.convertMedication((org.hl7.fhir.r5.model.Medication) src); + return Medication40_50.convertMedication((org.hl7.fhir.r5.model.Medication) src); if (src instanceof org.hl7.fhir.r5.model.MedicationAdministration) - return MedicationAdministration.convertMedicationAdministration((org.hl7.fhir.r5.model.MedicationAdministration) src); + return MedicationAdministration40_50.convertMedicationAdministration((org.hl7.fhir.r5.model.MedicationAdministration) src); if (src instanceof org.hl7.fhir.r5.model.MedicationDispense) - return MedicationDispense.convertMedicationDispense((org.hl7.fhir.r5.model.MedicationDispense) src); + return MedicationDispense40_50.convertMedicationDispense((org.hl7.fhir.r5.model.MedicationDispense) src); if (src instanceof org.hl7.fhir.r5.model.MedicationKnowledge) - return MedicationKnowledge.convertMedicationKnowledge((org.hl7.fhir.r5.model.MedicationKnowledge) src); + return MedicationKnowledge40_50.convertMedicationKnowledge((org.hl7.fhir.r5.model.MedicationKnowledge) src); if (src instanceof org.hl7.fhir.r5.model.MedicationRequest) - return MedicationRequest.convertMedicationRequest((org.hl7.fhir.r5.model.MedicationRequest) src); + return MedicationRequest40_50.convertMedicationRequest((org.hl7.fhir.r5.model.MedicationRequest) src); if (src instanceof org.hl7.fhir.r5.model.MedicationUsage) - return MedicationStatement.convertMedicationStatement((org.hl7.fhir.r5.model.MedicationUsage) src); + return MedicationStatement40_50.convertMedicationStatement((org.hl7.fhir.r5.model.MedicationUsage) src); if (src instanceof org.hl7.fhir.r5.model.MessageDefinition) - return MessageDefinition.convertMessageDefinition((org.hl7.fhir.r5.model.MessageDefinition) src); + return MessageDefinition40_50.convertMessageDefinition((org.hl7.fhir.r5.model.MessageDefinition) src); if (src instanceof org.hl7.fhir.r5.model.MessageHeader) - return MessageHeader.convertMessageHeader((org.hl7.fhir.r5.model.MessageHeader) src); + return MessageHeader40_50.convertMessageHeader((org.hl7.fhir.r5.model.MessageHeader) src); if (src instanceof org.hl7.fhir.r5.model.MolecularSequence) - return MolecularSequence.convertMolecularSequence((org.hl7.fhir.r5.model.MolecularSequence) src); + return MolecularSequence40_50.convertMolecularSequence((org.hl7.fhir.r5.model.MolecularSequence) src); if (src instanceof org.hl7.fhir.r5.model.NamingSystem) - return NamingSystem.convertNamingSystem((org.hl7.fhir.r5.model.NamingSystem) src); + return NamingSystem40_50.convertNamingSystem((org.hl7.fhir.r5.model.NamingSystem) src); if (src instanceof org.hl7.fhir.r5.model.NutritionOrder) - return NutritionOrder.convertNutritionOrder((org.hl7.fhir.r5.model.NutritionOrder) src); + return NutritionOrder40_50.convertNutritionOrder((org.hl7.fhir.r5.model.NutritionOrder) src); if (src instanceof org.hl7.fhir.r5.model.Observation) - return Observation.convertObservation((org.hl7.fhir.r5.model.Observation) src); + return Observation40_50.convertObservation((org.hl7.fhir.r5.model.Observation) src); if (src instanceof org.hl7.fhir.r5.model.ObservationDefinition) - return ObservationDefinition.convertObservationDefinition((org.hl7.fhir.r5.model.ObservationDefinition) src); + return ObservationDefinition40_50.convertObservationDefinition((org.hl7.fhir.r5.model.ObservationDefinition) src); if (src instanceof org.hl7.fhir.r5.model.OperationDefinition) - return OperationDefinition.convertOperationDefinition((org.hl7.fhir.r5.model.OperationDefinition) src); + return OperationDefinition40_50.convertOperationDefinition((org.hl7.fhir.r5.model.OperationDefinition) src); if (src instanceof org.hl7.fhir.r5.model.OperationOutcome) - return OperationOutcome.convertOperationOutcome((org.hl7.fhir.r5.model.OperationOutcome) src); + return OperationOutcome40_50.convertOperationOutcome((org.hl7.fhir.r5.model.OperationOutcome) src); if (src instanceof org.hl7.fhir.r5.model.Organization) - return Organization.convertOrganization((org.hl7.fhir.r5.model.Organization) src); + return Organization40_50.convertOrganization((org.hl7.fhir.r5.model.Organization) src); if (src instanceof org.hl7.fhir.r5.model.OrganizationAffiliation) - return OrganizationAffiliation.convertOrganizationAffiliation((org.hl7.fhir.r5.model.OrganizationAffiliation) src); + return OrganizationAffiliation40_50.convertOrganizationAffiliation((org.hl7.fhir.r5.model.OrganizationAffiliation) src); if (src instanceof org.hl7.fhir.r5.model.Patient) - return Patient.convertPatient((org.hl7.fhir.r5.model.Patient) src); + return Patient40_50.convertPatient((org.hl7.fhir.r5.model.Patient) src); if (src instanceof org.hl7.fhir.r5.model.PaymentNotice) - return PaymentNotice.convertPaymentNotice((org.hl7.fhir.r5.model.PaymentNotice) src); + return PaymentNotice40_50.convertPaymentNotice((org.hl7.fhir.r5.model.PaymentNotice) src); if (src instanceof org.hl7.fhir.r5.model.PaymentReconciliation) - return PaymentReconciliation.convertPaymentReconciliation((org.hl7.fhir.r5.model.PaymentReconciliation) src); + return PaymentReconciliation40_50.convertPaymentReconciliation((org.hl7.fhir.r5.model.PaymentReconciliation) src); if (src instanceof org.hl7.fhir.r5.model.Person) - return Person.convertPerson((org.hl7.fhir.r5.model.Person) src); + return Person40_50.convertPerson((org.hl7.fhir.r5.model.Person) src); if (src instanceof org.hl7.fhir.r5.model.PlanDefinition) - return PlanDefinition.convertPlanDefinition((org.hl7.fhir.r5.model.PlanDefinition) src); + return PlanDefinition40_50.convertPlanDefinition((org.hl7.fhir.r5.model.PlanDefinition) src); if (src instanceof org.hl7.fhir.r5.model.Practitioner) - return Practitioner.convertPractitioner((org.hl7.fhir.r5.model.Practitioner) src); + return Practitioner40_50.convertPractitioner((org.hl7.fhir.r5.model.Practitioner) src); if (src instanceof org.hl7.fhir.r5.model.PractitionerRole) - return PractitionerRole.convertPractitionerRole((org.hl7.fhir.r5.model.PractitionerRole) src); + return PractitionerRole40_50.convertPractitionerRole((org.hl7.fhir.r5.model.PractitionerRole) src); if (src instanceof org.hl7.fhir.r5.model.Procedure) - return Procedure.convertProcedure((org.hl7.fhir.r5.model.Procedure) src); + return Procedure40_50.convertProcedure((org.hl7.fhir.r5.model.Procedure) src); if (src instanceof org.hl7.fhir.r5.model.Provenance) - return Provenance.convertProvenance((org.hl7.fhir.r5.model.Provenance) src); + return Provenance40_50.convertProvenance((org.hl7.fhir.r5.model.Provenance) src); if (src instanceof org.hl7.fhir.r5.model.Questionnaire) - return Questionnaire.convertQuestionnaire((org.hl7.fhir.r5.model.Questionnaire) src); + return Questionnaire40_50.convertQuestionnaire((org.hl7.fhir.r5.model.Questionnaire) src); if (src instanceof org.hl7.fhir.r5.model.QuestionnaireResponse) - return QuestionnaireResponse.convertQuestionnaireResponse((org.hl7.fhir.r5.model.QuestionnaireResponse) src); + return QuestionnaireResponse40_50.convertQuestionnaireResponse((org.hl7.fhir.r5.model.QuestionnaireResponse) src); if (src instanceof org.hl7.fhir.r5.model.RelatedPerson) - return RelatedPerson.convertRelatedPerson((org.hl7.fhir.r5.model.RelatedPerson) src); + return RelatedPerson40_50.convertRelatedPerson((org.hl7.fhir.r5.model.RelatedPerson) src); if (src instanceof org.hl7.fhir.r5.model.RequestGroup) - return RequestGroup.convertRequestGroup((org.hl7.fhir.r5.model.RequestGroup) src); + return RequestGroup40_50.convertRequestGroup((org.hl7.fhir.r5.model.RequestGroup) src); if (src instanceof org.hl7.fhir.r5.model.ResearchStudy) - return ResearchStudy.convertResearchStudy((org.hl7.fhir.r5.model.ResearchStudy) src); + return ResearchStudy40_50.convertResearchStudy((org.hl7.fhir.r5.model.ResearchStudy) src); if (src instanceof org.hl7.fhir.r5.model.ResearchSubject) - return ResearchSubject.convertResearchSubject((org.hl7.fhir.r5.model.ResearchSubject) src); + return ResearchSubject40_50.convertResearchSubject((org.hl7.fhir.r5.model.ResearchSubject) src); if (src instanceof org.hl7.fhir.r5.model.RiskAssessment) - return RiskAssessment.convertRiskAssessment((org.hl7.fhir.r5.model.RiskAssessment) src); + return RiskAssessment40_50.convertRiskAssessment((org.hl7.fhir.r5.model.RiskAssessment) src); if (src instanceof org.hl7.fhir.r5.model.Schedule) - return Schedule.convertSchedule((org.hl7.fhir.r5.model.Schedule) src); + return Schedule40_50.convertSchedule((org.hl7.fhir.r5.model.Schedule) src); if (src instanceof org.hl7.fhir.r5.model.SearchParameter) - return SearchParameter.convertSearchParameter((org.hl7.fhir.r5.model.SearchParameter) src); + return SearchParameter40_50.convertSearchParameter((org.hl7.fhir.r5.model.SearchParameter) src); if (src instanceof org.hl7.fhir.r5.model.ServiceRequest) - return ServiceRequest.convertServiceRequest((org.hl7.fhir.r5.model.ServiceRequest) src); + return ServiceRequest40_50.convertServiceRequest((org.hl7.fhir.r5.model.ServiceRequest) src); if (src instanceof org.hl7.fhir.r5.model.Slot) - return Slot.convertSlot((org.hl7.fhir.r5.model.Slot) src); + return Slot40_50.convertSlot((org.hl7.fhir.r5.model.Slot) src); if (src instanceof org.hl7.fhir.r5.model.Specimen) - return Specimen.convertSpecimen((org.hl7.fhir.r5.model.Specimen) src); + return Specimen40_50.convertSpecimen((org.hl7.fhir.r5.model.Specimen) src); if (src instanceof org.hl7.fhir.r5.model.SpecimenDefinition) - return SpecimenDefinition.convertSpecimenDefinition((org.hl7.fhir.r5.model.SpecimenDefinition) src); + return SpecimenDefinition40_50.convertSpecimenDefinition((org.hl7.fhir.r5.model.SpecimenDefinition) src); if (src instanceof org.hl7.fhir.r5.model.StructureDefinition) - return StructureDefinition.convertStructureDefinition((org.hl7.fhir.r5.model.StructureDefinition) src); + return StructureDefinition40_50.convertStructureDefinition((org.hl7.fhir.r5.model.StructureDefinition) src); if (src instanceof org.hl7.fhir.r5.model.StructureMap) - return StructureMap.convertStructureMap((org.hl7.fhir.r5.model.StructureMap) src); + return StructureMap40_50.convertStructureMap((org.hl7.fhir.r5.model.StructureMap) src); // if (src instanceof org.hl7.fhir.r5.model.Subscription) // return Subscription.convertSubscription((org.hl7.fhir.r5.model.Subscription) src); if (src instanceof org.hl7.fhir.r5.model.Substance) - return Substance.convertSubstance((org.hl7.fhir.r5.model.Substance) src); + return Substance40_50.convertSubstance((org.hl7.fhir.r5.model.Substance) src); if (src instanceof org.hl7.fhir.r5.model.SubstanceNucleicAcid) - return SubstanceNucleicAcid.convertSubstanceNucleicAcid((org.hl7.fhir.r5.model.SubstanceNucleicAcid) src); + return SubstanceNucleicAcid40_50.convertSubstanceNucleicAcid((org.hl7.fhir.r5.model.SubstanceNucleicAcid) src); if (src instanceof org.hl7.fhir.r5.model.SubstancePolymer) - return SubstancePolymer.convertSubstancePolymer((org.hl7.fhir.r5.model.SubstancePolymer) src); + return SubstancePolymer40_50.convertSubstancePolymer((org.hl7.fhir.r5.model.SubstancePolymer) src); if (src instanceof org.hl7.fhir.r5.model.SubstanceProtein) - return SubstanceProtein.convertSubstanceProtein((org.hl7.fhir.r5.model.SubstanceProtein) src); + return SubstanceProtein40_50.convertSubstanceProtein((org.hl7.fhir.r5.model.SubstanceProtein) src); if (src instanceof org.hl7.fhir.r5.model.SubstanceReferenceInformation) - return SubstanceReferenceInformation.convertSubstanceReferenceInformation((org.hl7.fhir.r5.model.SubstanceReferenceInformation) src); + return SubstanceReferenceInformation40_50.convertSubstanceReferenceInformation((org.hl7.fhir.r5.model.SubstanceReferenceInformation) src); if (src instanceof org.hl7.fhir.r5.model.SubstanceSourceMaterial) - return SubstanceSourceMaterial.convertSubstanceSourceMaterial((org.hl7.fhir.r5.model.SubstanceSourceMaterial) src); + return SubstanceSourceMaterial40_50.convertSubstanceSourceMaterial((org.hl7.fhir.r5.model.SubstanceSourceMaterial) src); if (src instanceof org.hl7.fhir.r5.model.SupplyDelivery) - return SupplyDelivery.convertSupplyDelivery((org.hl7.fhir.r5.model.SupplyDelivery) src); + return SupplyDelivery40_50.convertSupplyDelivery((org.hl7.fhir.r5.model.SupplyDelivery) src); if (src instanceof org.hl7.fhir.r5.model.SupplyRequest) - return SupplyRequest.convertSupplyRequest((org.hl7.fhir.r5.model.SupplyRequest) src); + return SupplyRequest40_50.convertSupplyRequest((org.hl7.fhir.r5.model.SupplyRequest) src); if (src instanceof org.hl7.fhir.r5.model.Task) - return Task.convertTask((org.hl7.fhir.r5.model.Task) src); + return Task40_50.convertTask((org.hl7.fhir.r5.model.Task) src); if (src instanceof org.hl7.fhir.r5.model.TerminologyCapabilities) - return TerminologyCapabilities.convertTerminologyCapabilities((org.hl7.fhir.r5.model.TerminologyCapabilities) src); + return TerminologyCapabilities40_50.convertTerminologyCapabilities((org.hl7.fhir.r5.model.TerminologyCapabilities) src); if (src instanceof org.hl7.fhir.r5.model.TestReport) - return TestReport.convertTestReport((org.hl7.fhir.r5.model.TestReport) src); + return TestReport40_50.convertTestReport((org.hl7.fhir.r5.model.TestReport) src); if (src instanceof org.hl7.fhir.r5.model.TestScript) - return TestScript.convertTestScript((org.hl7.fhir.r5.model.TestScript) src); + return TestScript40_50.convertTestScript((org.hl7.fhir.r5.model.TestScript) src); if (src instanceof org.hl7.fhir.r5.model.ValueSet) - return ValueSet.convertValueSet((org.hl7.fhir.r5.model.ValueSet) src); + return ValueSet40_50.convertValueSet((org.hl7.fhir.r5.model.ValueSet) src); if (src instanceof org.hl7.fhir.r5.model.VerificationResult) - return VerificationResult.convertVerificationResult((org.hl7.fhir.r5.model.VerificationResult) src); + return VerificationResult40_50.convertVerificationResult((org.hl7.fhir.r5.model.VerificationResult) src); if (src instanceof org.hl7.fhir.r5.model.VisionPrescription) - return VisionPrescription.convertVisionPrescription((org.hl7.fhir.r5.model.VisionPrescription) src); + return VisionPrescription40_50.convertVisionPrescription((org.hl7.fhir.r5.model.VisionPrescription) src); throw new Error("Unknown resource "+src.fhirType()); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Account.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Account40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Account.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Account40_50.java index 11cf33612..3f6f96064 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Account.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Account40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class Account extends VersionConvertor_40_50 { +public class Account40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.Account convertAccount(org.hl7.fhir.r4.model.Account src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ActivityDefinition.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ActivityDefinition40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ActivityDefinition.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ActivityDefinition40_50.java index 96e7e6500..63607b94d 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ActivityDefinition.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ActivityDefinition40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class ActivityDefinition extends VersionConvertor_40_50 { +public class ActivityDefinition40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.ActivityDefinition convertActivityDefinition(org.hl7.fhir.r4.model.ActivityDefinition src) throws FHIRException { if (src == null) @@ -72,7 +72,7 @@ public class ActivityDefinition extends VersionConvertor_40_50 { if (src.hasSubtitle()) tgt.setSubtitleElement(convertString(src.getSubtitleElement())); if (src.hasStatus()) - tgt.setStatus(Enumerations.convertPublicationStatus(src.getStatus())); + tgt.setStatus(Enumerations40_50.convertPublicationStatus(src.getStatus())); if (src.hasExperimental()) tgt.setExperimentalElement(convertBoolean(src.getExperimentalElement())); if (src.hasSubject()) @@ -190,7 +190,7 @@ public class ActivityDefinition extends VersionConvertor_40_50 { if (src.hasSubtitle()) tgt.setSubtitleElement(convertString(src.getSubtitleElement())); if (src.hasStatus()) - tgt.setStatus(Enumerations.convertPublicationStatus(src.getStatus())); + tgt.setStatus(Enumerations40_50.convertPublicationStatus(src.getStatus())); if (src.hasExperimental()) tgt.setExperimentalElement(convertBoolean(src.getExperimentalElement())); if (src.hasSubject()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/AllergyIntolerance.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/AllergyIntolerance40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/AllergyIntolerance.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/AllergyIntolerance40_50.java index 02595a457..68f8a18ab 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/AllergyIntolerance.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/AllergyIntolerance40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class AllergyIntolerance extends VersionConvertor_40_50 { +public class AllergyIntolerance40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.AllergyIntolerance convertAllergyIntolerance(org.hl7.fhir.r4.model.AllergyIntolerance src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Appointment.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Appointment40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Appointment.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Appointment40_50.java index 8908b163f..8a9026c20 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Appointment.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Appointment40_50.java @@ -52,7 +52,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class Appointment extends VersionConvertor_40_50 { +public class Appointment40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.Appointment convertAppointment(org.hl7.fhir.r4.model.Appointment src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/AppointmentResponse.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/AppointmentResponse40_50.java similarity index 98% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/AppointmentResponse.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/AppointmentResponse40_50.java index 130937ff9..777a501ce 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/AppointmentResponse.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/AppointmentResponse40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class AppointmentResponse extends VersionConvertor_40_50 { +public class AppointmentResponse40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.AppointmentResponse convertAppointmentResponse(org.hl7.fhir.r4.model.AppointmentResponse src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/AuditEvent.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/AuditEvent40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/AuditEvent.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/AuditEvent40_50.java index ad352e707..71192a35a 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/AuditEvent.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/AuditEvent40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class AuditEvent extends VersionConvertor_40_50 { +public class AuditEvent40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.AuditEvent convertAuditEvent(org.hl7.fhir.r4.model.AuditEvent src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Basic.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Basic40_50.java similarity index 98% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Basic.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Basic40_50.java index 082551c3f..2b93f46af 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Basic.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Basic40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class Basic extends VersionConvertor_40_50 { +public class Basic40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.Basic convertBasic(org.hl7.fhir.r4.model.Basic src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Binary.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Binary40_50.java similarity index 98% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Binary.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Binary40_50.java index 309e5584c..3eb8d88b6 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Binary.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Binary40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class Binary extends VersionConvertor_40_50 { +public class Binary40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.Binary convertBinary(org.hl7.fhir.r4.model.Binary src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/BiologicallyDerivedProduct.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/BiologicallyDerivedProduct40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/BiologicallyDerivedProduct.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/BiologicallyDerivedProduct40_50.java index d0a81d72c..c09b4776b 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/BiologicallyDerivedProduct.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/BiologicallyDerivedProduct40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class BiologicallyDerivedProduct extends VersionConvertor_40_50 { +public class BiologicallyDerivedProduct40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.BiologicallyDerivedProduct convertBiologicallyDerivedProduct(org.hl7.fhir.r4.model.BiologicallyDerivedProduct src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/BodyStructure.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/BodyStructure40_50.java similarity index 98% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/BodyStructure.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/BodyStructure40_50.java index 32381ccf2..6e7cd2446 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/BodyStructure.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/BodyStructure40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class BodyStructure extends VersionConvertor_40_50 { +public class BodyStructure40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.BodyStructure convertBodyStructure(org.hl7.fhir.r4.model.BodyStructure src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Bundle.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Bundle40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Bundle.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Bundle40_50.java index eb89d2915..a17fbc191 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Bundle.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Bundle40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class Bundle extends VersionConvertor_40_50 { +public class Bundle40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.Bundle convertBundle(org.hl7.fhir.r4.model.Bundle src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/CapabilityStatement.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/CapabilityStatement40_50.java similarity index 98% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/CapabilityStatement.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/CapabilityStatement40_50.java index 6346aae49..5b1f65854 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/CapabilityStatement.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/CapabilityStatement40_50.java @@ -20,7 +20,6 @@ package org.hl7.fhir.convertors.conv40_50; * #L% */ import org.hl7.fhir.exceptions.FHIRException; -import org.hl7.fhir.r5.model.CodeType; import org.hl7.fhir.convertors.VersionConvertor_40_50; /* @@ -52,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class CapabilityStatement extends VersionConvertor_40_50 { +public class CapabilityStatement40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.CapabilityStatement convertCapabilityStatement(org.hl7.fhir.r4.model.CapabilityStatement src) throws FHIRException { if (src == null) @@ -68,7 +67,7 @@ public class CapabilityStatement extends VersionConvertor_40_50 { if (src.hasTitle()) tgt.setTitleElement(convertString(src.getTitleElement())); if (src.hasStatus()) - tgt.setStatus(Enumerations.convertPublicationStatus(src.getStatus())); + tgt.setStatus(Enumerations40_50.convertPublicationStatus(src.getStatus())); if (src.hasExperimental()) tgt.setExperimentalElement(convertBoolean(src.getExperimentalElement())); if (src.hasDate()) @@ -103,7 +102,7 @@ public class CapabilityStatement extends VersionConvertor_40_50 { if (src.hasImplementation()) tgt.setImplementation(convertCapabilityStatementImplementationComponent(src.getImplementation())); if (src.hasFhirVersion()) - tgt.setFhirVersion(Enumerations.convertFHIRVersion(src.getFhirVersion())); + tgt.setFhirVersion(Enumerations40_50.convertFHIRVersion(src.getFhirVersion())); if (src.hasFormat()) { for (org.hl7.fhir.r4.model.CodeType t : src.getFormat()) tgt.getFormat().add(convertCode(t)); } @@ -139,7 +138,7 @@ public class CapabilityStatement extends VersionConvertor_40_50 { if (src.hasTitle()) tgt.setTitleElement(convertString(src.getTitleElement())); if (src.hasStatus()) - tgt.setStatus(Enumerations.convertPublicationStatus(src.getStatus())); + tgt.setStatus(Enumerations40_50.convertPublicationStatus(src.getStatus())); if (src.hasExperimental()) tgt.setExperimentalElement(convertBoolean(src.getExperimentalElement())); if (src.hasDate()) @@ -174,7 +173,7 @@ public class CapabilityStatement extends VersionConvertor_40_50 { if (src.hasImplementation()) tgt.setImplementation(convertCapabilityStatementImplementationComponent(src.getImplementation())); if (src.hasFhirVersion()) - tgt.setFhirVersion(Enumerations.convertFHIRVersion(src.getFhirVersion())); + tgt.setFhirVersion(Enumerations40_50.convertFHIRVersion(src.getFhirVersion())); if (src.hasFormat()) { for (org.hl7.fhir.r5.model.CodeType t : src.getFormat()) tgt.getFormat().add(convertCode(t)); } @@ -714,7 +713,7 @@ public class CapabilityStatement extends VersionConvertor_40_50 { if (src.hasDefinition()) tgt.setDefinitionElement(convertCanonical(src.getDefinitionElement())); if (src.hasType()) - tgt.setType(Enumerations.convertSearchParamType(src.getType())); + tgt.setType(Enumerations40_50.convertSearchParamType(src.getType())); if (src.hasDocumentation()) tgt.setDocumentationElement(convertMarkdown(src.getDocumentationElement())); return tgt; @@ -730,7 +729,7 @@ public class CapabilityStatement extends VersionConvertor_40_50 { if (src.hasDefinition()) tgt.setDefinitionElement(convertCanonical(src.getDefinitionElement())); if (src.hasType()) - tgt.setType(Enumerations.convertSearchParamType(src.getType())); + tgt.setType(Enumerations40_50.convertSearchParamType(src.getType())); if (src.hasDocumentation()) tgt.setDocumentationElement(convertMarkdown(src.getDocumentationElement())); return tgt; diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/CarePlan.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/CarePlan40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/CarePlan.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/CarePlan40_50.java index 6a66cfb9b..50b34f936 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/CarePlan.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/CarePlan40_50.java @@ -52,7 +52,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class CarePlan extends VersionConvertor_40_50 { +public class CarePlan40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.CarePlan convertCarePlan(org.hl7.fhir.r4.model.CarePlan src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/CareTeam.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/CareTeam40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/CareTeam.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/CareTeam40_50.java index f70c860a5..0df53a4b6 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/CareTeam.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/CareTeam40_50.java @@ -52,7 +52,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class CareTeam extends VersionConvertor_40_50 { +public class CareTeam40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.CareTeam convertCareTeam(org.hl7.fhir.r4.model.CareTeam src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ChargeItem.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ChargeItem40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ChargeItem.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ChargeItem40_50.java index 22002064a..dac0d3003 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ChargeItem.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ChargeItem40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class ChargeItem extends VersionConvertor_40_50 { +public class ChargeItem40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.ChargeItem convertChargeItem(org.hl7.fhir.r4.model.ChargeItem src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ChargeItemDefinition.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ChargeItemDefinition40_50.java similarity index 98% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ChargeItemDefinition.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ChargeItemDefinition40_50.java index 6d6432b7f..88b502053 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ChargeItemDefinition.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ChargeItemDefinition40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class ChargeItemDefinition extends VersionConvertor_40_50 { +public class ChargeItemDefinition40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.ChargeItemDefinition convertChargeItemDefinition(org.hl7.fhir.r4.model.ChargeItemDefinition src) throws FHIRException { if (src == null) @@ -77,7 +77,7 @@ public class ChargeItemDefinition extends VersionConvertor_40_50 { for (org.hl7.fhir.r4.model.CanonicalType t : src.getReplaces()) tgt.getReplaces().add(convertCanonical(t)); } if (src.hasStatus()) - tgt.setStatus(Enumerations.convertPublicationStatus(src.getStatus())); + tgt.setStatus(Enumerations40_50.convertPublicationStatus(src.getStatus())); if (src.hasExperimental()) tgt.setExperimentalElement(convertBoolean(src.getExperimentalElement())); if (src.hasDate()) @@ -141,7 +141,7 @@ public class ChargeItemDefinition extends VersionConvertor_40_50 { for (org.hl7.fhir.r5.model.CanonicalType t : src.getReplaces()) tgt.getReplaces().add(convertCanonical(t)); } if (src.hasStatus()) - tgt.setStatus(Enumerations.convertPublicationStatus(src.getStatus())); + tgt.setStatus(Enumerations40_50.convertPublicationStatus(src.getStatus())); if (src.hasExperimental()) tgt.setExperimentalElement(convertBoolean(src.getExperimentalElement())); if (src.hasDate()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Claim.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Claim40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Claim.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Claim40_50.java index 8323c297e..7c29f03a9 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Claim.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Claim40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class Claim extends VersionConvertor_40_50 { +public class Claim40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.Claim convertClaim(org.hl7.fhir.r4.model.Claim src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ClaimResponse.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ClaimResponse40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ClaimResponse.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ClaimResponse40_50.java index d899eb067..96385875b 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ClaimResponse.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ClaimResponse40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class ClaimResponse extends VersionConvertor_40_50 { +public class ClaimResponse40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.ClaimResponse convertClaimResponse(org.hl7.fhir.r4.model.ClaimResponse src) throws FHIRException { if (src == null) @@ -727,7 +727,7 @@ public class ClaimResponse extends VersionConvertor_40_50 { if (src.hasNumber()) tgt.setNumberElement(convertPositiveInt(src.getNumberElement())); if (src.hasType()) - tgt.setType(Enumerations.convertNoteType(src.getType())); + tgt.setType(Enumerations40_50.convertNoteType(src.getType())); if (src.hasText()) tgt.setTextElement(convertString(src.getTextElement())); if (src.hasLanguage()) @@ -743,7 +743,7 @@ public class ClaimResponse extends VersionConvertor_40_50 { if (src.hasNumber()) tgt.setNumberElement(convertPositiveInt(src.getNumberElement())); if (src.hasType()) - tgt.setType(Enumerations.convertNoteType(src.getType())); + tgt.setType(Enumerations40_50.convertNoteType(src.getType())); if (src.hasText()) tgt.setTextElement(convertString(src.getTextElement())); if (src.hasLanguage()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ClinicalImpression.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ClinicalImpression40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ClinicalImpression.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ClinicalImpression40_50.java index 3c305de6e..921e0fa8e 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ClinicalImpression.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ClinicalImpression40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class ClinicalImpression extends VersionConvertor_40_50 { +public class ClinicalImpression40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.ClinicalImpression convertClinicalImpression(org.hl7.fhir.r4.model.ClinicalImpression src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/CodeSystem.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/CodeSystem40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/CodeSystem.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/CodeSystem40_50.java index 74b193e21..5d453c44f 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/CodeSystem.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/CodeSystem40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class CodeSystem extends VersionConvertor_40_50 { +public class CodeSystem40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.CodeSystem convertCodeSystem(org.hl7.fhir.r4.model.CodeSystem src) throws FHIRException { if (src == null) @@ -70,7 +70,7 @@ public class CodeSystem extends VersionConvertor_40_50 { if (src.hasTitle()) tgt.setTitleElement(convertString(src.getTitleElement())); if (src.hasStatus()) - tgt.setStatus(Enumerations.convertPublicationStatus(src.getStatus())); + tgt.setStatus(Enumerations40_50.convertPublicationStatus(src.getStatus())); if (src.hasExperimental()) tgt.setExperimentalElement(convertBoolean(src.getExperimentalElement())); if (src.hasDate()) @@ -137,7 +137,7 @@ public class CodeSystem extends VersionConvertor_40_50 { if (src.hasTitle()) tgt.setTitleElement(convertString(src.getTitleElement())); if (src.hasStatus()) - tgt.setStatus(Enumerations.convertPublicationStatus(src.getStatus())); + tgt.setStatus(Enumerations40_50.convertPublicationStatus(src.getStatus())); if (src.hasExperimental()) tgt.setExperimentalElement(convertBoolean(src.getExperimentalElement())); if (src.hasDate()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Communication.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Communication40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Communication.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Communication40_50.java index 2f11cdf62..86e049b79 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Communication.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Communication40_50.java @@ -55,7 +55,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class Communication extends VersionConvertor_40_50 { +public class Communication40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.Communication convertCommunication(org.hl7.fhir.r4.model.Communication src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/CommunicationRequest.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/CommunicationRequest40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/CommunicationRequest.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/CommunicationRequest40_50.java index 91591f76d..c3cfce621 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/CommunicationRequest.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/CommunicationRequest40_50.java @@ -52,7 +52,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class CommunicationRequest extends VersionConvertor_40_50 { +public class CommunicationRequest40_50 extends VersionConvertor_40_50 { public final static String EXT_PAYLOAD_CONTENT = "http://hl7.org/fhir/4.0/StructureDefinition/extension-CommunicationRequest.payload.content"; diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/CompartmentDefinition.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/CompartmentDefinition40_50.java similarity index 97% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/CompartmentDefinition.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/CompartmentDefinition40_50.java index 4589d0cd2..635e9a4a4 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/CompartmentDefinition.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/CompartmentDefinition40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class CompartmentDefinition extends VersionConvertor_40_50 { +public class CompartmentDefinition40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.CompartmentDefinition convertCompartmentDefinition(org.hl7.fhir.r4.model.CompartmentDefinition src) throws FHIRException { if (src == null) @@ -65,7 +65,7 @@ public class CompartmentDefinition extends VersionConvertor_40_50 { if (src.hasName()) tgt.setNameElement(convertString(src.getNameElement())); if (src.hasStatus()) - tgt.setStatus(Enumerations.convertPublicationStatus(src.getStatus())); + tgt.setStatus(Enumerations40_50.convertPublicationStatus(src.getStatus())); if (src.hasExperimental()) tgt.setExperimentalElement(convertBoolean(src.getExperimentalElement())); if (src.hasDate()) @@ -104,7 +104,7 @@ public class CompartmentDefinition extends VersionConvertor_40_50 { if (src.hasName()) tgt.setNameElement(convertString(src.getNameElement())); if (src.hasStatus()) - tgt.setStatus(Enumerations.convertPublicationStatus(src.getStatus())); + tgt.setStatus(Enumerations40_50.convertPublicationStatus(src.getStatus())); if (src.hasExperimental()) tgt.setExperimentalElement(convertBoolean(src.getExperimentalElement())); if (src.hasDate()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Composition.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Composition40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Composition.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Composition40_50.java index c256d28ab..d447821c7 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Composition.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Composition40_50.java @@ -52,7 +52,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class Composition extends VersionConvertor_40_50 { +public class Composition40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.Composition convertComposition(org.hl7.fhir.r4.model.Composition src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ConceptMap.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ConceptMap40_50.java similarity index 97% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ConceptMap.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ConceptMap40_50.java index 4b7692a54..e912aef19 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ConceptMap.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ConceptMap40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class ConceptMap extends VersionConvertor_40_50 { +public class ConceptMap40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.ConceptMap convertConceptMap(org.hl7.fhir.r4.model.ConceptMap src) throws FHIRException { if (src == null) @@ -69,7 +69,7 @@ public class ConceptMap extends VersionConvertor_40_50 { if (src.hasTitle()) tgt.setTitleElement(convertString(src.getTitleElement())); if (src.hasStatus()) - tgt.setStatus(Enumerations.convertPublicationStatus(src.getStatus())); + tgt.setStatus(Enumerations40_50.convertPublicationStatus(src.getStatus())); if (src.hasExperimental()) tgt.setExperimentalElement(convertBoolean(src.getExperimentalElement())); if (src.hasDate()) @@ -117,7 +117,7 @@ public class ConceptMap extends VersionConvertor_40_50 { if (src.hasTitle()) tgt.setTitleElement(convertString(src.getTitleElement())); if (src.hasStatus()) - tgt.setStatus(Enumerations.convertPublicationStatus(src.getStatus())); + tgt.setStatus(Enumerations40_50.convertPublicationStatus(src.getStatus())); if (src.hasExperimental()) tgt.setExperimentalElement(convertBoolean(src.getExperimentalElement())); if (src.hasDate()) @@ -237,7 +237,7 @@ public class ConceptMap extends VersionConvertor_40_50 { if (src.hasDisplay()) tgt.setDisplayElement(convertString(src.getDisplayElement())); if (src.hasEquivalence()) - tgt.setRelationship(Enumerations.convertConceptMapRelationship(src.getEquivalence())); + tgt.setRelationship(Enumerations40_50.convertConceptMapRelationship(src.getEquivalence())); if (src.hasComment()) tgt.setCommentElement(convertString(src.getCommentElement())); if (src.hasDependsOn()) { @@ -259,7 +259,7 @@ public class ConceptMap extends VersionConvertor_40_50 { if (src.hasDisplay()) tgt.setDisplayElement(convertString(src.getDisplayElement())); if (src.hasRelationship()) - tgt.setEquivalence(Enumerations.convertConceptMapEquivalence(src.getRelationship())); + tgt.setEquivalence(Enumerations40_50.convertConceptMapEquivalence(src.getRelationship())); if (src.hasComment()) tgt.setCommentElement(convertString(src.getCommentElement())); if (src.hasDependsOn()) { diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Condition.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Condition40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Condition.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Condition40_50.java index 37a54b607..d62642bc6 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Condition.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Condition40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class Condition extends VersionConvertor_40_50 { +public class Condition40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.Condition convertCondition(org.hl7.fhir.r4.model.Condition src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Consent.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Consent40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Consent.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Consent40_50.java index 00ca7b515..ae2414c73 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Consent.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Consent40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class Consent extends VersionConvertor_40_50 { +public class Consent40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.Consent convertConsent(org.hl7.fhir.r4.model.Consent src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Contract.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Contract40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Contract.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Contract40_50.java index 66c2090ea..5cecd3224 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Contract.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Contract40_50.java @@ -53,7 +53,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class Contract extends VersionConvertor_40_50 { +public class Contract40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.Contract convertContract(org.hl7.fhir.r4.model.Contract src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Coverage.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Coverage40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Coverage.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Coverage40_50.java index 358187064..ca213135a 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Coverage.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Coverage40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class Coverage extends VersionConvertor_40_50 { +public class Coverage40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.Coverage convertCoverage(org.hl7.fhir.r4.model.Coverage src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/CoverageEligibilityRequest.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/CoverageEligibilityRequest40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/CoverageEligibilityRequest.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/CoverageEligibilityRequest40_50.java index 0f10f9910..3be884a20 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/CoverageEligibilityRequest.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/CoverageEligibilityRequest40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class CoverageEligibilityRequest extends VersionConvertor_40_50 { +public class CoverageEligibilityRequest40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.CoverageEligibilityRequest convertCoverageEligibilityRequest(org.hl7.fhir.r4.model.CoverageEligibilityRequest src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/CoverageEligibilityResponse.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/CoverageEligibilityResponse40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/CoverageEligibilityResponse.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/CoverageEligibilityResponse40_50.java index 8edbf96df..84a93a095 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/CoverageEligibilityResponse.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/CoverageEligibilityResponse40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class CoverageEligibilityResponse extends VersionConvertor_40_50 { +public class CoverageEligibilityResponse40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.CoverageEligibilityResponse convertCoverageEligibilityResponse(org.hl7.fhir.r4.model.CoverageEligibilityResponse src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/DetectedIssue.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/DetectedIssue40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/DetectedIssue.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/DetectedIssue40_50.java index 51cb01a50..1d1a54389 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/DetectedIssue.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/DetectedIssue40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class DetectedIssue extends VersionConvertor_40_50 { +public class DetectedIssue40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.DetectedIssue convertDetectedIssue(org.hl7.fhir.r4.model.DetectedIssue src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Device.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Device40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Device.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Device40_50.java index f0018b5be..19924c811 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Device.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Device40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class Device extends VersionConvertor_40_50 { +public class Device40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.Device convertDevice(org.hl7.fhir.r4.model.Device src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/DeviceDefinition.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/DeviceDefinition40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/DeviceDefinition.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/DeviceDefinition40_50.java index 3027947b4..95adbc004 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/DeviceDefinition.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/DeviceDefinition40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class DeviceDefinition extends VersionConvertor_40_50 { +public class DeviceDefinition40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.DeviceDefinition convertDeviceDefinition(org.hl7.fhir.r4.model.DeviceDefinition src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/DeviceMetric.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/DeviceMetric40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/DeviceMetric.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/DeviceMetric40_50.java index 7c169088e..e20be9662 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/DeviceMetric.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/DeviceMetric40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class DeviceMetric extends VersionConvertor_40_50 { +public class DeviceMetric40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.DeviceMetric convertDeviceMetric(org.hl7.fhir.r4.model.DeviceMetric src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/DeviceRequest.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/DeviceRequest40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/DeviceRequest.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/DeviceRequest40_50.java index f7bc0f8c6..4d1772f56 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/DeviceRequest.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/DeviceRequest40_50.java @@ -52,7 +52,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class DeviceRequest extends VersionConvertor_40_50 { +public class DeviceRequest40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.DeviceRequest convertDeviceRequest(org.hl7.fhir.r4.model.DeviceRequest src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/DeviceUseStatement.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/DeviceUseStatement40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/DeviceUseStatement.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/DeviceUseStatement40_50.java index f2d84b558..d24fcc6e7 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/DeviceUseStatement.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/DeviceUseStatement40_50.java @@ -52,7 +52,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class DeviceUseStatement extends VersionConvertor_40_50 { +public class DeviceUseStatement40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.DeviceUseStatement convertDeviceUseStatement(org.hl7.fhir.r4.model.DeviceUseStatement src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/DiagnosticReport.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/DiagnosticReport40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/DiagnosticReport.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/DiagnosticReport40_50.java index a2bd32610..b449beca9 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/DiagnosticReport.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/DiagnosticReport40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class DiagnosticReport extends VersionConvertor_40_50 { +public class DiagnosticReport40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.DiagnosticReport convertDiagnosticReport(org.hl7.fhir.r4.model.DiagnosticReport src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/DocumentManifest.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/DocumentManifest40_50.java similarity index 96% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/DocumentManifest.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/DocumentManifest40_50.java index 074ad9b09..e60221443 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/DocumentManifest.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/DocumentManifest40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class DocumentManifest extends VersionConvertor_40_50 { +public class DocumentManifest40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.DocumentManifest convertDocumentManifest(org.hl7.fhir.r4.model.DocumentManifest src) throws FHIRException { if (src == null) @@ -64,7 +64,7 @@ public class DocumentManifest extends VersionConvertor_40_50 { for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(convertIdentifier(t)); } if (src.hasStatus()) - tgt.setStatus(Enumerations.convertDocumentReferenceStatus(src.getStatus())); + tgt.setStatus(Enumerations40_50.convertDocumentReferenceStatus(src.getStatus())); if (src.hasType()) tgt.setType(convertCodeableConcept(src.getType())); if (src.hasSubject()) @@ -101,7 +101,7 @@ public class DocumentManifest extends VersionConvertor_40_50 { for (org.hl7.fhir.r5.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(convertIdentifier(t)); } if (src.hasStatus()) - tgt.setStatus(Enumerations.convertDocumentReferenceStatus(src.getStatus())); + tgt.setStatus(Enumerations40_50.convertDocumentReferenceStatus(src.getStatus())); if (src.hasType()) tgt.setType(convertCodeableConcept(src.getType())); if (src.hasSubject()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/DocumentReference.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/DocumentReference40_50.java similarity index 98% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/DocumentReference.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/DocumentReference40_50.java index 905778029..6743c4a40 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/DocumentReference.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/DocumentReference40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class DocumentReference extends VersionConvertor_40_50 { +public class DocumentReference40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.DocumentReference convertDocumentReference(org.hl7.fhir.r4.model.DocumentReference src) throws FHIRException { if (src == null) @@ -64,7 +64,7 @@ public class DocumentReference extends VersionConvertor_40_50 { for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(convertIdentifier(t)); } if (src.hasStatus()) - tgt.setStatus(Enumerations.convertDocumentReferenceStatus(src.getStatus())); + tgt.setStatus(Enumerations40_50.convertDocumentReferenceStatus(src.getStatus())); if (src.hasDocStatus()) tgt.setDocStatus(convertReferredDocumentStatus(src.getDocStatus())); if (src.hasType()) @@ -110,7 +110,7 @@ public class DocumentReference extends VersionConvertor_40_50 { for (org.hl7.fhir.r5.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(convertIdentifier(t)); } if (src.hasStatus()) - tgt.setStatus(Enumerations.convertDocumentReferenceStatus(src.getStatus())); + tgt.setStatus(Enumerations40_50.convertDocumentReferenceStatus(src.getStatus())); if (src.hasDocStatus()) tgt.setDocStatus(convertReferredDocumentStatus(src.getDocStatus())); if (src.hasType()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Encounter.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Encounter40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Encounter.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Encounter40_50.java index 64bb74044..da8466502 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Encounter.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Encounter40_50.java @@ -52,7 +52,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class Encounter extends VersionConvertor_40_50 { +public class Encounter40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.Encounter convertEncounter(org.hl7.fhir.r4.model.Encounter src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Endpoint.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Endpoint40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Endpoint.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Endpoint40_50.java index e89311a8a..c7ca97215 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Endpoint.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Endpoint40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class Endpoint extends VersionConvertor_40_50 { +public class Endpoint40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.Endpoint convertEndpoint(org.hl7.fhir.r4.model.Endpoint src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/EnrollmentRequest.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/EnrollmentRequest40_50.java similarity index 98% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/EnrollmentRequest.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/EnrollmentRequest40_50.java index cd67c5c16..16e7df834 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/EnrollmentRequest.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/EnrollmentRequest40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class EnrollmentRequest extends VersionConvertor_40_50 { +public class EnrollmentRequest40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.EnrollmentRequest convertEnrollmentRequest(org.hl7.fhir.r4.model.EnrollmentRequest src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/EnrollmentResponse.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/EnrollmentResponse40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/EnrollmentResponse.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/EnrollmentResponse40_50.java index cc92ec611..d6922c655 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/EnrollmentResponse.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/EnrollmentResponse40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class EnrollmentResponse extends VersionConvertor_40_50 { +public class EnrollmentResponse40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.EnrollmentResponse convertEnrollmentResponse(org.hl7.fhir.r4.model.EnrollmentResponse src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Enumerations.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Enumerations40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Enumerations.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Enumerations40_50.java index b175b2aab..36694aeae 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Enumerations.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Enumerations40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class Enumerations extends VersionConvertor_40_50 { +public class Enumerations40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.Enumerations.BindingStrength convertBindingStrength(org.hl7.fhir.r4.model.Enumerations.BindingStrength src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/EpisodeOfCare.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/EpisodeOfCare40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/EpisodeOfCare.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/EpisodeOfCare40_50.java index d36de2fa2..6bffe37c4 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/EpisodeOfCare.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/EpisodeOfCare40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class EpisodeOfCare extends VersionConvertor_40_50 { +public class EpisodeOfCare40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.EpisodeOfCare convertEpisodeOfCare(org.hl7.fhir.r4.model.EpisodeOfCare src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/EventDefinition.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/EventDefinition40_50.java similarity index 97% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/EventDefinition.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/EventDefinition40_50.java index 1d6c822ad..40701b1a1 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/EventDefinition.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/EventDefinition40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class EventDefinition extends VersionConvertor_40_50 { +public class EventDefinition40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.EventDefinition convertEventDefinition(org.hl7.fhir.r4.model.EventDefinition src) throws FHIRException { if (src == null) @@ -72,7 +72,7 @@ public class EventDefinition extends VersionConvertor_40_50 { if (src.hasSubtitle()) tgt.setSubtitleElement(convertString(src.getSubtitleElement())); if (src.hasStatus()) - tgt.setStatus(Enumerations.convertPublicationStatus(src.getStatus())); + tgt.setStatus(Enumerations40_50.convertPublicationStatus(src.getStatus())); if (src.hasExperimental()) tgt.setExperimentalElement(convertBoolean(src.getExperimentalElement())); if (src.hasSubject()) @@ -147,7 +147,7 @@ public class EventDefinition extends VersionConvertor_40_50 { if (src.hasSubtitle()) tgt.setSubtitleElement(convertString(src.getSubtitleElement())); if (src.hasStatus()) - tgt.setStatus(Enumerations.convertPublicationStatus(src.getStatus())); + tgt.setStatus(Enumerations40_50.convertPublicationStatus(src.getStatus())); if (src.hasExperimental()) tgt.setExperimentalElement(convertBoolean(src.getExperimentalElement())); if (src.hasSubject()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ExampleScenario.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ExampleScenario40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ExampleScenario.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ExampleScenario40_50.java index 79d59bf5e..ff3a5bf83 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ExampleScenario.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ExampleScenario40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class ExampleScenario extends VersionConvertor_40_50 { +public class ExampleScenario40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.ExampleScenario convertExampleScenario(org.hl7.fhir.r4.model.ExampleScenario src) throws FHIRException { if (src == null) @@ -68,7 +68,7 @@ public class ExampleScenario extends VersionConvertor_40_50 { if (src.hasName()) tgt.setNameElement(convertString(src.getNameElement())); if (src.hasStatus()) - tgt.setStatus(Enumerations.convertPublicationStatus(src.getStatus())); + tgt.setStatus(Enumerations40_50.convertPublicationStatus(src.getStatus())); if (src.hasExperimental()) tgt.setExperimentalElement(convertBoolean(src.getExperimentalElement())); if (src.hasDate()) @@ -118,7 +118,7 @@ public class ExampleScenario extends VersionConvertor_40_50 { if (src.hasName()) tgt.setNameElement(convertString(src.getNameElement())); if (src.hasStatus()) - tgt.setStatus(Enumerations.convertPublicationStatus(src.getStatus())); + tgt.setStatus(Enumerations40_50.convertPublicationStatus(src.getStatus())); if (src.hasExperimental()) tgt.setExperimentalElement(convertBoolean(src.getExperimentalElement())); if (src.hasDate()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ExplanationOfBenefit.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ExplanationOfBenefit40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ExplanationOfBenefit.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ExplanationOfBenefit40_50.java index 2b04eedbd..d7d65d684 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ExplanationOfBenefit.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ExplanationOfBenefit40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class ExplanationOfBenefit extends VersionConvertor_40_50 { +public class ExplanationOfBenefit40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.ExplanationOfBenefit convertExplanationOfBenefit(org.hl7.fhir.r4.model.ExplanationOfBenefit src) throws FHIRException { if (src == null) @@ -1253,7 +1253,7 @@ public class ExplanationOfBenefit extends VersionConvertor_40_50 { if (src.hasNumber()) tgt.setNumberElement(convertPositiveInt(src.getNumberElement())); if (src.hasType()) - tgt.setType(Enumerations.convertNoteType(src.getType())); + tgt.setType(Enumerations40_50.convertNoteType(src.getType())); if (src.hasText()) tgt.setTextElement(convertString(src.getTextElement())); if (src.hasLanguage()) @@ -1269,7 +1269,7 @@ public class ExplanationOfBenefit extends VersionConvertor_40_50 { if (src.hasNumber()) tgt.setNumberElement(convertPositiveInt(src.getNumberElement())); if (src.hasType()) - tgt.setType(Enumerations.convertNoteType(src.getType())); + tgt.setType(Enumerations40_50.convertNoteType(src.getType())); if (src.hasText()) tgt.setTextElement(convertString(src.getTextElement())); if (src.hasLanguage()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/FamilyMemberHistory.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/FamilyMemberHistory40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/FamilyMemberHistory.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/FamilyMemberHistory40_50.java index a556e1440..0c42ae130 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/FamilyMemberHistory.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/FamilyMemberHistory40_50.java @@ -52,7 +52,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class FamilyMemberHistory extends VersionConvertor_40_50 { +public class FamilyMemberHistory40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.FamilyMemberHistory convertFamilyMemberHistory(org.hl7.fhir.r4.model.FamilyMemberHistory src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Flag.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Flag40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Flag.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Flag40_50.java index b1c2974d3..204732d50 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Flag.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Flag40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class Flag extends VersionConvertor_40_50 { +public class Flag40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.Flag convertFlag(org.hl7.fhir.r4.model.Flag src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Goal.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Goal40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Goal.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Goal40_50.java index 26396b15c..1234c39ce 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Goal.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Goal40_50.java @@ -52,7 +52,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class Goal extends VersionConvertor_40_50 { +public class Goal40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.Goal convertGoal(org.hl7.fhir.r4.model.Goal src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/GraphDefinition.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/GraphDefinition40_50.java similarity index 98% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/GraphDefinition.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/GraphDefinition40_50.java index 52b18c25a..380690c24 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/GraphDefinition.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/GraphDefinition40_50.java @@ -20,9 +20,6 @@ package org.hl7.fhir.convertors.conv40_50; * #L% */ import org.hl7.fhir.exceptions.FHIRException; -import org.hl7.fhir.r4.model.CodeType; -import org.hl7.fhir.r5.model.Enumeration; -import org.hl7.fhir.r5.model.Enumerations.ResourceTypeEnum; import org.hl7.fhir.convertors.VersionConvertor_40_50; /* @@ -54,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class GraphDefinition extends VersionConvertor_40_50 { +public class GraphDefinition40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.GraphDefinition convertGraphDefinition(org.hl7.fhir.r4.model.GraphDefinition src) throws FHIRException { if (src == null) @@ -68,7 +65,7 @@ public class GraphDefinition extends VersionConvertor_40_50 { if (src.hasName()) tgt.setNameElement(convertString(src.getNameElement())); if (src.hasStatus()) - tgt.setStatus(Enumerations.convertPublicationStatus(src.getStatus())); + tgt.setStatus(Enumerations40_50.convertPublicationStatus(src.getStatus())); if (src.hasExperimental()) tgt.setExperimentalElement(convertBoolean(src.getExperimentalElement())); if (src.hasDate()) @@ -110,7 +107,7 @@ public class GraphDefinition extends VersionConvertor_40_50 { if (src.hasName()) tgt.setNameElement(convertString(src.getNameElement())); if (src.hasStatus()) - tgt.setStatus(Enumerations.convertPublicationStatus(src.getStatus())); + tgt.setStatus(Enumerations40_50.convertPublicationStatus(src.getStatus())); if (src.hasExperimental()) tgt.setExperimentalElement(convertBoolean(src.getExperimentalElement())); if (src.hasDate()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Group.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Group40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Group.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Group40_50.java index 67fb7af8b..e3fd0c17c 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Group.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Group40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class Group extends VersionConvertor_40_50 { +public class Group40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.Group convertGroup(org.hl7.fhir.r4.model.Group src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/GuidanceResponse.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/GuidanceResponse40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/GuidanceResponse.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/GuidanceResponse40_50.java index 5ef91669e..5b82a9886 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/GuidanceResponse.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/GuidanceResponse40_50.java @@ -52,7 +52,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class GuidanceResponse extends VersionConvertor_40_50 { +public class GuidanceResponse40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.GuidanceResponse convertGuidanceResponse(org.hl7.fhir.r4.model.GuidanceResponse src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/HealthcareService.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/HealthcareService40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/HealthcareService.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/HealthcareService40_50.java index d83f74e9d..967da57d8 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/HealthcareService.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/HealthcareService40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class HealthcareService extends VersionConvertor_40_50 { +public class HealthcareService40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.HealthcareService convertHealthcareService(org.hl7.fhir.r4.model.HealthcareService src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ImagingStudy.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ImagingStudy40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ImagingStudy.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ImagingStudy40_50.java index c71a3d86b..c6cf3916e 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ImagingStudy.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ImagingStudy40_50.java @@ -53,7 +53,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class ImagingStudy extends VersionConvertor_40_50 { +public class ImagingStudy40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.ImagingStudy convertImagingStudy(org.hl7.fhir.r4.model.ImagingStudy src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Immunization.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Immunization40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Immunization.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Immunization40_50.java index f207f4193..3f7dd5b87 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Immunization.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Immunization40_50.java @@ -52,7 +52,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class Immunization extends VersionConvertor_40_50 { +public class Immunization40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.Immunization convertImmunization(org.hl7.fhir.r4.model.Immunization src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ImmunizationEvaluation.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ImmunizationEvaluation40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ImmunizationEvaluation.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ImmunizationEvaluation40_50.java index 94f329a0f..ef83c929c 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ImmunizationEvaluation.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ImmunizationEvaluation40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class ImmunizationEvaluation extends VersionConvertor_40_50 { +public class ImmunizationEvaluation40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.ImmunizationEvaluation convertImmunizationEvaluation(org.hl7.fhir.r4.model.ImmunizationEvaluation src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ImmunizationRecommendation.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ImmunizationRecommendation40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ImmunizationRecommendation.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ImmunizationRecommendation40_50.java index d471da93d..6354441c6 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ImmunizationRecommendation.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ImmunizationRecommendation40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class ImmunizationRecommendation extends VersionConvertor_40_50 { +public class ImmunizationRecommendation40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.ImmunizationRecommendation convertImmunizationRecommendation(org.hl7.fhir.r4.model.ImmunizationRecommendation src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ImplementationGuide.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ImplementationGuide40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ImplementationGuide.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ImplementationGuide40_50.java index ca698240c..bad117bb1 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ImplementationGuide.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ImplementationGuide40_50.java @@ -52,7 +52,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class ImplementationGuide extends VersionConvertor_40_50 { +public class ImplementationGuide40_50 extends VersionConvertor_40_50 { static final String EXT_IG_DEFINITION_PARAMETER = "http://hl7.org/fhir/tools/StructureDefinition/ig-parameter"; @@ -70,7 +70,7 @@ public class ImplementationGuide extends VersionConvertor_40_50 { if (src.hasTitle()) tgt.setTitleElement(convertString(src.getTitleElement())); if (src.hasStatus()) - tgt.setStatus(Enumerations.convertPublicationStatus(src.getStatus())); + tgt.setStatus(Enumerations40_50.convertPublicationStatus(src.getStatus())); if (src.hasExperimental()) tgt.setExperimentalElement(convertBoolean(src.getExperimentalElement())); if (src.hasDate()) @@ -95,7 +95,7 @@ public class ImplementationGuide extends VersionConvertor_40_50 { if (src.hasLicense()) tgt.setLicense(convertSPDXLicense(src.getLicense())); if (src.hasFhirVersion()) { - for (org.hl7.fhir.r4.model.Enumeration t : src.getFhirVersion()) copyElement(t, tgt.addFhirVersionElement().setValue(Enumerations.convertFHIRVersion(t.getValue()))); + for (org.hl7.fhir.r4.model.Enumeration t : src.getFhirVersion()) copyElement(t, tgt.addFhirVersionElement().setValue(Enumerations40_50.convertFHIRVersion(t.getValue()))); } if (src.hasDependsOn()) { for (org.hl7.fhir.r4.model.ImplementationGuide.ImplementationGuideDependsOnComponent t : src.getDependsOn()) tgt.addDependsOn(convertImplementationGuideDependsOnComponent(t)); @@ -124,7 +124,7 @@ public class ImplementationGuide extends VersionConvertor_40_50 { if (src.hasTitle()) tgt.setTitleElement(convertString(src.getTitleElement())); if (src.hasStatus()) - tgt.setStatus(Enumerations.convertPublicationStatus(src.getStatus())); + tgt.setStatus(Enumerations40_50.convertPublicationStatus(src.getStatus())); if (src.hasExperimental()) tgt.setExperimentalElement(convertBoolean(src.getExperimentalElement())); if (src.hasDate()) @@ -149,7 +149,7 @@ public class ImplementationGuide extends VersionConvertor_40_50 { if (src.hasLicense()) tgt.setLicense(convertSPDXLicense(src.getLicense())); if (src.hasFhirVersion()) { - for (org.hl7.fhir.r5.model.Enumeration t : src.getFhirVersion()) copyElement(t, tgt.addFhirVersionElement().setValue(Enumerations.convertFHIRVersion(t.getValue()))); + for (org.hl7.fhir.r5.model.Enumeration t : src.getFhirVersion()) copyElement(t, tgt.addFhirVersionElement().setValue(Enumerations40_50.convertFHIRVersion(t.getValue()))); } if (src.hasDependsOn()) { for (org.hl7.fhir.r5.model.ImplementationGuide.ImplementationGuideDependsOnComponent t : src.getDependsOn()) tgt.addDependsOn(convertImplementationGuideDependsOnComponent(t)); @@ -1709,7 +1709,7 @@ public class ImplementationGuide extends VersionConvertor_40_50 { if (src.hasReference()) tgt.setReference(convertReference(src.getReference())); if (src.hasFhirVersion()) { - for (org.hl7.fhir.r4.model.Enumeration t : src.getFhirVersion()) copyElement(t, tgt.addFhirVersionElement().setValue(Enumerations.convertFHIRVersion(t.getValue()))); + for (org.hl7.fhir.r4.model.Enumeration t : src.getFhirVersion()) copyElement(t, tgt.addFhirVersionElement().setValue(Enumerations40_50.convertFHIRVersion(t.getValue()))); } if (src.hasName()) tgt.setNameElement(convertString(src.getNameElement())); @@ -1730,7 +1730,7 @@ public class ImplementationGuide extends VersionConvertor_40_50 { if (src.hasReference()) tgt.setReference(convertReference(src.getReference())); if (src.hasFhirVersion()) { - for (org.hl7.fhir.r5.model.Enumeration t : src.getFhirVersion()) copyElement(t, tgt.addFhirVersionElement().setValue(Enumerations.convertFHIRVersion(t.getValue()))); + for (org.hl7.fhir.r5.model.Enumeration t : src.getFhirVersion()) copyElement(t, tgt.addFhirVersionElement().setValue(Enumerations40_50.convertFHIRVersion(t.getValue()))); } if (src.hasName()) tgt.setNameElement(convertString(src.getNameElement())); diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/InsurancePlan.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/InsurancePlan40_50.java similarity index 98% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/InsurancePlan.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/InsurancePlan40_50.java index 380faf047..54a08c75f 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/InsurancePlan.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/InsurancePlan40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class InsurancePlan extends VersionConvertor_40_50 { +public class InsurancePlan40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.InsurancePlan convertInsurancePlan(org.hl7.fhir.r4.model.InsurancePlan src) throws FHIRException { if (src == null) @@ -62,7 +62,7 @@ public class InsurancePlan extends VersionConvertor_40_50 { for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(convertIdentifier(t)); } if (src.hasStatus()) - tgt.setStatus(Enumerations.convertPublicationStatus(src.getStatus())); + tgt.setStatus(Enumerations40_50.convertPublicationStatus(src.getStatus())); if (src.hasType()) { for (org.hl7.fhir.r4.model.CodeableConcept t : src.getType()) tgt.addType(convertCodeableConcept(t)); } @@ -107,7 +107,7 @@ public class InsurancePlan extends VersionConvertor_40_50 { for (org.hl7.fhir.r5.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(convertIdentifier(t)); } if (src.hasStatus()) - tgt.setStatus(Enumerations.convertPublicationStatus(src.getStatus())); + tgt.setStatus(Enumerations40_50.convertPublicationStatus(src.getStatus())); if (src.hasType()) { for (org.hl7.fhir.r5.model.CodeableConcept t : src.getType()) tgt.addType(convertCodeableConcept(t)); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Invoice.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Invoice40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Invoice.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Invoice40_50.java index ac383766c..a9f19dcd8 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Invoice.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Invoice40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class Invoice extends VersionConvertor_40_50 { +public class Invoice40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.Invoice convertInvoice(org.hl7.fhir.r4.model.Invoice src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Library.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Library40_50.java similarity index 97% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Library.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Library40_50.java index d1a6dca19..008c52f38 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Library.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Library40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class Library extends VersionConvertor_40_50 { +public class Library40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.Library convertLibrary(org.hl7.fhir.r4.model.Library src) throws FHIRException { if (src == null) @@ -72,7 +72,7 @@ public class Library extends VersionConvertor_40_50 { if (src.hasSubtitle()) tgt.setSubtitleElement(convertString(src.getSubtitleElement())); if (src.hasStatus()) - tgt.setStatus(Enumerations.convertPublicationStatus(src.getStatus())); + tgt.setStatus(Enumerations40_50.convertPublicationStatus(src.getStatus())); if (src.hasExperimental()) tgt.setExperimentalElement(convertBoolean(src.getExperimentalElement())); if (src.hasType()) @@ -155,7 +155,7 @@ public class Library extends VersionConvertor_40_50 { if (src.hasSubtitle()) tgt.setSubtitleElement(convertString(src.getSubtitleElement())); if (src.hasStatus()) - tgt.setStatus(Enumerations.convertPublicationStatus(src.getStatus())); + tgt.setStatus(Enumerations40_50.convertPublicationStatus(src.getStatus())); if (src.hasExperimental()) tgt.setExperimentalElement(convertBoolean(src.getExperimentalElement())); if (src.hasType()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Linkage.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Linkage40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Linkage.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Linkage40_50.java index 3e7a6220f..446e739d1 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Linkage.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Linkage40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class Linkage extends VersionConvertor_40_50 { +public class Linkage40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.Linkage convertLinkage(org.hl7.fhir.r4.model.Linkage src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ListResource.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ListResource40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ListResource.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ListResource40_50.java index 0c52ba7d4..073e0d31a 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ListResource.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ListResource40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class ListResource extends VersionConvertor_40_50 { +public class ListResource40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.ListResource convertListResource(org.hl7.fhir.r4.model.ListResource src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Location.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Location40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Location.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Location40_50.java index 80ae14db3..92e38c4a6 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Location.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Location40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class Location extends VersionConvertor_40_50 { +public class Location40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.Location convertLocation(org.hl7.fhir.r4.model.Location src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Measure.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Measure40_50.java similarity index 98% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Measure.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Measure40_50.java index 8d78bb49a..fb06b6daa 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Measure.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Measure40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class Measure extends VersionConvertor_40_50 { +public class Measure40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.Measure convertMeasure(org.hl7.fhir.r4.model.Measure src) throws FHIRException { if (src == null) @@ -72,7 +72,7 @@ public class Measure extends VersionConvertor_40_50 { if (src.hasSubtitle()) tgt.setSubtitleElement(convertString(src.getSubtitleElement())); if (src.hasStatus()) - tgt.setStatus(Enumerations.convertPublicationStatus(src.getStatus())); + tgt.setStatus(Enumerations40_50.convertPublicationStatus(src.getStatus())); if (src.hasExperimental()) tgt.setExperimentalElement(convertBoolean(src.getExperimentalElement())); if (src.hasSubject()) @@ -177,7 +177,7 @@ public class Measure extends VersionConvertor_40_50 { if (src.hasSubtitle()) tgt.setSubtitleElement(convertString(src.getSubtitleElement())); if (src.hasStatus()) - tgt.setStatus(Enumerations.convertPublicationStatus(src.getStatus())); + tgt.setStatus(Enumerations40_50.convertPublicationStatus(src.getStatus())); if (src.hasExperimental()) tgt.setExperimentalElement(convertBoolean(src.getExperimentalElement())); if (src.hasSubject()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/MeasureReport.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/MeasureReport40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/MeasureReport.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/MeasureReport40_50.java index 2546b4c4f..01b8b828d 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/MeasureReport.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/MeasureReport40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class MeasureReport extends VersionConvertor_40_50 { +public class MeasureReport40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.MeasureReport convertMeasureReport(org.hl7.fhir.r4.model.MeasureReport src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Media.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Media40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Media.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Media40_50.java index 227b96e74..6c0d22497 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Media.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Media40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class Media extends VersionConvertor_40_50 { +public class Media40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.DocumentReference convertMedia(org.hl7.fhir.r4.model.Media src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Medication.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Medication40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Medication.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Medication40_50.java index 300396050..adb7c91dd 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Medication.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Medication40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class Medication extends VersionConvertor_40_50 { +public class Medication40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.Medication convertMedication(org.hl7.fhir.r4.model.Medication src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/MedicationAdministration.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/MedicationAdministration40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/MedicationAdministration.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/MedicationAdministration40_50.java index e4f93a584..3358fc5ea 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/MedicationAdministration.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/MedicationAdministration40_50.java @@ -56,7 +56,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class MedicationAdministration extends VersionConvertor_40_50 { +public class MedicationAdministration40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.MedicationAdministration convertMedicationAdministration(org.hl7.fhir.r4.model.MedicationAdministration src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/MedicationDispense.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/MedicationDispense40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/MedicationDispense.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/MedicationDispense40_50.java index 0f1ee6a7f..8d7967f96 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/MedicationDispense.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/MedicationDispense40_50.java @@ -54,7 +54,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class MedicationDispense extends VersionConvertor_40_50 { +public class MedicationDispense40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.MedicationDispense convertMedicationDispense(org.hl7.fhir.r4.model.MedicationDispense src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/MedicationKnowledge.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/MedicationKnowledge40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/MedicationKnowledge.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/MedicationKnowledge40_50.java index 7960712e8..b173b033f 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/MedicationKnowledge.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/MedicationKnowledge40_50.java @@ -54,7 +54,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class MedicationKnowledge extends VersionConvertor_40_50 { +public class MedicationKnowledge40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.MedicationKnowledge convertMedicationKnowledge(org.hl7.fhir.r4.model.MedicationKnowledge src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/MedicationRequest.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/MedicationRequest40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/MedicationRequest.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/MedicationRequest40_50.java index 95d65bfd5..2a7ed8b54 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/MedicationRequest.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/MedicationRequest40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class MedicationRequest extends VersionConvertor_40_50 { +public class MedicationRequest40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.MedicationRequest convertMedicationRequest(org.hl7.fhir.r4.model.MedicationRequest src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/MedicationStatement.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/MedicationStatement40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/MedicationStatement.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/MedicationStatement40_50.java index b3609202a..3e86f9c1b 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/MedicationStatement.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/MedicationStatement40_50.java @@ -52,7 +52,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class MedicationStatement extends VersionConvertor_40_50 { +public class MedicationStatement40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.MedicationUsage convertMedicationStatement(org.hl7.fhir.r4.model.MedicationStatement src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/MessageDefinition.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/MessageDefinition40_50.java similarity index 98% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/MessageDefinition.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/MessageDefinition40_50.java index 89bccffc5..7cafd13dd 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/MessageDefinition.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/MessageDefinition40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class MessageDefinition extends VersionConvertor_40_50 { +public class MessageDefinition40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.MessageDefinition convertMessageDefinition(org.hl7.fhir.r4.model.MessageDefinition src) throws FHIRException { if (src == null) @@ -73,7 +73,7 @@ public class MessageDefinition extends VersionConvertor_40_50 { for (org.hl7.fhir.r4.model.CanonicalType t : src.getReplaces()) tgt.getReplaces().add(convertCanonical(t)); } if (src.hasStatus()) - tgt.setStatus(Enumerations.convertPublicationStatus(src.getStatus())); + tgt.setStatus(Enumerations40_50.convertPublicationStatus(src.getStatus())); if (src.hasExperimental()) tgt.setExperimentalElement(convertBoolean(src.getExperimentalElement())); if (src.hasDate()) @@ -138,7 +138,7 @@ public class MessageDefinition extends VersionConvertor_40_50 { for (org.hl7.fhir.r5.model.CanonicalType t : src.getReplaces()) tgt.getReplaces().add(convertCanonical(t)); } if (src.hasStatus()) - tgt.setStatus(Enumerations.convertPublicationStatus(src.getStatus())); + tgt.setStatus(Enumerations40_50.convertPublicationStatus(src.getStatus())); if (src.hasExperimental()) tgt.setExperimentalElement(convertBoolean(src.getExperimentalElement())); if (src.hasDate()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/MessageHeader.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/MessageHeader40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/MessageHeader.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/MessageHeader40_50.java index d8f1bd8c0..6340257ab 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/MessageHeader.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/MessageHeader40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class MessageHeader extends VersionConvertor_40_50 { +public class MessageHeader40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.MessageHeader convertMessageHeader(org.hl7.fhir.r4.model.MessageHeader src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/MolecularSequence.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/MolecularSequence40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/MolecularSequence.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/MolecularSequence40_50.java index 24ad30970..518b0fedf 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/MolecularSequence.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/MolecularSequence40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class MolecularSequence extends VersionConvertor_40_50 { +public class MolecularSequence40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.MolecularSequence convertMolecularSequence(org.hl7.fhir.r4.model.MolecularSequence src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/NamingSystem.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/NamingSystem40_50.java similarity index 97% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/NamingSystem.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/NamingSystem40_50.java index bdc153e4b..6bd0f695b 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/NamingSystem.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/NamingSystem40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class NamingSystem extends VersionConvertor_40_50 { +public class NamingSystem40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.NamingSystem convertNamingSystem(org.hl7.fhir.r4.model.NamingSystem src) throws FHIRException { if (src == null) @@ -61,7 +61,7 @@ public class NamingSystem extends VersionConvertor_40_50 { if (src.hasName()) tgt.setNameElement(convertString(src.getNameElement())); if (src.hasStatus()) - tgt.setStatus(Enumerations.convertPublicationStatus(src.getStatus())); + tgt.setStatus(Enumerations40_50.convertPublicationStatus(src.getStatus())); if (src.hasKind()) tgt.setKind(convertNamingSystemType(src.getKind())); if (src.hasDate()) @@ -99,7 +99,7 @@ public class NamingSystem extends VersionConvertor_40_50 { if (src.hasName()) tgt.setNameElement(convertString(src.getNameElement())); if (src.hasStatus()) - tgt.setStatus(Enumerations.convertPublicationStatus(src.getStatus())); + tgt.setStatus(Enumerations40_50.convertPublicationStatus(src.getStatus())); if (src.hasKind()) tgt.setKind(convertNamingSystemType(src.getKind())); if (src.hasDate()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/NutritionOrder.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/NutritionOrder40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/NutritionOrder.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/NutritionOrder40_50.java index 0ce790ce6..37be4d4e3 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/NutritionOrder.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/NutritionOrder40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class NutritionOrder extends VersionConvertor_40_50 { +public class NutritionOrder40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.NutritionOrder convertNutritionOrder(org.hl7.fhir.r4.model.NutritionOrder src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Observation.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Observation40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Observation.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Observation40_50.java index 695a31c52..ef90be71c 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Observation.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Observation40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class Observation extends VersionConvertor_40_50 { +public class Observation40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.Observation convertObservation(org.hl7.fhir.r4.model.Observation src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ObservationDefinition.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ObservationDefinition40_50.java similarity index 98% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ObservationDefinition.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ObservationDefinition40_50.java index f326c6aa5..64b29d2d4 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ObservationDefinition.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ObservationDefinition40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class ObservationDefinition extends VersionConvertor_40_50 { +public class ObservationDefinition40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.ObservationDefinition convertObservationDefinition(org.hl7.fhir.r4.model.ObservationDefinition src) throws FHIRException { if (src == null) @@ -237,7 +237,7 @@ public class ObservationDefinition extends VersionConvertor_40_50 { for (org.hl7.fhir.r4.model.CodeableConcept t : src.getAppliesTo()) tgt.addAppliesTo(convertCodeableConcept(t)); } if (src.hasGender()) - tgt.setGender(Enumerations.convertAdministrativeGender(src.getGender())); + tgt.setGender(Enumerations40_50.convertAdministrativeGender(src.getGender())); if (src.hasAge()) tgt.setAge(convertRange(src.getAge())); if (src.hasGestationalAge()) @@ -262,7 +262,7 @@ public class ObservationDefinition extends VersionConvertor_40_50 { for (org.hl7.fhir.r5.model.CodeableConcept t : src.getAppliesTo()) tgt.addAppliesTo(convertCodeableConcept(t)); } if (src.hasGender()) - tgt.setGender(Enumerations.convertAdministrativeGender(src.getGender())); + tgt.setGender(Enumerations40_50.convertAdministrativeGender(src.getGender())); if (src.hasAge()) tgt.setAge(convertRange(src.getAge())); if (src.hasGestationalAge()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/OperationDefinition.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/OperationDefinition40_50.java similarity index 96% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/OperationDefinition.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/OperationDefinition40_50.java index cefe00227..5f6a471ae 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/OperationDefinition.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/OperationDefinition40_50.java @@ -21,12 +21,6 @@ package org.hl7.fhir.convertors.conv40_50; */ import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r5.model.CodeType; -import org.hl7.fhir.r5.model.Enumeration; -import org.hl7.fhir.r5.model.Enumerations.ResourceTypeEnum; -import java.text.DateFormat; -import java.text.ParseException; -import java.text.SimpleDateFormat; -import java.util.Date; import org.hl7.fhir.convertors.VersionConvertor_40_50; /* @@ -58,7 +52,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class OperationDefinition extends VersionConvertor_40_50 { +public class OperationDefinition40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.OperationDefinition convertOperationDefinition(org.hl7.fhir.r4.model.OperationDefinition src) throws FHIRException { if (src == null) @@ -74,7 +68,7 @@ public class OperationDefinition extends VersionConvertor_40_50 { if (src.hasTitle()) tgt.setTitleElement(convertString(src.getTitleElement())); if (src.hasStatus()) - tgt.setStatus(Enumerations.convertPublicationStatus(src.getStatus())); + tgt.setStatus(Enumerations40_50.convertPublicationStatus(src.getStatus())); if (src.hasKind()) tgt.setKind(convertOperationKind(src.getKind())); if (src.hasExperimental()) @@ -140,7 +134,7 @@ public class OperationDefinition extends VersionConvertor_40_50 { if (src.hasTitle()) tgt.setTitleElement(convertString(src.getTitleElement())); if (src.hasStatus()) - tgt.setStatus(Enumerations.convertPublicationStatus(src.getStatus())); + tgt.setStatus(Enumerations40_50.convertPublicationStatus(src.getStatus())); if (src.hasKind()) tgt.setKind(convertOperationKind(src.getKind())); if (src.hasExperimental()) @@ -239,7 +233,7 @@ public class OperationDefinition extends VersionConvertor_40_50 { for (org.hl7.fhir.r4.model.CanonicalType t : src.getTargetProfile()) tgt.getTargetProfile().add(convertCanonical(t)); } if (src.hasSearchType()) - tgt.setSearchType(Enumerations.convertSearchParamType(src.getSearchType())); + tgt.setSearchType(Enumerations40_50.convertSearchParamType(src.getSearchType())); if (src.hasBinding()) tgt.setBinding(convertOperationDefinitionParameterBindingComponent(src.getBinding())); if (src.hasReferencedFrom()) { @@ -272,7 +266,7 @@ public class OperationDefinition extends VersionConvertor_40_50 { for (org.hl7.fhir.r5.model.CanonicalType t : src.getTargetProfile()) tgt.getTargetProfile().add(convertCanonical(t)); } if (src.hasSearchType()) - tgt.setSearchType(Enumerations.convertSearchParamType(src.getSearchType())); + tgt.setSearchType(Enumerations40_50.convertSearchParamType(src.getSearchType())); if (src.hasBinding()) tgt.setBinding(convertOperationDefinitionParameterBindingComponent(src.getBinding())); if (src.hasReferencedFrom()) { @@ -316,7 +310,7 @@ public class OperationDefinition extends VersionConvertor_40_50 { org.hl7.fhir.r5.model.OperationDefinition.OperationDefinitionParameterBindingComponent tgt = new org.hl7.fhir.r5.model.OperationDefinition.OperationDefinitionParameterBindingComponent(); copyElement(src, tgt); if (src.hasStrength()) - tgt.setStrength(Enumerations.convertBindingStrength(src.getStrength())); + tgt.setStrength(Enumerations40_50.convertBindingStrength(src.getStrength())); if (src.hasValueSet()) tgt.setValueSetElement(convertCanonical(src.getValueSetElement())); return tgt; @@ -328,7 +322,7 @@ public class OperationDefinition extends VersionConvertor_40_50 { org.hl7.fhir.r4.model.OperationDefinition.OperationDefinitionParameterBindingComponent tgt = new org.hl7.fhir.r4.model.OperationDefinition.OperationDefinitionParameterBindingComponent(); copyElement(src, tgt); if (src.hasStrength()) - tgt.setStrength(Enumerations.convertBindingStrength(src.getStrength())); + tgt.setStrength(Enumerations40_50.convertBindingStrength(src.getStrength())); if (src.hasValueSet()) tgt.setValueSetElement(convertCanonical(src.getValueSetElement())); return tgt; diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/OperationOutcome.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/OperationOutcome40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/OperationOutcome.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/OperationOutcome40_50.java index e241230bf..89e8ec1fc 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/OperationOutcome.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/OperationOutcome40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class OperationOutcome extends VersionConvertor_40_50 { +public class OperationOutcome40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.OperationOutcome convertOperationOutcome(org.hl7.fhir.r4.model.OperationOutcome src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Organization.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Organization40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Organization.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Organization40_50.java index b9ced0f59..c0a9f5d38 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Organization.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Organization40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class Organization extends VersionConvertor_40_50 { +public class Organization40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.Organization convertOrganization(org.hl7.fhir.r4.model.Organization src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/OrganizationAffiliation.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/OrganizationAffiliation40_50.java similarity index 98% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/OrganizationAffiliation.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/OrganizationAffiliation40_50.java index 6688690eb..34849ed8d 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/OrganizationAffiliation.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/OrganizationAffiliation40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class OrganizationAffiliation extends VersionConvertor_40_50 { +public class OrganizationAffiliation40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.OrganizationAffiliation convertOrganizationAffiliation(org.hl7.fhir.r4.model.OrganizationAffiliation src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Parameters.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Parameters40_50.java similarity index 98% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Parameters.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Parameters40_50.java index 8326939c1..36124daaf 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Parameters.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Parameters40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class Parameters extends VersionConvertor_40_50 { +public class Parameters40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.Parameters convertParameters(org.hl7.fhir.r4.model.Parameters src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Patient.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Patient40_50.java similarity index 96% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Patient.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Patient40_50.java index 3138f846b..b47736535 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Patient.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Patient40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class Patient extends VersionConvertor_40_50 { +public class Patient40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.Patient convertPatient(org.hl7.fhir.r4.model.Patient src) throws FHIRException { if (src == null) @@ -70,7 +70,7 @@ public class Patient extends VersionConvertor_40_50 { for (org.hl7.fhir.r4.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(convertContactPoint(t)); } if (src.hasGender()) - tgt.setGender(Enumerations.convertAdministrativeGender(src.getGender())); + tgt.setGender(Enumerations40_50.convertAdministrativeGender(src.getGender())); if (src.hasBirthDate()) tgt.setBirthDateElement(convertDate(src.getBirthDateElement())); if (src.hasDeceased()) @@ -119,7 +119,7 @@ public class Patient extends VersionConvertor_40_50 { for (org.hl7.fhir.r5.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(convertContactPoint(t)); } if (src.hasGender()) - tgt.setGender(Enumerations.convertAdministrativeGender(src.getGender())); + tgt.setGender(Enumerations40_50.convertAdministrativeGender(src.getGender())); if (src.hasBirthDate()) tgt.setBirthDateElement(convertDate(src.getBirthDateElement())); if (src.hasDeceased()) @@ -167,7 +167,7 @@ public class Patient extends VersionConvertor_40_50 { if (src.hasAddress()) tgt.setAddress(convertAddress(src.getAddress())); if (src.hasGender()) - tgt.setGender(Enumerations.convertAdministrativeGender(src.getGender())); + tgt.setGender(Enumerations40_50.convertAdministrativeGender(src.getGender())); if (src.hasOrganization()) tgt.setOrganization(convertReference(src.getOrganization())); if (src.hasPeriod()) @@ -191,7 +191,7 @@ public class Patient extends VersionConvertor_40_50 { if (src.hasAddress()) tgt.setAddress(convertAddress(src.getAddress())); if (src.hasGender()) - tgt.setGender(Enumerations.convertAdministrativeGender(src.getGender())); + tgt.setGender(Enumerations40_50.convertAdministrativeGender(src.getGender())); if (src.hasOrganization()) tgt.setOrganization(convertReference(src.getOrganization())); if (src.hasPeriod()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/PaymentNotice.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/PaymentNotice40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/PaymentNotice.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/PaymentNotice40_50.java index 7130ea299..33279c1b3 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/PaymentNotice.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/PaymentNotice40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class PaymentNotice extends VersionConvertor_40_50 { +public class PaymentNotice40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.PaymentNotice convertPaymentNotice(org.hl7.fhir.r4.model.PaymentNotice src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/PaymentReconciliation.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/PaymentReconciliation40_50.java similarity index 98% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/PaymentReconciliation.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/PaymentReconciliation40_50.java index f5fa5067e..c75eb8478 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/PaymentReconciliation.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/PaymentReconciliation40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class PaymentReconciliation extends VersionConvertor_40_50 { +public class PaymentReconciliation40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.PaymentReconciliation convertPaymentReconciliation(org.hl7.fhir.r4.model.PaymentReconciliation src) throws FHIRException { if (src == null) @@ -265,7 +265,7 @@ public class PaymentReconciliation extends VersionConvertor_40_50 { org.hl7.fhir.r5.model.PaymentReconciliation.NotesComponent tgt = new org.hl7.fhir.r5.model.PaymentReconciliation.NotesComponent(); copyElement(src, tgt); if (src.hasType()) - tgt.setType(Enumerations.convertNoteType(src.getType())); + tgt.setType(Enumerations40_50.convertNoteType(src.getType())); if (src.hasText()) tgt.setTextElement(convertString(src.getTextElement())); return tgt; @@ -277,7 +277,7 @@ public class PaymentReconciliation extends VersionConvertor_40_50 { org.hl7.fhir.r4.model.PaymentReconciliation.NotesComponent tgt = new org.hl7.fhir.r4.model.PaymentReconciliation.NotesComponent(); copyElement(src, tgt); if (src.hasType()) - tgt.setType(Enumerations.convertNoteType(src.getType())); + tgt.setType(Enumerations40_50.convertNoteType(src.getType())); if (src.hasText()) tgt.setTextElement(convertString(src.getTextElement())); return tgt; diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Person.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Person40_50.java similarity index 97% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Person.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Person40_50.java index 49c5695e0..7a1a4ae95 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Person.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Person40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class Person extends VersionConvertor_40_50 { +public class Person40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.Person convertPerson(org.hl7.fhir.r4.model.Person src) throws FHIRException { if (src == null) @@ -68,7 +68,7 @@ public class Person extends VersionConvertor_40_50 { for (org.hl7.fhir.r4.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(convertContactPoint(t)); } if (src.hasGender()) - tgt.setGender(Enumerations.convertAdministrativeGender(src.getGender())); + tgt.setGender(Enumerations40_50.convertAdministrativeGender(src.getGender())); if (src.hasBirthDate()) tgt.setBirthDateElement(convertDate(src.getBirthDateElement())); if (src.hasAddress()) { @@ -101,7 +101,7 @@ public class Person extends VersionConvertor_40_50 { for (org.hl7.fhir.r5.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(convertContactPoint(t)); } if (src.hasGender()) - tgt.setGender(Enumerations.convertAdministrativeGender(src.getGender())); + tgt.setGender(Enumerations40_50.convertAdministrativeGender(src.getGender())); if (src.hasBirthDate()) tgt.setBirthDateElement(convertDate(src.getBirthDateElement())); if (src.hasAddress()) { diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/PlanDefinition.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/PlanDefinition40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/PlanDefinition.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/PlanDefinition40_50.java index aeb2ce217..7ca74fbdd 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/PlanDefinition.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/PlanDefinition40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class PlanDefinition extends VersionConvertor_40_50 { +public class PlanDefinition40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.PlanDefinition convertPlanDefinition(org.hl7.fhir.r4.model.PlanDefinition src) throws FHIRException { if (src == null) @@ -74,7 +74,7 @@ public class PlanDefinition extends VersionConvertor_40_50 { if (src.hasType()) tgt.setType(convertCodeableConcept(src.getType())); if (src.hasStatus()) - tgt.setStatus(Enumerations.convertPublicationStatus(src.getStatus())); + tgt.setStatus(Enumerations40_50.convertPublicationStatus(src.getStatus())); if (src.hasExperimental()) tgt.setExperimentalElement(convertBoolean(src.getExperimentalElement())); if (src.hasSubject()) @@ -157,7 +157,7 @@ public class PlanDefinition extends VersionConvertor_40_50 { if (src.hasType()) tgt.setType(convertCodeableConcept(src.getType())); if (src.hasStatus()) - tgt.setStatus(Enumerations.convertPublicationStatus(src.getStatus())); + tgt.setStatus(Enumerations40_50.convertPublicationStatus(src.getStatus())); if (src.hasExperimental()) tgt.setExperimentalElement(convertBoolean(src.getExperimentalElement())); if (src.hasSubject()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Practitioner.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Practitioner40_50.java similarity index 96% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Practitioner.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Practitioner40_50.java index 66c4c2389..10efe409d 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Practitioner.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Practitioner40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class Practitioner extends VersionConvertor_40_50 { +public class Practitioner40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.Practitioner convertPractitioner(org.hl7.fhir.r4.model.Practitioner src) throws FHIRException { if (src == null) @@ -73,7 +73,7 @@ public class Practitioner extends VersionConvertor_40_50 { for (org.hl7.fhir.r4.model.Address t : src.getAddress()) tgt.addAddress(convertAddress(t)); } if (src.hasGender()) - tgt.setGender(Enumerations.convertAdministrativeGender(src.getGender())); + tgt.setGender(Enumerations40_50.convertAdministrativeGender(src.getGender())); if (src.hasBirthDate()) tgt.setBirthDateElement(convertDate(src.getBirthDateElement())); if (src.hasPhoto()) { @@ -108,7 +108,7 @@ public class Practitioner extends VersionConvertor_40_50 { for (org.hl7.fhir.r5.model.Address t : src.getAddress()) tgt.addAddress(convertAddress(t)); } if (src.hasGender()) - tgt.setGender(Enumerations.convertAdministrativeGender(src.getGender())); + tgt.setGender(Enumerations40_50.convertAdministrativeGender(src.getGender())); if (src.hasBirthDate()) tgt.setBirthDateElement(convertDate(src.getBirthDateElement())); if (src.hasPhoto()) { diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/PractitionerRole.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/PractitionerRole40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/PractitionerRole.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/PractitionerRole40_50.java index c745815cd..cb715e407 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/PractitionerRole.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/PractitionerRole40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class PractitionerRole extends VersionConvertor_40_50 { +public class PractitionerRole40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.PractitionerRole convertPractitionerRole(org.hl7.fhir.r4.model.PractitionerRole src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Procedure.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Procedure40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Procedure.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Procedure40_50.java index fa89957b9..c5b19b288 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Procedure.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Procedure40_50.java @@ -52,7 +52,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class Procedure extends VersionConvertor_40_50 { +public class Procedure40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.Procedure convertProcedure(org.hl7.fhir.r4.model.Procedure src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Provenance.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Provenance40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Provenance.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Provenance40_50.java index 4658698be..a69963334 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Provenance.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Provenance40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class Provenance extends VersionConvertor_40_50 { +public class Provenance40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.Provenance convertProvenance(org.hl7.fhir.r4.model.Provenance src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Questionnaire.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Questionnaire40_50.java similarity index 98% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Questionnaire.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Questionnaire40_50.java index 0df3cbace..5e9b5c2a6 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Questionnaire.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Questionnaire40_50.java @@ -21,8 +21,6 @@ package org.hl7.fhir.convertors.conv40_50; */ import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r5.model.CodeType; -import org.hl7.fhir.r5.model.Enumeration; -import org.hl7.fhir.r5.model.Enumerations.ResourceTypeEnum; import org.hl7.fhir.convertors.VersionConvertor_40_50; /* @@ -54,7 +52,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class Questionnaire extends VersionConvertor_40_50 { +public class Questionnaire40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.Questionnaire convertQuestionnaire(org.hl7.fhir.r4.model.Questionnaire src) throws FHIRException { if (src == null) @@ -76,7 +74,7 @@ public class Questionnaire extends VersionConvertor_40_50 { for (org.hl7.fhir.r4.model.CanonicalType t : src.getDerivedFrom()) tgt.getDerivedFrom().add(convertCanonical(t)); } if (src.hasStatus()) - tgt.setStatus(Enumerations.convertPublicationStatus(src.getStatus())); + tgt.setStatus(Enumerations40_50.convertPublicationStatus(src.getStatus())); if (src.hasExperimental()) tgt.setExperimentalElement(convertBoolean(src.getExperimentalElement())); if (src.hasSubjectType()) { @@ -136,7 +134,7 @@ public class Questionnaire extends VersionConvertor_40_50 { for (org.hl7.fhir.r5.model.CanonicalType t : src.getDerivedFrom()) tgt.getDerivedFrom().add(convertCanonical(t)); } if (src.hasStatus()) - tgt.setStatus(Enumerations.convertPublicationStatus(src.getStatus())); + tgt.setStatus(Enumerations40_50.convertPublicationStatus(src.getStatus())); if (src.hasExperimental()) tgt.setExperimentalElement(convertBoolean(src.getExperimentalElement())); if (src.hasSubjectType()) { diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/QuestionnaireResponse.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/QuestionnaireResponse40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/QuestionnaireResponse.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/QuestionnaireResponse40_50.java index f55477211..fad4eed2b 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/QuestionnaireResponse.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/QuestionnaireResponse40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class QuestionnaireResponse extends VersionConvertor_40_50 { +public class QuestionnaireResponse40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.QuestionnaireResponse convertQuestionnaireResponse(org.hl7.fhir.r4.model.QuestionnaireResponse src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/RelatedPerson.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/RelatedPerson40_50.java similarity index 96% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/RelatedPerson.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/RelatedPerson40_50.java index 85631fd1c..35834b968 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/RelatedPerson.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/RelatedPerson40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class RelatedPerson extends VersionConvertor_40_50 { +public class RelatedPerson40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.RelatedPerson convertRelatedPerson(org.hl7.fhir.r4.model.RelatedPerson src) throws FHIRException { if (src == null) @@ -75,7 +75,7 @@ public class RelatedPerson extends VersionConvertor_40_50 { for (org.hl7.fhir.r4.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(convertContactPoint(t)); } if (src.hasGender()) - tgt.setGender(Enumerations.convertAdministrativeGender(src.getGender())); + tgt.setGender(Enumerations40_50.convertAdministrativeGender(src.getGender())); if (src.hasBirthDate()) tgt.setBirthDateElement(convertDate(src.getBirthDateElement())); if (src.hasAddress()) { @@ -114,7 +114,7 @@ public class RelatedPerson extends VersionConvertor_40_50 { for (org.hl7.fhir.r5.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(convertContactPoint(t)); } if (src.hasGender()) - tgt.setGender(Enumerations.convertAdministrativeGender(src.getGender())); + tgt.setGender(Enumerations40_50.convertAdministrativeGender(src.getGender())); if (src.hasBirthDate()) tgt.setBirthDateElement(convertDate(src.getBirthDateElement())); if (src.hasAddress()) { diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/RequestGroup.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/RequestGroup40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/RequestGroup.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/RequestGroup40_50.java index 76c693abc..66fc2b933 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/RequestGroup.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/RequestGroup40_50.java @@ -52,7 +52,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class RequestGroup extends VersionConvertor_40_50 { +public class RequestGroup40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.RequestGroup convertRequestGroup(org.hl7.fhir.r4.model.RequestGroup src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ResearchStudy.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ResearchStudy40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ResearchStudy.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ResearchStudy40_50.java index 5378ba25e..b56079cac 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ResearchStudy.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ResearchStudy40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class ResearchStudy extends VersionConvertor_40_50 { +public class ResearchStudy40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.ResearchStudy convertResearchStudy(org.hl7.fhir.r4.model.ResearchStudy src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ResearchSubject.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ResearchSubject40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ResearchSubject.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ResearchSubject40_50.java index 8d0c932ce..c02feb248 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ResearchSubject.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ResearchSubject40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class ResearchSubject extends VersionConvertor_40_50 { +public class ResearchSubject40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.ResearchSubject convertResearchSubject(org.hl7.fhir.r4.model.ResearchSubject src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/RiskAssessment.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/RiskAssessment40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/RiskAssessment.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/RiskAssessment40_50.java index 82f6ae748..e63c9941f 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/RiskAssessment.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/RiskAssessment40_50.java @@ -52,7 +52,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class RiskAssessment extends VersionConvertor_40_50 { +public class RiskAssessment40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.RiskAssessment convertRiskAssessment(org.hl7.fhir.r4.model.RiskAssessment src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Schedule.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Schedule40_50.java similarity index 98% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Schedule.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Schedule40_50.java index bd9da8077..045fbc908 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Schedule.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Schedule40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class Schedule extends VersionConvertor_40_50 { +public class Schedule40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.Schedule convertSchedule(org.hl7.fhir.r4.model.Schedule src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/SearchParameter.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/SearchParameter40_50.java similarity index 97% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/SearchParameter.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/SearchParameter40_50.java index 048abee91..aa5959d4d 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/SearchParameter.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/SearchParameter40_50.java @@ -21,9 +21,6 @@ package org.hl7.fhir.convertors.conv40_50; */ import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r5.model.CodeType; -import org.hl7.fhir.r5.model.Enumeration; -import org.hl7.fhir.r5.model.Enumerations.ResourceTypeEnum; -import org.hl7.fhir.r5.model.SearchParameter.SearchModifierCodeEnumFactory; import org.hl7.fhir.convertors.VersionConvertor_40_50; /* @@ -55,7 +52,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class SearchParameter extends VersionConvertor_40_50 { +public class SearchParameter40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.SearchParameter convertSearchParameter(org.hl7.fhir.r4.model.SearchParameter src) throws FHIRException { if (src == null) @@ -71,7 +68,7 @@ public class SearchParameter extends VersionConvertor_40_50 { if (src.hasDerivedFrom()) tgt.setDerivedFromElement(convertCanonical(src.getDerivedFromElement())); if (src.hasStatus()) - tgt.setStatus(Enumerations.convertPublicationStatus(src.getStatus())); + tgt.setStatus(Enumerations40_50.convertPublicationStatus(src.getStatus())); if (src.hasExperimental()) tgt.setExperimentalElement(convertBoolean(src.getExperimentalElement())); if (src.hasDate()) @@ -97,7 +94,7 @@ public class SearchParameter extends VersionConvertor_40_50 { for (org.hl7.fhir.r4.model.CodeType t : src.getBase()) tgt.getBase().add(convertResourceEnum(t)); } if (src.hasType()) - tgt.setType(Enumerations.convertSearchParamType(src.getType())); + tgt.setType(Enumerations40_50.convertSearchParamType(src.getType())); if (src.hasExpression()) tgt.setExpressionElement(convertString(src.getExpressionElement())); if (src.hasXpath()) @@ -140,7 +137,7 @@ public class SearchParameter extends VersionConvertor_40_50 { if (src.hasDerivedFrom()) tgt.setDerivedFromElement(convertCanonical(src.getDerivedFromElement())); if (src.hasStatus()) - tgt.setStatus(Enumerations.convertPublicationStatus(src.getStatus())); + tgt.setStatus(Enumerations40_50.convertPublicationStatus(src.getStatus())); if (src.hasExperimental()) tgt.setExperimentalElement(convertBoolean(src.getExperimentalElement())); if (src.hasDate()) @@ -166,7 +163,7 @@ public class SearchParameter extends VersionConvertor_40_50 { for (CodeType t : src.getBase()) tgt.getBase().add(convertResourceEnum(t)); } if (src.hasType()) - tgt.setType(Enumerations.convertSearchParamType(src.getType())); + tgt.setType(Enumerations40_50.convertSearchParamType(src.getType())); if (src.hasExpression()) tgt.setExpressionElement(convertString(src.getExpressionElement())); if (src.hasXpath()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ServiceRequest.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ServiceRequest40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ServiceRequest.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ServiceRequest40_50.java index 8544dbf18..d20d4c8a2 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ServiceRequest.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ServiceRequest40_50.java @@ -52,7 +52,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class ServiceRequest extends VersionConvertor_40_50 { +public class ServiceRequest40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.ServiceRequest convertServiceRequest(org.hl7.fhir.r4.model.ServiceRequest src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Slot.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Slot40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Slot.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Slot40_50.java index a242fd83c..2f624ed32 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Slot.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Slot40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class Slot extends VersionConvertor_40_50 { +public class Slot40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.Slot convertSlot(org.hl7.fhir.r4.model.Slot src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Specimen.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Specimen40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Specimen.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Specimen40_50.java index 295196afb..59e9da298 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Specimen.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Specimen40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class Specimen extends VersionConvertor_40_50 { +public class Specimen40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.Specimen convertSpecimen(org.hl7.fhir.r4.model.Specimen src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/SpecimenDefinition.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/SpecimenDefinition40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/SpecimenDefinition.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/SpecimenDefinition40_50.java index 1cf467d2d..29c028523 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/SpecimenDefinition.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/SpecimenDefinition40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class SpecimenDefinition extends VersionConvertor_40_50 { +public class SpecimenDefinition40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.SpecimenDefinition convertSpecimenDefinition(org.hl7.fhir.r4.model.SpecimenDefinition src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/StructureDefinition.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/StructureDefinition40_50.java similarity index 97% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/StructureDefinition.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/StructureDefinition40_50.java index 1aaae896d..9a703daad 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/StructureDefinition.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/StructureDefinition40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class StructureDefinition extends VersionConvertor_40_50 { +public class StructureDefinition40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.StructureDefinition convertStructureDefinition(org.hl7.fhir.r4.model.StructureDefinition src) throws FHIRException { if (src == null) @@ -70,7 +70,7 @@ public class StructureDefinition extends VersionConvertor_40_50 { if (src.hasTitle()) tgt.setTitleElement(convertString(src.getTitleElement())); if (src.hasStatus()) - tgt.setStatus(Enumerations.convertPublicationStatus(src.getStatus())); + tgt.setStatus(Enumerations40_50.convertPublicationStatus(src.getStatus())); if (src.hasExperimental()) tgt.setExperimentalElement(convertBoolean(src.getExperimentalElement())); if (src.hasDate()) @@ -96,7 +96,7 @@ public class StructureDefinition extends VersionConvertor_40_50 { for (org.hl7.fhir.r4.model.Coding t : src.getKeyword()) tgt.addKeyword(convertCoding(t)); } if (src.hasFhirVersion()) - tgt.setFhirVersion(Enumerations.convertFHIRVersion(src.getFhirVersion())); + tgt.setFhirVersion(Enumerations40_50.convertFHIRVersion(src.getFhirVersion())); if (src.hasMapping()) { for (org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionMappingComponent t : src.getMapping()) tgt.addMapping(convertStructureDefinitionMappingComponent(t)); } @@ -140,7 +140,7 @@ public class StructureDefinition extends VersionConvertor_40_50 { if (src.hasTitle()) tgt.setTitleElement(convertString(src.getTitleElement())); if (src.hasStatus()) - tgt.setStatus(Enumerations.convertPublicationStatus(src.getStatus())); + tgt.setStatus(Enumerations40_50.convertPublicationStatus(src.getStatus())); if (src.hasExperimental()) tgt.setExperimentalElement(convertBoolean(src.getExperimentalElement())); if (src.hasDate()) @@ -166,7 +166,7 @@ public class StructureDefinition extends VersionConvertor_40_50 { for (org.hl7.fhir.r5.model.Coding t : src.getKeyword()) tgt.addKeyword(convertCoding(t)); } if (src.hasFhirVersion()) - tgt.setFhirVersion(Enumerations.convertFHIRVersion(src.getFhirVersion())); + tgt.setFhirVersion(Enumerations40_50.convertFHIRVersion(src.getFhirVersion())); if (src.hasMapping()) { for (org.hl7.fhir.r5.model.StructureDefinition.StructureDefinitionMappingComponent t : src.getMapping()) tgt.addMapping(convertStructureDefinitionMappingComponent(t)); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/StructureMap.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/StructureMap40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/StructureMap.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/StructureMap40_50.java index c2873edd2..63ed88a73 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/StructureMap.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/StructureMap40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class StructureMap extends VersionConvertor_40_50 { +public class StructureMap40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.StructureMap convertStructureMap(org.hl7.fhir.r4.model.StructureMap src) throws FHIRException { if (src == null) @@ -70,7 +70,7 @@ public class StructureMap extends VersionConvertor_40_50 { if (src.hasTitle()) tgt.setTitleElement(convertString(src.getTitleElement())); if (src.hasStatus()) - tgt.setStatus(Enumerations.convertPublicationStatus(src.getStatus())); + tgt.setStatus(Enumerations40_50.convertPublicationStatus(src.getStatus())); if (src.hasExperimental()) tgt.setExperimentalElement(convertBoolean(src.getExperimentalElement())); if (src.hasDate()) @@ -121,7 +121,7 @@ public class StructureMap extends VersionConvertor_40_50 { if (src.hasTitle()) tgt.setTitleElement(convertString(src.getTitleElement())); if (src.hasStatus()) - tgt.setStatus(Enumerations.convertPublicationStatus(src.getStatus())); + tgt.setStatus(Enumerations40_50.convertPublicationStatus(src.getStatus())); if (src.hasExperimental()) tgt.setExperimentalElement(convertBoolean(src.getExperimentalElement())); if (src.hasDate()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Substance.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Substance40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Substance.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Substance40_50.java index d348418a6..e821b0fe9 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Substance.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Substance40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class Substance extends VersionConvertor_40_50 { +public class Substance40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.Substance convertSubstance(org.hl7.fhir.r4.model.Substance src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/SubstanceNucleicAcid.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/SubstanceNucleicAcid40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/SubstanceNucleicAcid.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/SubstanceNucleicAcid40_50.java index badf5329f..3dce0d337 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/SubstanceNucleicAcid.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/SubstanceNucleicAcid40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class SubstanceNucleicAcid extends VersionConvertor_40_50 { +public class SubstanceNucleicAcid40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.SubstanceNucleicAcid convertSubstanceNucleicAcid(org.hl7.fhir.r4.model.SubstanceNucleicAcid src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/SubstancePolymer.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/SubstancePolymer40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/SubstancePolymer.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/SubstancePolymer40_50.java index 9b37586e1..1d250b608 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/SubstancePolymer.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/SubstancePolymer40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class SubstancePolymer extends VersionConvertor_40_50 { +public class SubstancePolymer40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.SubstancePolymer convertSubstancePolymer(org.hl7.fhir.r4.model.SubstancePolymer src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/SubstanceProtein.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/SubstanceProtein40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/SubstanceProtein.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/SubstanceProtein40_50.java index 5d805529c..9e1a0d507 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/SubstanceProtein.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/SubstanceProtein40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class SubstanceProtein extends VersionConvertor_40_50 { +public class SubstanceProtein40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.SubstanceProtein convertSubstanceProtein(org.hl7.fhir.r4.model.SubstanceProtein src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/SubstanceReferenceInformation.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/SubstanceReferenceInformation40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/SubstanceReferenceInformation.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/SubstanceReferenceInformation40_50.java index 38a62793e..359b28950 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/SubstanceReferenceInformation.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/SubstanceReferenceInformation40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class SubstanceReferenceInformation extends VersionConvertor_40_50 { +public class SubstanceReferenceInformation40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.SubstanceReferenceInformation convertSubstanceReferenceInformation(org.hl7.fhir.r4.model.SubstanceReferenceInformation src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/SubstanceSourceMaterial.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/SubstanceSourceMaterial40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/SubstanceSourceMaterial.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/SubstanceSourceMaterial40_50.java index 0bb3521aa..fd8c5b24f 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/SubstanceSourceMaterial.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/SubstanceSourceMaterial40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class SubstanceSourceMaterial extends VersionConvertor_40_50 { +public class SubstanceSourceMaterial40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.SubstanceSourceMaterial convertSubstanceSourceMaterial(org.hl7.fhir.r4.model.SubstanceSourceMaterial src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/SupplyDelivery.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/SupplyDelivery40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/SupplyDelivery.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/SupplyDelivery40_50.java index 26e7eb932..7b194e27b 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/SupplyDelivery.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/SupplyDelivery40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class SupplyDelivery extends VersionConvertor_40_50 { +public class SupplyDelivery40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.SupplyDelivery convertSupplyDelivery(org.hl7.fhir.r4.model.SupplyDelivery src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/SupplyRequest.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/SupplyRequest40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/SupplyRequest.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/SupplyRequest40_50.java index 39eb0f01e..2c035ce04 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/SupplyRequest.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/SupplyRequest40_50.java @@ -52,7 +52,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class SupplyRequest extends VersionConvertor_40_50 { +public class SupplyRequest40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.SupplyRequest convertSupplyRequest(org.hl7.fhir.r4.model.SupplyRequest src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Task.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Task40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Task.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Task40_50.java index 4cc12c0d0..43f247fc4 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Task.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/Task40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class Task extends VersionConvertor_40_50 { +public class Task40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.Task convertTask(org.hl7.fhir.r4.model.Task src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/TerminologyCapabilities.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/TerminologyCapabilities40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/TerminologyCapabilities.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/TerminologyCapabilities40_50.java index bebe6b906..1a55f02e9 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/TerminologyCapabilities.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/TerminologyCapabilities40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class TerminologyCapabilities extends VersionConvertor_40_50 { +public class TerminologyCapabilities40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.TerminologyCapabilities convertTerminologyCapabilities(org.hl7.fhir.r4.model.TerminologyCapabilities src) throws FHIRException { if (src == null) @@ -67,7 +67,7 @@ public class TerminologyCapabilities extends VersionConvertor_40_50 { if (src.hasTitle()) tgt.setTitleElement(convertString(src.getTitleElement())); if (src.hasStatus()) - tgt.setStatus(Enumerations.convertPublicationStatus(src.getStatus())); + tgt.setStatus(Enumerations40_50.convertPublicationStatus(src.getStatus())); if (src.hasExperimental()) tgt.setExperimentalElement(convertBoolean(src.getExperimentalElement())); if (src.hasDate()) @@ -127,7 +127,7 @@ public class TerminologyCapabilities extends VersionConvertor_40_50 { if (src.hasTitle()) tgt.setTitleElement(convertString(src.getTitleElement())); if (src.hasStatus()) - tgt.setStatus(Enumerations.convertPublicationStatus(src.getStatus())); + tgt.setStatus(Enumerations40_50.convertPublicationStatus(src.getStatus())); if (src.hasExperimental()) tgt.setExperimentalElement(convertBoolean(src.getExperimentalElement())); if (src.hasDate()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/TestReport.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/TestReport40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/TestReport.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/TestReport40_50.java index c93165a23..259d2f56c 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/TestReport.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/TestReport40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class TestReport extends VersionConvertor_40_50 { +public class TestReport40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.TestReport convertTestReport(org.hl7.fhir.r4.model.TestReport src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/TestScript.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/TestScript40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/TestScript.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/TestScript40_50.java index fb1c5bce0..f857b1c0e 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/TestScript.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/TestScript40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class TestScript extends VersionConvertor_40_50 { +public class TestScript40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.TestScript convertTestScript(org.hl7.fhir.r4.model.TestScript src) throws FHIRException { if (src == null) @@ -69,7 +69,7 @@ public class TestScript extends VersionConvertor_40_50 { if (src.hasTitle()) tgt.setTitleElement(convertString(src.getTitleElement())); if (src.hasStatus()) - tgt.setStatus(Enumerations.convertPublicationStatus(src.getStatus())); + tgt.setStatus(Enumerations40_50.convertPublicationStatus(src.getStatus())); if (src.hasExperimental()) tgt.setExperimentalElement(convertBoolean(src.getExperimentalElement())); if (src.hasDate()) @@ -134,7 +134,7 @@ public class TestScript extends VersionConvertor_40_50 { if (src.hasTitle()) tgt.setTitleElement(convertString(src.getTitleElement())); if (src.hasStatus()) - tgt.setStatus(Enumerations.convertPublicationStatus(src.getStatus())); + tgt.setStatus(Enumerations40_50.convertPublicationStatus(src.getStatus())); if (src.hasExperimental()) tgt.setExperimentalElement(convertBoolean(src.getExperimentalElement())); if (src.hasDate()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ValueSet.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ValueSet40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ValueSet.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ValueSet40_50.java index 429e7abeb..e75e48b6f 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ValueSet.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/ValueSet40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class ValueSet extends VersionConvertor_40_50 { +public class ValueSet40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.ValueSet convertValueSet(org.hl7.fhir.r4.model.ValueSet src) throws FHIRException { if (src == null) @@ -70,7 +70,7 @@ public class ValueSet extends VersionConvertor_40_50 { if (src.hasTitle()) tgt.setTitleElement(convertString(src.getTitleElement())); if (src.hasStatus()) - tgt.setStatus(Enumerations.convertPublicationStatus(src.getStatus())); + tgt.setStatus(Enumerations40_50.convertPublicationStatus(src.getStatus())); if (src.hasExperimental()) tgt.setExperimentalElement(convertBoolean(src.getExperimentalElement())); if (src.hasDate()) @@ -118,7 +118,7 @@ public class ValueSet extends VersionConvertor_40_50 { if (src.hasTitle()) tgt.setTitleElement(convertString(src.getTitleElement())); if (src.hasStatus()) - tgt.setStatus(Enumerations.convertPublicationStatus(src.getStatus())); + tgt.setStatus(Enumerations40_50.convertPublicationStatus(src.getStatus())); if (src.hasExperimental()) tgt.setExperimentalElement(convertBoolean(src.getExperimentalElement())); if (src.hasDate()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/VerificationResult.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/VerificationResult40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/VerificationResult.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/VerificationResult40_50.java index c797ef28b..d6c6304e4 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/VerificationResult.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/VerificationResult40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class VerificationResult extends VersionConvertor_40_50 { +public class VerificationResult40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.VerificationResult convertVerificationResult(org.hl7.fhir.r4.model.VerificationResult src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/VisionPrescription.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/VisionPrescription40_50.java similarity index 99% rename from org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/VisionPrescription.java rename to org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/VisionPrescription40_50.java index 0c7c9d50e..b677301d8 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/VisionPrescription.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/VisionPrescription40_50.java @@ -51,7 +51,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50; */ // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class VisionPrescription extends VersionConvertor_40_50 { +public class VisionPrescription40_50 extends VersionConvertor_40_50 { public static org.hl7.fhir.r5.model.VisionPrescription convertVisionPrescription(org.hl7.fhir.r4.model.VisionPrescription src) throws FHIRException { if (src == null) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/parser/Parser.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/parser/Parser.java new file mode 100644 index 000000000..2bb1490fd --- /dev/null +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/parser/Parser.java @@ -0,0 +1,1743 @@ +package org.hl7.fhir.convertors.parser; + +import com.github.javaparser.StaticJavaParser; +import com.github.javaparser.ast.*; +import com.github.javaparser.ast.body.*; +import com.github.javaparser.ast.comments.Comment; +import com.github.javaparser.ast.expr.Expression; +import com.github.javaparser.ast.expr.MethodCallExpr; +import com.github.javaparser.ast.expr.NameExpr; +import com.github.javaparser.ast.nodeTypes.NodeWithIdentifier; +import com.github.javaparser.ast.nodeTypes.NodeWithName; +import com.github.javaparser.ast.nodeTypes.NodeWithSimpleName; +import com.github.javaparser.ast.nodeTypes.modifiers.NodeWithStaticModifier; +import com.github.javaparser.ast.stmt.*; +import com.github.javaparser.ast.type.Type; +import com.github.javaparser.ast.type.VarType; +import com.github.javaparser.ast.visitor.ModifierVisitor; +import com.github.javaparser.ast.visitor.Visitable; +import com.github.javaparser.ast.visitor.VoidVisitorAdapter; +import com.github.javaparser.resolution.declarations.ResolvedMethodDeclaration; +import com.github.javaparser.symbolsolver.JavaSymbolSolver; +import com.github.javaparser.symbolsolver.javaparsermodel.declarations.JavaParserMethodDeclaration; +import com.github.javaparser.symbolsolver.model.resolution.TypeSolver; +import com.github.javaparser.symbolsolver.resolution.typesolvers.CombinedTypeSolver; +import com.github.javaparser.symbolsolver.resolution.typesolvers.JarTypeSolver; +import com.github.javaparser.symbolsolver.resolution.typesolvers.JavaParserTypeSolver; +import com.github.javaparser.symbolsolver.resolution.typesolvers.ReflectionTypeSolver; +import org.hl7.fhir.dstu3.model.Enumeration; +import org.hl7.fhir.dstu3.model.MedicationAdministration; + +import java.io.*; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.*; +import java.util.concurrent.ConcurrentHashMap; +import java.util.function.Function; +import java.util.function.Predicate; +import java.util.stream.Collectors; +import java.util.stream.Stream; + +/** + * TODO Line auditing function, try copying based on line numbers and based on MethodDeclr, and compare the outputs + */ +public class Parser { + + public static final String ELEMENT = "Element"; + private static final String RESOURCE_FILE_FORMAT = "_%s"; //TODO fix + private static final List VERSION_FILES = Arrays.asList("10_30", "10_40", "10_50", "14_30", "14_40", "14_50", "30_40", "30_50", "40_50"); + private static final List BASE_TYPES = Arrays.asList("Base64Binary", "Boolean", "Canonical", "Code", + "Enumeration", "Date", "DateType", "Decimal", "Id", "Instant", "Integer", "Integer64", + "Markdown", "Oid", "PositiveInt", "String", "Time", "UnsignedInt", "Uri", "Url", + "Uuid", "XhtmlNode"); + + private static org.hl7.fhir.r5.model.Enumeration + convertMedicationAdministrationStatus(org.hl7.fhir.dstu3.model.Enumeration src) { + if (src == null) + return null; + org.hl7.fhir.r5.model.Enumeration tgt + = new org.hl7.fhir.r5.model.Enumeration(); + copyElement(src, tgt); + tgt.setValue(org.hl7.fhir.r5.model.MedicationAdministration.MedicationAdministrationStatusCodes.fromCode(src.getValueAsString())); + return tgt; + } + + private static void copyElement(Enumeration src, + org.hl7.fhir.r5.model.Enumeration tgt) { + + } + + + /** + * @param args + */ + public static void main(String[] args) { + /* + * every tgt.setX(convertT(src.getX)) should be dependent on a hasX - in principle that doesn't matter when you're + * dealing with singleton elements if convertT checks for null and setX accepts null - which *should* be the case. + * But there's enough special cases and other things that I have a lot less bugs where we always do if (src.hasX()) + */ + + List listOfPrimitiveTypes = BASE_TYPES;//getListOfPrimitiveTypes(); + + try { + initializeResolver(new File("").getAbsolutePath(), DIRECTORY_WHERE_THE_CODE_LIVES); + } catch (IOException e) { + e.printStackTrace(); + } + + System.out.println("get to version AuditEvent10_30 :: " + getModelImportToVersion("AuditEvent10_30")); + System.out.println("get from version AuditEvent10_30 :: " + getModelImportFromVersion("AuditEvent10_30")); + + +// VERSION_FILES.forEach(version -> { +// //String version = "10_30"; +// List filenames = listAllJavaFilesInDirectory(new File("").getAbsolutePath() + "/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv" + version + "/"); +// Collections.sort(filenames); +// filenames.forEach(name -> { +// try { +// modifyElementNotField("/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv" + version + "/", name, ".java", listOfPrimitiveTypes, version); +// } catch (FileNotFoundException e) { +// e.printStackTrace(); +// } +// }); +// }); +// + try { + modifyElementNotField("/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/", "Account40_50", ".java", listOfPrimitiveTypes, "10_30"); +// modifyElementNotField("/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/", "AuditEvent10_30", ".java", listOfPrimitiveTypes, "10_30"); +// modifyElementNotField("/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/", "Binary10_30", ".java", listOfPrimitiveTypes, "10_30"); +// modifyElementNotField("/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/", "Bundle10_30", ".java", listOfPrimitiveTypes, "10_30"); +// modifyElementNotField("/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/", "ClinicalImpression10_30", ".java", listOfPrimitiveTypes, "10_30"); +// modifyElementNotField("/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/", "Communication10_30", ".java", listOfPrimitiveTypes, "10_30"); + } catch (Exception e) { + System.out.println(); + } + System.out.println(); + } + + public static void modifyElementNotField(String srcdirectory, String filename, String extension, List listOfPrimitiveTypes, String version) throws FileNotFoundException { + System.out.println("File :: " + filename); + + String projectDirectory = new File("").getAbsolutePath(); + long start = System.currentTimeMillis(); + + CompilationUnit compilationUnit = getCompilationUnit(projectDirectory + srcdirectory + filename + extension); + ClassOrInterfaceDeclaration classOrInterfaceDeclaration = initializeTypeSovlerAndParser(compilationUnit, + projectDirectory, srcdirectory, filename); + + MethodDeclaration declaration = null; + + try { + declaration = classOrInterfaceDeclaration.getMethods().stream() + .filter(md -> md.getNameAsString().equals("convert" + extractName(filename))) + .findFirst().get(); + } catch (Exception e) { + System.out.println(); + } + + String lowerVersionTypeAbsPath = getLowerVersionAbsPathFromImportStatement(declaration.getTypeAsString(), declaration.getParameter(0).getTypeAsString(), version); + String higherVersionTypeAbsPath = getHigherVersionAbsPath(declaration.getTypeAsString(), declaration.getParameter(0).getTypeAsString(), version); + + CompilationUnit lowerCU = StaticJavaParser.parse(new File(lowerVersionTypeAbsPath)); + CompilationUnit higherCU = StaticJavaParser.parse(new File(higherVersionTypeAbsPath)); + + List methods = classOrInterfaceDeclaration.getMethods(); + for (MethodDeclaration md : methods) { + + String type = resolveInnerType(md.getType()).asString(); + String param = resolveInnerType(md.getParameter(0).getType()).asString(); + if (type == "void") continue; + try { + type = !type.contains(".") ? resolveInnerType(md.getType()).resolve().asReferenceType().getQualifiedName() : type; + } catch (Exception e) { + System.out.println(); + } + + param = !param.contains(".") ? resolveInnerType(md.getParameter(0).getType()).resolve().asReferenceType().getQualifiedName() : param; + + String absFilePathOfClassMethodIsConvertingTo = importStatementToAbsolutePath(type); + String absFilePathOfClassMethodIsConvertingFrom = importStatementToAbsolutePath(param); + String classNameMethodIsConvertingTo = absFilePathOfClassMethodIsConvertingTo.substring(absFilePathOfClassMethodIsConvertingTo.lastIndexOf('/') + 1, absFilePathOfClassMethodIsConvertingTo.lastIndexOf('.')); + String classNameMethodIsConvertingFrom = absFilePathOfClassMethodIsConvertingFrom.substring(absFilePathOfClassMethodIsConvertingFrom.lastIndexOf('/') + 1, absFilePathOfClassMethodIsConvertingFrom.lastIndexOf('.')); + + ClassOrInterfaceDeclaration toTypeClass = null; + ClassOrInterfaceDeclaration fromTypeClass = null; + + String highBackupModelDirectoryToSearch = higherVersionTypeAbsPath.substring(0, higherVersionTypeAbsPath.lastIndexOf('/') + 1); + String lowBackupModelDirectoryToSearch = lowerVersionTypeAbsPath.substring(0, lowerVersionTypeAbsPath.lastIndexOf('/') + 1); + + Node declaration1 = null; + Node declaration2 = null; + boolean isEnum = false; + + try { + if (getVersionStringFromPath(lowerVersionTypeAbsPath).equals(getVersionStringFromPath(absFilePathOfClassMethodIsConvertingTo))) { + declaration1 = getDeclaration(lowerCU, classNameMethodIsConvertingTo, lowBackupModelDirectoryToSearch); + } else { + declaration1 = getDeclaration(higherCU, classNameMethodIsConvertingTo, highBackupModelDirectoryToSearch); + } + + if (getVersionStringFromPath(lowerVersionTypeAbsPath).equals(getVersionStringFromPath(absFilePathOfClassMethodIsConvertingFrom))) { + declaration2 = getDeclaration(lowerCU, classNameMethodIsConvertingFrom, lowBackupModelDirectoryToSearch); + } else { + declaration2 = getDeclaration(higherCU, classNameMethodIsConvertingFrom, highBackupModelDirectoryToSearch); + } + } catch (FileNotFoundException e) { + System.out.println(e.getMessage()); + } + + if (declaration1 instanceof ClassOrInterfaceDeclaration) { + toTypeClass = (ClassOrInterfaceDeclaration) declaration1; + } else if (declaration1 instanceof EnumDeclaration) { + isEnum = true; + System.out.println("Filename " + filename + " target String " + classNameMethodIsConvertingTo + ", is an EnumDeclaration"); + } + if (declaration2 instanceof ClassOrInterfaceDeclaration) { + fromTypeClass = (ClassOrInterfaceDeclaration) declaration2; + } else if (declaration2 instanceof EnumDeclaration) { + isEnum = true; + System.out.println("Filename " + filename + " target String " + classNameMethodIsConvertingTo + ", is an EnumDeclaration"); + } + + if ((toTypeClass == null || fromTypeClass == null) && !isEnum) { + System.out.println(); + } else if (!isEnum) { + System.out.println("FROM " + fromTypeClass.getNameAsString()); + System.out.println("TO " + toTypeClass.getNameAsString()); + } + + if (toTypeClass != null && fromTypeClass != null) { + ClassOrInterfaceDeclaration finalFromTypeClass = fromTypeClass; + ClassOrInterfaceDeclaration finalToTypeClass = toTypeClass; + md.accept(new ModifierVisitor() { + @Override + public Visitable visit(IfStmt ifStmt, Void arg) { + super.visit(ifStmt, arg); + Expression condition = ifStmt.getCondition(); + Statement thenStmt = ifStmt.getThenStmt(); + + if (thenStmt instanceof ReturnStmt) { + } else if (thenStmt instanceof IfStmt) { + } else if (thenStmt instanceof ForEachStmt) { + } else if (thenStmt instanceof BlockStmt) { + } else if (thenStmt instanceof ExpressionStmt) { + } else if (thenStmt instanceof TryStmt) { + } else if (thenStmt instanceof ThrowStmt) { +// if (thenStmt instanceof ForEachStmt) { +// System.out.println(); +// } else { +// thenStmt.accept(new VoidVisitorAdapter() { +// @Override +// public void visit(ExpressionStmt n, Void arg) { +// super.visit(n, arg); +// n.getExpression(); +// System.out.println(); +// } +// }, null); +// } + } else { + System.out.println("You haven't caught this then statement case yet."); + System.exit(0); + } + + return ifStmt; + } + }, null); + } + + //System.out.println("Execution time :: " + (System.currentTimeMillis() - start) / 1000); + + } + } + + public static Type resolveInnerType(Type type) { + Type toReturn = type; + if (type.toString().contains("List") && !type.toString().contains("List_") && !type.toString().contains("ListResource")) { + try { + toReturn = (Type) type.getChildNodes().get(1); + } catch (Exception e) { + System.out.println(); + } + } + return toReturn; + } + + public static String removeListToGetTypeString(String type) { + if (type.contains("List")) { + type = type.replaceAll("List", "").replaceAll("<", "").replaceAll(">", ""); + } + return type; + } + + public static boolean methodExistsInClass(ClassOrInterfaceDeclaration c, String methodName) { + Optional first = c.getMethods().stream() + .filter(md -> md.getNameAsString().equals(methodName)) + .findAny(); + return first.isPresent(); + } + + public static MethodDeclaration getMethod(ClassOrInterfaceDeclaration c, String methodName) { + if (!methodExistsInClass(c, methodName)) { + throw new IllegalStateException("Cannot get a method " + methodName + " in class " + c.getNameAsString() + " doesn't exist in class."); + } + return c.getMethods().stream() + .filter(md -> md.getNameAsString().equals(methodName)) + .findFirst().get(); + } + + public static TypeDeclaration getDeclaration(CompilationUnit cu, String targetNodeString, String backupModelDirectory) throws FileNotFoundException { + if (targetNodeString.contains(".")) { + return null; + // not handling this + } + + if (cu.getClassByName(targetNodeString).isPresent()) { + return (TypeDeclaration) cu.getClassByName(targetNodeString).get(); + } + + TypeDeclaration td = getClassOrEnumNodeThatExistsWithin(cu, targetNodeString); + if (td == null) { + File target = new File(backupModelDirectory + targetNodeString + ".java"); + if (!target.exists()) { + target = new File(backupModelDirectory + "Enumerations" + ".java"); + } + cu = StaticJavaParser.parse(target); + td = getClassOrEnumNodeThatExistsWithin(cu, targetNodeString); + } + if (td == null) { + System.out.println("No target with name " + targetNodeString + " found"); + } + return td; + } + + public static TypeDeclaration getClassOrEnumNodeThatExistsWithin(CompilationUnit cu, String targetName) { + List collect = cu.getChildNodes().stream() + .filter(node -> node instanceof TypeDeclaration) + .map(node -> (TypeDeclaration) node) + .collect(Collectors.toList()); + for (TypeDeclaration td : collect) { + TypeDeclaration search = getClassOrEnumNodeThatExistsWithin(td, targetName); + if (search != null) { + return search; + } + } + return null; + } + + public static TypeDeclaration getClassOrEnumNodeThatExistsWithin(TypeDeclaration c, String targetName) { + if (c.getNameAsString().equals(targetName)) return c; + List collect = c.getChildNodes().stream() + .filter(node -> node instanceof TypeDeclaration) + .map(node -> (TypeDeclaration) node) + .collect(Collectors.toList()); + for (TypeDeclaration td : collect) { + TypeDeclaration search = getClassOrEnumNodeThatExistsWithin(td, targetName); + if (search != null) { + return search; + } + } + return null; + } + + public static class ElementParserEntry { + + public boolean hasGet = false; + public boolean hasCheck = false; + public boolean hasSet = false; + public boolean hasAdd = false; + + public String baseNoun = ""; + + public String getType = ""; + public String checkType = ""; + public String setType = ""; + public String addType = ""; + + public void setGetType(String type) { + hasGet = true; + this.getType = type; + } + + public void setSetType(String type) { + hasSet = true; + this.setType = type; + } + + public void setHasCheck(String type) { + hasCheck = true; + this.checkType = type; + } + + public void setAddType(String type) { + hasAdd = true; + this.addType = type; + } + + public ElementParserEntry() { + } + + } + + + public static List getListOfPrimitiveTypes() { + String path = "/Users/markiantorno/Documents/Development/fhir/org.hl7.fhir.core/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/"; + + List result = new ArrayList<>(); + + try (Stream walk = Files.walk(Paths.get(path))) { + walk.map(Path::toString) + .filter(f -> f.endsWith(".java")) + .collect(Collectors.toCollection(() -> result)); + } catch (IOException e) { + e.printStackTrace(); + } + + List primitiveTypes = new ArrayList<>(); + result.forEach(filePath -> { + try { + CompilationUnit cu = StaticJavaParser.parse(new File(filePath)); + String className = pullFileNameFromPath(filePath); + cu.getClassByName(className).ifPresent(classOrInterfaceDeclaration -> { + if (classOrInterfaceDeclaration.getExtendedTypes().stream() + .map(NodeWithSimpleName::getNameAsString) + .collect(Collectors.toList()).contains("PrimitiveType")) { + primitiveTypes.add(className.replace("Type", "")); + } + }); + } catch (FileNotFoundException e) { + e.printStackTrace(); + } + }); + primitiveTypes.forEach(System.out::println); + return primitiveTypes; + } + + public static void cleanAccessorsForFile(String srcdirectory, String filename, String extension) { + String projectDirectory = new File("").getAbsolutePath(); + String srcFilePathWithExtension = projectDirectory + srcdirectory + filename + extension; + + CompilationUnit compilationUnit = getCompilationUnit(projectDirectory + srcdirectory + filename + extension); + ClassOrInterfaceDeclaration classOrInterfaceDeclaration = initializeTypeSovlerAndParser(compilationUnit, + projectDirectory, srcdirectory, filename); + + String ifStatementTemplate = "if(%1$s){%2$s;}"; + String ifStatementTemplate2 = "if(%1$s){%2$s}"; + + final HashMap replacementMap = new HashMap<>(); + final HashMap generatedBlockStmt = new HashMap<>(); + + List methods = classOrInterfaceDeclaration.getMethods(); + methods.forEach(md -> { + String assembledMethod = ""; + md.accept(new ModifierVisitor() { + @Override + public Visitable visit(MethodCallExpr n, String arg) { + super.visit(n, arg); + if (n.getTokenRange().toString().contains("src.get")) { + + Node getStatement = getRootGetMethodCall(n); + String topLevelMethodExpr = getTopLevelMethodExpr(n).toString(); + if (topLevelMethodExpr != null) { + String condition = "src.has" + getStatement.toString().replace("FirstRep", "").replaceFirst("get", "") + "()"; + + String statement = topLevelMethodExpr; + String ifStmt = String.format(statement.startsWith("for") ? ifStatementTemplate2 : ifStatementTemplate, condition, statement); + if (!replacementMap.containsKey(topLevelMethodExpr)) { + replacementMap.put(topLevelMethodExpr, ifStmt); + } + } + } + return n; + } + }, assembledMethod); + String body = md.getBody().get().toString(); + Set keySet = replacementMap.keySet(); + for (String key : keySet) { + if (key.startsWith("for")) { + body = body.replace(key, replacementMap.get(key)); + } else { + body = body.replace(key + ";", replacementMap.get(key)); + } + } + replacementMap.clear(); + try { + generatedBlockStmt.put(md, StaticJavaParser.parseBlock(body)); + } catch (Exception e) { + System.out.println(); + } + }); + + classOrInterfaceDeclaration.accept(new ModifierVisitor() { + @Override + public MethodDeclaration visit(MethodDeclaration md, Void arg) { + super.visit(md, arg); + if (generatedBlockStmt.containsKey(md)) { + return md.setBody(generatedBlockStmt.get(md)); + } else { + return md; + } + } + }, null); + + deleteFile(srcFilePathWithExtension); + + try { + writeStringToFile(compilationUnit.toString(), srcFilePathWithExtension); + } catch (IOException e) { + e.printStackTrace(); + } + } + + private static Node getRootGetMethodCall(Node n) { + if (n.getChildNodes().size() == 0) return n; + + Optional get = n.getChildNodes().stream() + .filter(node -> node.toString().contains("get")) + .findFirst(); + + return get.map(Parser::getRootGetMethodCall).orElse(null); + } + + private static Node getTopLevelMethodExpr(Node exp) { + Optional node = exp.getParentNode(); + if (node.isPresent() && node.get() instanceof ExpressionStmt && node.get().getParentNode().get() instanceof IfStmt) { + return null; + } else if ((node.isPresent()) && ((node.get() instanceof MethodCallExpr) || (node.get() instanceof ForEachStmt))) { + return getTopLevelMethodExpr(node.get()); + } + return exp; + } + + private static Node getTopLevelIfStatement(Node exp) { + Optional node = exp.getParentNode(); + if (!node.isPresent() || (node.get() instanceof ClassOrInterfaceDeclaration)) { + return null; + } else if (node.get() instanceof IfStmt) { + return node.get(); + } + return getTopLevelIfStatement(node.get()); + } + + // ================== OLD CODE ====================== + + + private static final String COMMON_FILENAME = "Common"; + private static final String DEST_DIRECTORY_FORMAT = "conv%s"; + private static final String SRC_FILE_FORMAT = "VersionConvertor_%s"; + + private static final String KEYWORD_CONVERT = "convert"; + private static final String KEYWORD_COPY = "copy"; + private static final String KEYWORD_FIND = "find"; + private static final String KEYWORD_GOD_METHOD = "convertResource"; + + private static final String DIRECTORY_WHERE_THE_CODE_LIVES = "/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/"; + private static final String COMMENT_REPORT = "comment_report%s.txt"; + + //Exception case variables + public static final String DSTU = "dstu"; + public static final String R = "r"; + + public static final String MODEL_RESOURCE = "org.hl7.fhir.%1$s%2$s.model.Resource"; + public static final String MODEL_VALUESET = "org.hl7.fhir.%1$s%2$s.model.ValueSet"; + public static final String MODEL_BUNDLECOMP = "org.hl7.fhir.%1$s%2$s.model.Bundle.BundleEntryComponent"; + public static final String MODEL_BUNDLE = "org.hl7.fhir.%1$s%2$s.model.Bundle"; + public static final String VERSION_CONVERTOR_IMPORT = "org.hl7.fhir.convertors.VersionConvertorAdvisor%s0"; + public static final String VERSION_CONVERTOR = "VersionConvertorAdvisor%s0"; + public static final String ADVISOR_VARIABLE = "advisor"; + + public static String convertPath(String path, String version) { + String versionloc = (version.equals("2") || version.equals("3")) ? DSTU : R; + return String.format(path, versionloc, version); + } + + public static void parseAllTheCodes() { + String projectDirectory = new File("").getAbsolutePath(); + + VERSION_FILES.forEach(version -> { + + String srcFilePathWithExtension = projectDirectory + DIRECTORY_WHERE_THE_CODE_LIVES + String.format(SRC_FILE_FORMAT, version) + ".java"; + String destDirectoryName = String.format(DEST_DIRECTORY_FORMAT, version); + + CompilationUnit compilationUnit = getCompilationUnit(srcFilePathWithExtension); + ClassOrInterfaceDeclaration classOrInterfaceDeclaration + = initializeTypeSovlerAndParser(compilationUnit, projectDirectory, DIRECTORY_WHERE_THE_CODE_LIVES, String.format(SRC_FILE_FORMAT, version)); + + if (version.contains("10")) + dealWithV2ExceptionCasesPreProcessing(compilationUnit, classOrInterfaceDeclaration, version); + + List externalClassNames = getAdditionalClassDeclarations(classOrInterfaceDeclaration).stream() + .filter(c -> !c.getNameAsString().equals(classOrInterfaceDeclaration.getNameAsString())) + .map(NodeWithSimpleName::getNameAsString) + .collect(Collectors.toList()); + + HashMap> generatedTopLevelMethodMap = generateMapOfTopLevelMethods(classOrInterfaceDeclaration); + HashMap generatedMethodMap = new HashMap<>(); + HashMap> generatedStaticFieldMappings = new HashMap<>(); + populateMethodAndFieldMaps(classOrInterfaceDeclaration, generatedTopLevelMethodMap, generatedMethodMap, generatedStaticFieldMappings); + + if (version.equals("10_40") || version.equals("10_50")) { + generatedMethodMap.keySet().stream() + .filter(methodDeclaration -> methodDeclaration.getNameAsString().equals("hasConcept")) + .collect(Collectors.toList()) + .forEach(methodDeclaration -> { + generatedMethodMap.put(methodDeclaration, COMMON_FILENAME); + }); + } + + populateClassMappings(generatedTopLevelMethodMap, generatedMethodMap); + + createCommentReport(srcFilePathWithExtension, + projectDirectory + DIRECTORY_WHERE_THE_CODE_LIVES + String.format(COMMENT_REPORT, version)); + + modifySourceFile(compilationUnit, classOrInterfaceDeclaration, srcFilePathWithExtension, + generatedTopLevelMethodMap, generatedStaticFieldMappings, version); + + String packageDeclaration = compilationUnit.getPackageDeclaration().get().getNameAsString() + "." + + destDirectoryName; + System.out.println("Files will be generated with the package :: " + packageDeclaration); + NodeList imports = compilationUnit.getImports(); + System.out.println("Imports will be taken from the top level file <" + String.format(SRC_FILE_FORMAT, version) + ".java>, you will have to " + + "optimize imports on the generated files. Import list as follows :: \n-----"); + imports.stream().map(NodeWithName::getNameAsString).forEach(System.out::println); + System.out.println("-----\n"); + String directoryPath = projectDirectory + DIRECTORY_WHERE_THE_CODE_LIVES + destDirectoryName + "/"; + createDirectory(directoryPath); + System.out.println("Generated type conversion files will be stored in :: " + directoryPath); + + createJavaFiles(classOrInterfaceDeclaration, generatedTopLevelMethodMap, generatedStaticFieldMappings, + String.format(SRC_FILE_FORMAT, version), packageDeclaration, imports, directoryPath, externalClassNames, version); + }); + + + } + + private static List getAdditionalClassDeclarations(ClassOrInterfaceDeclaration + classOrInterfaceDeclaration) { + List collect = new ArrayList<>(); + classOrInterfaceDeclaration.accept(new VoidVisitorAdapter() { + @Override + public void visit(ClassOrInterfaceDeclaration n, Void arg) { + super.visit(n, arg); + collect.add(n); + } + }, null); + return collect; + } + + private static CompilationUnit getCompilationUnit(String filePathWithExtension) { + Optional compilationUnit = initializeParser(filePathWithExtension); + if (!compilationUnit.isPresent()) { + System.out.println("\nNo compilation unit generated during class parsing...aborting."); + System.exit(0); + } + return compilationUnit.get(); + } + + private static ClassOrInterfaceDeclaration initializeTypeSovlerAndParser(CompilationUnit compilationUnit, + String projectDirectory, + String codeDirectory, + String filename) { +// System.out.println("==================== Initializing TypeSolver and Parser ====================\n"); + + try { + initializeResolver(projectDirectory, codeDirectory); + } catch (IOException e) { + System.out.println("Error initializing typesolver, exiting process..."); + e.printStackTrace(); + System.exit(0); + } + +// System.out.println("Loading class: " + filename); + Optional classOrInterfaceDeclaration = loadClass(compilationUnit, filename); + if (!classOrInterfaceDeclaration.isPresent()) { + System.out.println("\nNo class or interface declaration loaded during parsing...aborting."); + System.exit(0); + } + +// System.out.println("\n"); + + return classOrInterfaceDeclaration.get(); + } + + private static HashMap> generateMapOfTopLevelMethods(ClassOrInterfaceDeclaration + classOrInterfaceDeclaration) { + System.out.println("==================== Generating List of Parsable Types ====================\n"); + + HashMap> mapToReturn = new HashMap<>(); + + System.out.println("Fetching list of top level parsing methods..."); + System.out.println("---------------------------------------------"); + List listOfParsableMethodCalls = getListOfParsableTypes(classOrInterfaceDeclaration).stream() + .map(methodCallExpr -> methodCallExpr.getName().toString()) + .sorted(Comparator.comparing(Function.identity())) + .distinct() + .collect(Collectors.toList()); + listOfParsableMethodCalls.forEach(System.out::println); + System.out.println("---------------------------------------------"); + System.out.println("\n"); + + System.out.println("==================== Generate Map of Top Level Method Names ====================\n"); + System.out.println("Pulling all top level methods from the parsed class --> " + classOrInterfaceDeclaration.getNameAsString()); + List topLevelMethods = getTopLevelMethods(classOrInterfaceDeclaration, listOfParsableMethodCalls); + System.out.println("\nFetched the following top level methods:"); + System.out.println("------------------------------------------"); + topLevelMethods.forEach(md -> System.out.println(md.getSignature().toString())); + System.out.println("------------------------------------------\n"); + System.out.println("\n"); + + for (String type : listOfParsableMethodCalls) { + topLevelMethods.stream() + .filter(methodDeclaration -> type.equals(methodDeclaration.getName().asString())) + .forEach(md -> { + if (!mapToReturn.containsKey(type.replaceFirst(KEYWORD_CONVERT, ""))) { + mapToReturn.put(type.replaceFirst(KEYWORD_CONVERT, ""), new ArrayList<>()); + } + mapToReturn.get(type.replaceFirst(KEYWORD_CONVERT, "")).add(md); + }); + } + return mapToReturn; + } + + public static void populateMethodAndFieldMaps(ClassOrInterfaceDeclaration classOrInterfaceDeclaration, + HashMap> generatedTopLevelMethodMap, + HashMap methodMapToPopulate, + HashMap> fieldMapToPopulate) { + + System.out.println("==================== Generate Method and Field Maps ====================\n"); + + HashMap fieldDeclarationMap = new HashMap<>(); + + List fieldDeclarations = classOrInterfaceDeclaration.getFields().stream() + .filter(NodeWithStaticModifier::isStatic) + .collect(Collectors.toList()); + + for (String key : generatedTopLevelMethodMap.keySet()) { + for (MethodDeclaration md : generatedTopLevelMethodMap.get(key)) { + recursiveSearchAndAdd(classOrInterfaceDeclaration, methodMapToPopulate, fieldDeclarationMap, fieldDeclarations, md, key); + } + } + + fieldDeclarationMap.keySet().forEach(key -> { + if (!fieldMapToPopulate.containsKey(fieldDeclarationMap.get(key))) { + fieldMapToPopulate.put(fieldDeclarationMap.get(key), new ArrayList<>()); + } + fieldMapToPopulate.get(fieldDeclarationMap.get(key)).add(key); + }); + } + + public static void populateClassMappings(HashMap> generatedTopLevelMethodMap, + HashMap generatedMethodMap) { + System.out.println("==================== Generate Method to Class Mappings ====================\n"); + + generatedTopLevelMethodMap.put(COMMON_FILENAME, new ArrayList<>()); + generatedTopLevelMethodMap.clear(); + generatedMethodMap.keySet().forEach(md -> { + if (!generatedTopLevelMethodMap.containsKey(generatedMethodMap.get(md))) { + generatedTopLevelMethodMap.put(generatedMethodMap.get(md), new ArrayList<>()); + } + generatedTopLevelMethodMap.get(generatedMethodMap.get(md)).add(md); + }); + + for (String className : generatedTopLevelMethodMap.keySet()) { + System.out.println("Class :: " + className); + generatedTopLevelMethodMap.get(className).stream() + .sorted(Comparator.comparing(methodDeclaration -> methodDeclaration.getName().toString())) + .forEach(md -> System.out.println("\t" + md.getSignature())); + System.out.println("\n"); + } + } + + public static void createCommentReport(String fullSrcFilePath, String fullDstFilePath) { + try { + List commentReportEntries = generateCommentReportData(fullSrcFilePath); + String report = commentReportEntries.stream() + .map(Object::toString).collect(Collectors.joining("\n")); + writeStringToFile(report, fullDstFilePath); + } catch (IOException e) { + e.printStackTrace(); + } + } + + public static void dealWithV2ExceptionCasesPreProcessing(CompilationUnit cu, ClassOrInterfaceDeclaration + classOrInterfaceDeclaration, String version) { + String from = "2";//version.substring(0, version.indexOf('_')); + String to = version.substring(version.indexOf('_') + 1, version.indexOf('_') + 2); + + + modifyConvertResourceCalls(classOrInterfaceDeclaration, to, from, to, MODEL_VALUESET, "convertValueSet"); + modifyConvertResourceCalls(classOrInterfaceDeclaration, from, to, to, MODEL_VALUESET, "convertValueSet"); + modifyConvertResourceCalls(classOrInterfaceDeclaration, to, from, to, MODEL_BUNDLECOMP, "convertBundleEntryComponent"); + modifyConvertResourceCalls(classOrInterfaceDeclaration, to, from, to, MODEL_BUNDLE, "convertBundle"); + + addAdvisorToMethodCalls(classOrInterfaceDeclaration, "convertBundle", MODEL_BUNDLE, from, "convertBundleEntryComponent"); + + } + + public static void dealWithV2ExceptionCasesPostProcessing(ClassOrInterfaceDeclaration + classOrInterfaceDeclaration, String version) { + String from = "2";//version.substring(0, version.indexOf('_')); + String to = version.substring(version.indexOf('_') + 1, version.indexOf('_') + 2); + + Optional advisorOptional = classOrInterfaceDeclaration.getFields().stream() + .map(FieldDeclaration::getVariables) + .flatMap(Collection::stream) + .filter(v -> v.getNameAsString().equals(ADVISOR_VARIABLE)) + .findFirst(); + + if (advisorOptional.isPresent()) { + VariableDeclarator advisorVariable = advisorOptional.get(); + Type advisorType = advisorVariable.getType(); + advisorOptional.get().getParentNode().ifPresent(Node::remove); + + modifyConvertResourceCalls(classOrInterfaceDeclaration, from, to, to, MODEL_RESOURCE, "convertResource"); + modifyConvertResourceCalls(classOrInterfaceDeclaration, to, from, to, MODEL_RESOURCE, "convertResource"); + + addAdvisorToMethodCalls(classOrInterfaceDeclaration, "convertResource", MODEL_RESOURCE, from, "convertBundle"); + addAdvisorToMethodCalls(classOrInterfaceDeclaration, "convertResource", MODEL_RESOURCE, from, "convertValueSet"); + addAdvisorToMethodCalls(classOrInterfaceDeclaration, "convertResource", MODEL_RESOURCE, to, "convertValueSet"); + + classOrInterfaceDeclaration.getConstructors().forEach(Node::remove); + + System.out.println(); +// classOrInterfaceDeclaration.addMethod(); + + } + + System.out.println(); + } + + public static void modifyConvertResourceCalls(ClassOrInterfaceDeclaration classOrInterfaceDeclaration, + String parameterVersionNo, + String typeVersionNo, + String convertorVersionNumber, + String typeFormat, + String methodName) { + MethodDeclaration oldConvertResource = getConvertResourceMethodForVersion(classOrInterfaceDeclaration, methodName, typeFormat, typeVersionNo); + oldConvertResource.addParameter(String.format(VERSION_CONVERTOR, convertorVersionNumber), ADVISOR_VARIABLE); + + MethodDeclaration newConvertResource = classOrInterfaceDeclaration.addMethod(methodName); + newConvertResource.setModifier(Modifier.Keyword.PUBLIC, true); + newConvertResource.setModifier(Modifier.Keyword.STATIC, true); + newConvertResource.setType(convertPath(typeFormat, typeVersionNo)); + newConvertResource.setThrownExceptions(oldConvertResource.getThrownExceptions()); + newConvertResource.addParameter(convertPath(typeFormat, parameterVersionNo), "src"); + newConvertResource.setBody(new BlockStmt().addStatement("return " + methodName + "(src, null);")); + } + + public static void addAdvisorToMethodCalls(ClassOrInterfaceDeclaration classOrInterfaceDeclaration, + String parentMethodName, + String modelType, + String version, + String subMethodCall) { + + Optional methodDeclaration = classOrInterfaceDeclaration.getMethods().stream() + .filter(md -> md.getNameAsString().equals(parentMethodName)) + .filter(md -> md.getType().toString().equals(convertPath(modelType, version))) + .findAny(); + + methodDeclaration.ifPresent(declaration -> declaration.accept(new ModifierVisitor() { + @Override + public Visitable visit(MethodCallExpr n, Void arg) { + super.visit(n, arg); + if (n.getNameAsString().contains(subMethodCall)) { + n.addArgument("advisor"); + } + return n; + } + }, null)); + + } + + public static MethodDeclaration getConvertResourceMethodForVersion(ClassOrInterfaceDeclaration + classOrInterfaceDeclaration, + String methodName, + String modelType, + String version) { + Optional methodDeclaration = classOrInterfaceDeclaration.getMethods().stream() + .filter(md -> md.getNameAsString().equals(methodName)) + .filter(md -> md.getType().toString().equals(convertPath(modelType, version))) + .findAny(); + + if (methodDeclaration.isPresent()) { + return methodDeclaration.get(); + } else { + System.out.println("Cannot find method " + methodName + " that returns type " + convertPath(modelType, version)); + System.exit(0); + } + return null; + } + + public static void modifySourceFile(CompilationUnit compilationUnit, + ClassOrInterfaceDeclaration classOrInterfaceDeclaration, + String srcFilePathWithExtension, + HashMap> generatedTopLevelMethodMap, + HashMap> generatedStaticFieldMappings, + String version) { + + + List listOfParsableMethodCalls = getListOfParsableTypes(classOrInterfaceDeclaration).stream() + .map(methodCallExpr -> methodCallExpr.getName().toString()) + .sorted(Comparator.comparing(Function.identity())) + .distinct() + .collect(Collectors.toList()); + + modifyMainFile(compilationUnit, + classOrInterfaceDeclaration, + generatedTopLevelMethodMap.get(COMMON_FILENAME), + generatedTopLevelMethodMap.keySet().stream() + .filter(key -> !key.equals(COMMON_FILENAME)) + .map(generatedTopLevelMethodMap::get) + .flatMap(Collection::stream) + .collect(Collectors.toList()), + listOfParsableMethodCalls, + generatedStaticFieldMappings.keySet().stream() + .filter(key -> !key.equals(COMMON_FILENAME)) + .map(generatedStaticFieldMappings::get) + .flatMap(Collection::stream) + .collect(Collectors.toList()), + generatedStaticFieldMappings.keySet().stream() + .filter(key -> key.equals(COMMON_FILENAME)) + .map(generatedStaticFieldMappings::get) + .flatMap(Collection::stream) + .collect(Collectors.toList()), + version); + + deleteFile(srcFilePathWithExtension); + + try { + writeStringToFile(compilationUnit.toString(), srcFilePathWithExtension); + } catch (IOException e) { + e.printStackTrace(); + } + } + + public static void modifyMainFile(CompilationUnit compilationUnit, + ClassOrInterfaceDeclaration classOrInterfaceDeclaration, + List methodsToExpose, + List methodsToDelete, + List methodsToAddStaticAccess, + List fieldsToDelete, + List fieldsToExpose, + String versionCode) { + + compilationUnit.getAllContainedComments().stream() + .filter(Comment::isLineComment) + .forEach(Comment::remove); + + compilationUnit.accept(new MethodDeleter(methodsToDelete), null); + compilationUnit.accept(new MethodExposer(methodsToExpose), null); + + compilationUnit.addImport("org.hl7.fhir.convertors." + String.format(DEST_DIRECTORY_FORMAT, versionCode), false, true); + + fieldsToDelete.forEach(classOrInterfaceDeclaration::remove); + classOrInterfaceDeclaration.getFields().stream() + .filter(NodeWithStaticModifier::isStatic) + .filter(fieldsToExpose::contains) + .forEach(fd -> { + fd.setModifier(Modifier.Keyword.PRIVATE, false); + fd.setModifier(Modifier.Keyword.PUBLIC, true); + }); + + List listOfClassMethods = getListOfClassMethods(KEYWORD_GOD_METHOD, classOrInterfaceDeclaration); + listOfClassMethods.forEach(md -> { + md.accept(new MethodStaticCallAdder(methodsToAddStaticAccess, versionCode), null); + }); + + //Deal with the old, non static access convertors (1-3, 1-4, 1-5) + compilationUnit.accept(new ModifierVisitor() { + @Override + public MethodDeclaration visit(MethodDeclaration md, Void arg) { + super.visit(md, arg); + + md.setModifier(Modifier.Keyword.PRIVATE, false); + md.setModifier(Modifier.Keyword.STATIC, true); + md.setModifier(Modifier.Keyword.PUBLIC, true); + + return md; + } + }, null); + + classOrInterfaceDeclaration.accept(new ModifierVisitor() { + @Override + public ClassOrInterfaceDeclaration visit(ClassOrInterfaceDeclaration n, Void arg) { + super.visit(n, arg); + if (!n.getNameAsString().equals(String.format(SRC_FILE_FORMAT, versionCode))) { + n.setModifier(Modifier.Keyword.PRIVATE, false); + n.setModifier(Modifier.Keyword.STATIC, true); + n.setModifier(Modifier.Keyword.PUBLIC, true); + n.accept(new ModifierVisitor() { + @Override + public FieldDeclaration visit(FieldDeclaration md, Void arg) { + super.visit(md, arg); + md.setModifier(Modifier.Keyword.PRIVATE, false); + md.setModifier(Modifier.Keyword.STATIC, false); + md.setModifier(Modifier.Keyword.PUBLIC, true); + return md; + } + }, null); + } + return n; + } + }, null); + + if (versionCode.contains("10")) dealWithV2ExceptionCasesPostProcessing(classOrInterfaceDeclaration, versionCode); + + } + + public static void createJavaFiles(ClassOrInterfaceDeclaration classOrInterfaceDeclaration, + HashMap> generatedTopLevelMethodMap, + HashMap> generatedStaticFieldMappings, + String filename, + String packageDeclaration, + NodeList imports, + String outputDirectoryPath, + List externalClassNames, + String version) { + System.out.println("==================== Create Java Files ====================\n"); + + generatedTopLevelMethodMap.keySet().stream() + .filter(s -> !s.equals(COMMON_FILENAME)) + .forEach(s -> { + String generatedCode = generateFileContents(classOrInterfaceDeclaration, + filename, + s + version, + packageDeclaration, + imports, + generatedStaticFieldMappings.get(s), + generatedStaticFieldMappings.get(COMMON_FILENAME), + generatedTopLevelMethodMap.get(s).stream() + .sorted(Comparator.comparing(methodDeclaration -> methodDeclaration.getName().toString())) + .collect(Collectors.toList()), + externalClassNames, + version); + + try { + String filePath = outputDirectoryPath + s + version + ".java"; + System.out.println("Attempting to write file -> " + filePath); + writeStringToFile(generatedCode, filePath); + } catch (IOException e) { + e.printStackTrace(); + } + }); + } + + public static void writeStringToFile(String string, String filepath) throws IOException { + BufferedWriter writer = new BufferedWriter(new FileWriter(filepath)); + writer.write(string); + writer.close(); + } + + public static String generateFileContents(ClassOrInterfaceDeclaration oldInterfaceDec, + String commonMethodClassName, + String className, + String packageDeclaration, + NodeList imports, + List fieldDeclarations, + List externalFieldDeclarations, + List methods, + List externalClassNames, + String version) { + + CompilationUnit cu = new CompilationUnit(); + + + cu.setPackageDeclaration(packageDeclaration); + cu.setImports(imports); + cu.addImport("org.hl7.fhir.convertors." + String.format(SRC_FILE_FORMAT, version)); + cu.addImport("org.hl7.fhir.convertors.VersionConvertorConstants"); + if (version.contains("10")) + cu.addImport(String.format(VERSION_CONVERTOR_IMPORT, version.substring(version.indexOf('_') + 1, version.indexOf('_') + 2))); + + ClassOrInterfaceDeclaration generatedClass = cu.addClass(className); + if (fieldDeclarations != null) { + fieldDeclarations.forEach(generatedClass::addMember); + } + + methods.forEach(method -> { + + MethodDeclaration methodDeclaration = generatedClass.addMethod(method.getNameAsString()); + + if (method.getBody().isPresent()) { + BlockStmt blockStmt = method.getBody().get(); + if (externalFieldDeclarations != null) { + blockStmt.accept(new VarAccessChanger(externalFieldDeclarations.stream() + .map(fd -> fd.getVariable(0).getNameAsString()) + .collect(Collectors.toList()), String.format(SRC_FILE_FORMAT, version)), null); + } + List allCalledMethods = getAllCalledMethods(oldInterfaceDec, method); + + allCalledMethods.stream() + .filter(md -> !methods.contains(md)) + .map(NodeWithSimpleName::getNameAsString) + .distinct() + .forEach(methodName -> { + List methodCallExprs = new ArrayList<>(); + blockStmt.accept(new MethodCallVisitor(methodName, true), methodCallExprs); + methodCallExprs.stream() + .distinct() + .forEach(methodCallExpr -> { + methodCallExpr.setName(commonMethodClassName + "." + methodCallExpr.getNameAsString()); + }); + }); + methodDeclaration.setBody(blockStmt); + + } + + methodDeclaration.setParameters(method.getParameters()); + methodDeclaration.setModifiers(method.getModifiers()); + methodDeclaration.addModifier(Modifier.Keyword.STATIC); + methodDeclaration.setModifier(Modifier.Keyword.PRIVATE, false); + methodDeclaration.setModifier(Modifier.Keyword.PUBLIC, true); + methodDeclaration.setThrownExceptions(method.getThrownExceptions()); + methodDeclaration.setType(method.getType()); + methodDeclaration.setTypeParameters(method.getTypeParameters()); + }); + + + generatedClass.walk(node -> { + String identifier = ""; + if (node instanceof NodeWithIdentifier) + if (externalClassNames.contains(((NodeWithIdentifier) node).getIdentifier())) { + ((NodeWithIdentifier) node).setIdentifier(String.format(SRC_FILE_FORMAT, version) + "." + ((NodeWithIdentifier) node).getIdentifier()); + } + }); + + return cu.toString(); + } + + public static Predicate distinctByKey(Function keyExtractor) { + Set seen = ConcurrentHashMap.newKeySet(); + return t -> seen.add(keyExtractor.apply(t)); + } + + private static void recursiveSearchAndAdd(ClassOrInterfaceDeclaration cd, + HashMap methodDeclarationMap, + HashMap fieldDeclarationMap, + List globalStaticFields, + MethodDeclaration key, + String value) { + if (methodDeclarationMap.containsKey(key) && (methodDeclarationMap.get(key).equals(COMMON_FILENAME) || methodDeclarationMap.get(key).equals(value))) + return; + if (key.getName().toString().equals("convertResource")) return; + + addMethodDeclarationToMap(methodDeclarationMap, value, key); + searchAndSortMethodFields(key, value, fieldDeclarationMap, globalStaticFields); + + getAllCalledMethods(cd, key).forEach(md -> { + recursiveSearchAndAdd(cd, methodDeclarationMap, fieldDeclarationMap, globalStaticFields, md, value); + }); + + } + + private static void searchAndSortMethodFields(MethodDeclaration md, + String classKey, + HashMap fieldToClassMap, + List fieldDeclarations) { + + List collector = new ArrayList<>(); + md.accept(new MethodFieldVisitor(), collector); + + md.accept(new VoidVisitorAdapter() { + @Override + public void visit(VarType n, Void arg) { + super.visit(n, arg); + } + }, null); + + List staticFieldLabels = fieldDeclarations.stream() + .map(fd -> fd.getVariable(0).getName().asString()) + .collect(Collectors.toList()); + + collector.stream() + .filter(ne -> staticFieldLabels.contains(ne.getNameAsString())) + .map(ne -> fieldDeclarations.stream() + .filter(fd -> fd.getVariable(0).getName().asString().equals(ne.getNameAsString())) + .findFirst() + .get()) + .forEach(fd -> { + if (!fieldToClassMap.containsKey(fd)) { + fieldToClassMap.put(fd, classKey); + } else if (!fieldToClassMap.get(fd).equals(classKey)) { + fieldToClassMap.put(fd, COMMON_FILENAME); + } + }); + } + + + private static void createDirectory(String path) { + File file = new File(path); + //Creating the directory + boolean bool = file.mkdir(); + if (bool) { + System.out.println("Directory created successfully"); + } else { + System.out.println("Sorry couldn’t create specified directory"); + } + } + + /** + * Attempts to delete the file at the given path.) + * + * @param path + */ + public static void deleteFile(String path) { + File file = new File(path); + if (file.delete()) { + System.out.println("File <" + path + "> deleted successfully"); + } else { + System.out.println("Failed to delete the file <" + path + ">"); + } + } + + /** + * Finds the god method in the given convertor, and parses out all the method calls that method makes. + * + * @param classOrInterfaceDeclaration + * @return + */ + protected static List getListOfParsableTypes(ClassOrInterfaceDeclaration + classOrInterfaceDeclaration) { + List listOfClassMethods = getListOfClassMethods(KEYWORD_GOD_METHOD, classOrInterfaceDeclaration); + List calledMethods = new ArrayList<>(); + listOfClassMethods.forEach(md -> md.accept(new MethodCallVisitor(KEYWORD_CONVERT), calledMethods)); + return calledMethods; + } + + /** + * Pulls all internal conversion method calls out of the passed in method and maps those calls to the corresponding + * {@link MethodDeclaration} and returns those as a list. + * + * @param classOrInterfaceDeclaration + * @param method + * @return List of all {@link MethodDeclaration} + */ + public static List getAllCalledMethods(ClassOrInterfaceDeclaration + classOrInterfaceDeclaration, MethodDeclaration method) { + List result = new ArrayList<>(); + + List methodCallExprs = new ArrayList<>(); + method.accept(new VoidVisitorAdapter>() { + @Override + public void visit(MethodCallExpr methodCallExpr, List collector) { + collector.add(methodCallExpr); + super.visit(methodCallExpr, collector); + } + }, methodCallExprs); + + Set methodExpressionNames = methodCallExprs.stream() + .filter(methodCallExpr -> !methodCallExpr.getScope().isPresent()) + .map(me -> me.getName().toString()) + .collect(Collectors.toSet()); + + classOrInterfaceDeclaration.getMethods().stream() + .filter(e -> methodExpressionNames.contains(e.getName().toString())) + .collect(Collectors.toCollection(() -> result)); + + return result; + } + + /** + * Searches the passed in {@link ClassOrInterfaceDeclaration} for any method declaration matching any of the method + * names in the passed in List. + * + * @param classOrInterfaceDeclaration {@link ClassOrInterfaceDeclaration} to search + * @param methodNames {@link List} of method names + * @return {@link List } containing any of the keywords + */ + protected static List getTopLevelMethods(ClassOrInterfaceDeclaration + classOrInterfaceDeclaration, List methodNames) { + List toReturn = new ArrayList<>(); + methodNames.stream() + .map(s -> getListOfClassMethods(s, classOrInterfaceDeclaration)) + .flatMap(List::stream) + .collect(Collectors.toCollection(() -> toReturn)); + return toReturn; + } + + /** + * Searched the generated declaration map for the matching {@link MethodDeclaration}, if it already exists within the + * map and is not currently pointing the class label we pass in, it will mark it with the {@link Parser#COMMON_FILENAME} + * + * @param className {@link String} class label we want to associate the method with + * @param methodDeclaration {@link MethodDeclaration} + */ + protected static void addMethodDeclarationToMap(HashMap map, + String className, MethodDeclaration methodDeclaration) { + if (!map.containsKey(methodDeclaration)) { + map.put(methodDeclaration, className); + } else if (!map.get(methodDeclaration).equals(className)) { + map.put(methodDeclaration, COMMON_FILENAME); + } + } + + /** + * Returns a list of all java files within the passed in directory path, without extension. + * + * @param path {@link String} filepath + * @return {@link List < String >} of all filenames + */ + protected static List listAllJavaFilesInDirectory(String path) { + List result = new ArrayList<>(); + + try (Stream walk = Files.walk(Paths.get(path))) { + walk.map(Path::toString) + .filter(f -> f.endsWith(".java")) + .map(Parser::pullFileNameFromPath) + .collect(Collectors.toCollection(() -> result)); + } catch (IOException e) { + e.printStackTrace(); + } + + return result; + } + + /** + * Takes the passed in file path and extracts the filename without extension. + * + * @param path + * @return + */ + protected static String pullFileNameFromPath(String path) { + int lastSlashIndex = path.lastIndexOf('/'); + int lastPeriodIndex = path.lastIndexOf('.'); + return path.substring(lastSlashIndex + 1, lastPeriodIndex); + } + + /** + * The parser works by listing method calls within the individual resource conversion methods as + * {@link MethodCallExpr}. To extract the information we need to refactor the code, + * such as method body, references, signature, etc, we rely on the javaparser {@link TypeSolver} to parse the code + * library and convert the expressions to concrete {@link MethodDeclaration}. + *

+ * NB. The more source files in the directory you pass in (this will search recursively), the longer the + * MethodDeclaration lookups will take. Be smart, choose S-Mart. + * + * @param rootProjectDirectory + * @param projectDirectory {@link String} path to the directory that contains the souce files we want to be available for + */ + public static void initializeResolver(String rootProjectDirectory, String projectDirectory) throws IOException { + System.out.println("Initializing resolver against the following root directory:\n" + rootProjectDirectory); + System.out.println("Project codebase located here:\n" + projectDirectory); + + TypeSolver myTypeSolver = new CombinedTypeSolver( + new ReflectionTypeSolver(), + new JavaParserTypeSolver(new File(rootProjectDirectory + "/org.hl7.fhir.convertors/src/main/java/")), + new JavaParserTypeSolver(new File(rootProjectDirectory + "/org.hl7.fhir.utilities/src/main/java/")), + new JavaParserTypeSolver(new File(rootProjectDirectory + "/org.hl7.fhir.dstu2/src/main/java/")), + new JavaParserTypeSolver(new File(rootProjectDirectory + "/org.hl7.fhir.dstu3/src/main/java/")), + new JavaParserTypeSolver(new File(rootProjectDirectory + "/org.hl7.fhir.dstu2016may/src/main/java/")), + new JavaParserTypeSolver(new File(rootProjectDirectory + "/org.hl7.fhir.r4/src/main/java/")), + new JavaParserTypeSolver(new File(rootProjectDirectory + "/org.hl7.fhir.r5/src/main/java/")), + new JarTypeSolver("/Users/markiantorno/.m2/repository/ca/uhn/hapi/fhir/hapi-fhir-structures-r4/4.1.0/hapi-fhir-structures-r4-4.1.0.jar"), + new JarTypeSolver("/Users/markiantorno/.m2/repository/ca/uhn/hapi/fhir/hapi-fhir-base/4.1.0/hapi-fhir-base-4.1.0.jar") + ); + + JavaSymbolSolver symbolSolver = new JavaSymbolSolver(myTypeSolver); + StaticJavaParser.getConfiguration().setSymbolResolver(symbolSolver); + } + + /** + * Initializes the parser and runs it against the file located at the passed in path. + * + * @param path {@link String} path to the file. + * @return {@link Optional } + */ + public static Optional initializeParser(String path) { + System.out.println("Initializing parser, and parsing the following file:\n" + path); + CompilationUnit compilationUnit = null; + try { + compilationUnit = StaticJavaParser.parse(new File(path)); + } catch (FileNotFoundException e) { + e.printStackTrace(); + } + return Optional.ofNullable(compilationUnit); + } + + /** + * Loads a class using the {@link CompilationUnit} passed in and returns the resulting declaration for parsing. This + * class must exist within the directory parsed originally in {@link #initializeParser(String)} + * + * @param cu {@link CompilationUnit} + * @param classname {@link String} The name of the class to load. + * @return {@link Optional } for the named class. + */ + protected static Optional loadClass(CompilationUnit cu, String classname) { + return cu.getClassByName(classname); + } + + /** + * Takes a given {@link MethodCallExpr} and uses the initialized {@link JavaSymbolSolver} to search the source code + * for the appropriate {@link MethodDeclaration}. + * + * @param methodCallExpr {@link MethodCallExpr} + * @return An {@link Optional}, containing the corresponding {@link MethodDeclaration} + */ + protected static Optional resolveMethodDeclaration(MethodCallExpr methodCallExpr) { + MethodDeclaration wrappedDeclaration = null; + ResolvedMethodDeclaration correspondingDeclaration = methodCallExpr.resolve(); + + if (correspondingDeclaration instanceof JavaParserMethodDeclaration) { + JavaParserMethodDeclaration declaration = (JavaParserMethodDeclaration) correspondingDeclaration; + Node wrappedNode = declaration.getWrappedNode(); + wrappedDeclaration = (MethodDeclaration) wrappedNode; + System.out.println(); + } + + return Optional.ofNullable(wrappedDeclaration); + } + + /** + * Takes the content {@link String} passed in, and writes it to a java file with the provided name, in the provided + * directory location. + * + * @param filename Name of the file, including extension, ex: "Book.java" + * @param directory Path to directory to create the file + * @param content {@link String} content of the file + * @throws IOException + */ + public static void writeJavaCodeToFile(String filename, String directory, String content) throws IOException { + BufferedWriter writer = new BufferedWriter(new FileWriter(directory + filename)); + writer.write(content); + writer.close(); + } + + /** + * Returns the list of class methods. + * + * @param classOrInterfaceDeclaration {@link ClassOrInterfaceDeclaration} + * @return {@link List} of all {@link MethodDeclaration} + */ + protected static List getListOfClassMethods(ClassOrInterfaceDeclaration + classOrInterfaceDeclaration) { + return getListOfClassMethods("", classOrInterfaceDeclaration); + } + + /** + * Returns the list of class methods containing the passed in method name. + * + * @param methodName {@link String} method name to search for + * @param classOrInterfaceDeclaration {@link ClassOrInterfaceDeclaration} + * @return {@link List} of all matching {@link MethodDeclaration} + */ + protected static List getListOfClassMethods(String methodName, ClassOrInterfaceDeclaration + classOrInterfaceDeclaration) { + List result = new ArrayList<>(); + classOrInterfaceDeclaration.getMethods().stream() + .filter(method -> method.getName().toString().equals(methodName)) + .collect(Collectors.toCollection(() -> result)); + return result; + } + + private static List generateCommentReportData(String filepath) throws FileNotFoundException { + + CompilationUnit cu = StaticJavaParser.parse(new File(filepath)); + + return cu.getAllContainedComments().stream() + .filter(Comment::isOrphan) + .filter(Comment::isLineComment) + .map(p -> new CommentReportEntry(filepath.substring(filepath.lastIndexOf('/') + 1), + p.getClass().getSimpleName(), p.getContent(), p.getRange().get().begin.line, + !p.getCommentedNode().isPresent())) + .collect(Collectors.toList()); + } + + /** + * Class that visits all method calls within a given method and returns the results as a list. + */ + public static class MethodCallVisitor extends VoidVisitorAdapter> { + + private final String keyword; + private final boolean strict; + + public MethodCallVisitor(String keywords) { + super(); + this.keyword = keywords; + this.strict = false; + } + + public MethodCallVisitor(String keywords, boolean strict) { + super(); + this.keyword = keywords; + this.strict = strict; + } + + @Override + public void visit(MethodCallExpr methodCallExpr, List collector) { + if (strict) { + if (methodCallExpr.getName().asString().equals(keyword)) { + collector.add(methodCallExpr); + } + } else { + if (methodCallExpr.getName().asString().contains(keyword)) { + collector.add(methodCallExpr); + } + } + super.visit(methodCallExpr, collector); + } + } + + /** + * Class that visits all method calls within a given method and returns the results as a list. + */ + public static class MethodFieldVisitor extends VoidVisitorAdapter> { + + public MethodFieldVisitor() { + super(); + } + + @Override + public void visit(NameExpr fieldAccessExpr, List collector) { + super.visit(fieldAccessExpr, collector); + collector.add(fieldAccessExpr); + } + } + + /** + * Class that visits all method calls within a given method and returns the results as a list. + */ + public static class VarAccessChanger extends ModifierVisitor { + + private final List varsToAccessInMainFile; + private final String parentClassName; + + public VarAccessChanger(List varsToAccessInMainFile, String parentClassName) { + super(); + this.varsToAccessInMainFile = varsToAccessInMainFile; + this.parentClassName = parentClassName; + } + + @Override + public NameExpr visit(NameExpr nameExpr, Void arg) { + super.visit(nameExpr, arg); + if (varsToAccessInMainFile.contains(nameExpr.getNameAsString())) { + nameExpr.setName(parentClassName + "." + nameExpr.getNameAsString()); + } + return nameExpr; + } + } + + /** + * Class that visits all methods and deletes them if they are in the list of passed in MethodDeclarations + */ + public static class MethodDeleter extends ModifierVisitor { + + private List toDelete; + + public MethodDeleter(List toDelete) { + this.toDelete = toDelete; + } + + @Override + public MethodDeclaration visit(MethodDeclaration md, Void arg) { + super.visit(md, arg); + if (toDelete.contains(md)) { + return null; + } + return md; + } + } + + /** + * Class that visits all methods and deletes them if they are in the list of passed in MethodDeclarations + */ + public static class MethodExposer extends ModifierVisitor { + + private List toModify; + + public MethodExposer(List toModify) { + this.toModify = toModify; + } + + @Override + public MethodDeclaration visit(MethodDeclaration md, Void arg) { + super.visit(md, arg); + if (toModify.contains(md)) { + md.setModifier(Modifier.Keyword.PRIVATE, false); + md.setModifier(Modifier.Keyword.STATIC, true); + md.setModifier(Modifier.Keyword.PUBLIC, true); + } + return md; + } + } + + /** + * Class that visits all calls in calls and changes the access to an external class if it matches one of the passed + * in labels. + */ + public static class MethodStaticCallAdder extends ModifierVisitor { + + private List methodNames; + private String versionCode; + + public MethodStaticCallAdder(List methodNames, String versionCode) { + this.methodNames = methodNames; + this.versionCode = versionCode; + } + + @Override + public MethodCallExpr visit(MethodCallExpr methodCallExpr, Void arg) { + super.visit(methodCallExpr, arg); + if (methodNames.contains(methodCallExpr.getNameAsString())) { + //eg. convertPatient -> Patient30_50.convertPatient + methodCallExpr.setName(methodCallExpr.getNameAsString().replace(KEYWORD_CONVERT, "") + + versionCode + "." + methodCallExpr.getNameAsString()); + } + return methodCallExpr; + } + } + + private static class CommentReportEntry { + public String filename; + public String type; + public String text; + public int lineNumber; + public boolean isOrphan; + + CommentReportEntry(String filename, String type, String text, int lineNumber, + boolean isOrphan) { + this.filename = filename; + this.type = type; + this.text = text; + this.lineNumber = lineNumber; + this.isOrphan = isOrphan; + } + + @Override + public String toString() { + return filename + " | " + lineNumber + " | " + type + " | " + text.replaceAll("\\n", "").trim(); + } + } + + // ------------- Version String Manipulation Stuff + + public static final String MODEL_IMPORT_PATH = "org.hl7.fhir.%1$s.model.%2$s"; + public static final String MODEL_ABSOLUTE_PATH = "/org.hl7.fhir.%1$s/src/main/java/org/hl7/fhir/%1$s/model/%2$s.java"; + public static final String MODEL_PATH_WITHOUT_IMPORT = "/org.hl7.fhir.%1$s/src/main/java/"; + + public static String getVersionStringFromPath(String path) { + if (path.contains("dstu2")) return "dstu2"; + if (path.contains("dstu2016may")) return "dstu2016may"; + if (path.contains("dstu3")) return "dstu3"; + if (path.contains("r4")) return "r4"; + if (path.contains("r5")) return "r5"; + + return null; + } + + public static String getVersionString(String version) { + switch (version) { + case ("10"): + return "dstu2"; + case ("14"): + return "dstu2016may"; + case ("30"): + return "dstu3"; + case ("40"): + return "r4"; + case ("50"): + return "r5"; + default: + throw new IllegalArgumentException("Passed in version " + version + ", no such mapping exists..."); + } + } + + public static String getModelAbsolutePathFromVersion(String convertorClassName) { + String projectDirectory = new File("").getAbsolutePath(); + String version = getFromVersion(convertorClassName); + return projectDirectory + String.format(MODEL_ABSOLUTE_PATH, getVersionString(version), extractName(convertorClassName)); + } + + public static String getModelAbsolutePathToVersion(String convertorClassName) { + String projectDirectory = new File("").getAbsolutePath(); + String version = getToVersion(convertorClassName); + return projectDirectory + String.format(MODEL_ABSOLUTE_PATH, getVersionString(version), extractName(convertorClassName)); + } + + public static String importStatementToAbsolutePath(String importStatement) { + String projectDirectory = new File("").getAbsolutePath(); + + String placeholder = null; + if (importStatement.contains("dstu2")) { + placeholder = "dstu2"; + } else if (importStatement.contains("dstu2016may")) { + placeholder = "dstu2016may"; + } else if (importStatement.contains("dstu3")) { + placeholder = "dstu3"; + } else if (importStatement.contains("r4")) { + placeholder = "r4"; + } else if (importStatement.contains("r5")) { + placeholder = "r5"; + } + + return projectDirectory + String.format(MODEL_PATH_WITHOUT_IMPORT, placeholder) + importStatement.replace('.', '/') + ".java"; + } + + private static String extractName(String convertorClassName) { + return convertorClassName.substring(0, convertorClassName.length() - 5); + } + + public static String getModelImportToVersion(String convertorClassName) { + String version = getToVersion(convertorClassName); + return String.format(MODEL_IMPORT_PATH, getVersionString(version), extractName(convertorClassName)); + } + + public static String getModelImportFromVersion(String convertorClassName) { + String version = getFromVersion(convertorClassName); + return String.format(MODEL_IMPORT_PATH, getVersionString(version), extractName(convertorClassName)); + } + + public static String getFromVersion(String className) { + String version = className.substring(className.length() - 5); + return version.substring(0, version.indexOf('_')); + } + + public static String getToVersion(String className) { + String version = className.substring(className.length() - 5); + return version.substring(version.indexOf('_') + 1, version.indexOf('_') + 3); + } + + public static String getLowerVersionAbsPathFromAbsPath(String type1Path, String type2Path, String version) { + String lowVersionString = getVersionString(version.substring(0, version.indexOf('_'))); + if (type1Path.contains(lowVersionString)) { + return type1Path; + } else { + return type2Path; + } + } + + public static String getDirectoryOfOppositeModel(String importStatement, String version) { + String lowVersionString = getVersionString(version.substring(0, version.indexOf('_'))); + String highVersionString = getVersionString(version.substring(version.indexOf('_') + 1, version.indexOf('_') + 3)); + + if (importStatement.contains(lowVersionString)) { + String temp = String.format(MODEL_IMPORT_PATH, highVersionString, ""); + return temp.substring(0, temp.lastIndexOf("model.") + "model.".length()); + } else { + String temp = String.format(MODEL_IMPORT_PATH, lowVersionString, ""); + return temp.substring(0, temp.lastIndexOf("model.") + "model.".length()); + } + } + + public static String getLowerVersionAbsPathFromImportStatement(String type1ImportStatement, String + type2ImportStatement, String version) { + String type1Path = importStatementToAbsolutePath(type1ImportStatement); + String type2Path = importStatementToAbsolutePath(type2ImportStatement); + return getLowerVersionAbsPathFromAbsPath(type1Path, type2Path, version); + } + + public static String getHigherVersionAbsPath(String type1ImportStatement, String type2ImportStatement, String + version) { + String type1Path = importStatementToAbsolutePath(type1ImportStatement); + String type2Path = importStatementToAbsolutePath(type2ImportStatement); + + String lowVersionString = getVersionString(version.substring(0, version.indexOf('_'))); + if (type1Path.contains(lowVersionString)) { + return type2Path; + } else { + return type1Path; + } + } +} + diff --git a/org.hl7.fhir.convertors/src/test/java/org/hl7/fhir/convertors/parser/ParserTest.java b/org.hl7.fhir.convertors/src/test/java/org/hl7/fhir/convertors/parser/ParserTest.java new file mode 100644 index 000000000..5a38c98da --- /dev/null +++ b/org.hl7.fhir.convertors/src/test/java/org/hl7/fhir/convertors/parser/ParserTest.java @@ -0,0 +1,12 @@ +package org.hl7.fhir.convertors.parser; + +import org.junit.Test; + +import static org.junit.Assert.*; + +public class ParserTest { + + @Test + public void parseAllTheCodes() { + } +} \ No newline at end of file From 4c3e49de9dc0ab8707a7ae6d0d76e72a52f4d5b8 Mon Sep 17 00:00:00 2001 From: markiantorno Date: Wed, 5 Feb 2020 15:49:35 -0500 Subject: [PATCH 03/12] Fixed double if statement --- .../conv10_30/OperationDefinition10_30.java | 9 +- .../hl7/fhir/convertors/parser/Parser.java | 165 +++++++++++++----- 2 files changed, 122 insertions(+), 52 deletions(-) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/OperationDefinition10_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/OperationDefinition10_30.java index a7c62eabe..c234ece13 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/OperationDefinition10_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/OperationDefinition10_30.java @@ -210,11 +210,10 @@ public class OperationDefinition10_30 { tgt.setDocumentation(src.getDocumentation()); } if (src.hasSearchType()) { - if (src.hasSearchType()) { - tgt.setType(src.getSearchType().toCode()); - } - } else - tgt.setType(src.getType()); + tgt.setType(src.getSearchType().toCode()); + } else { + tgt.setType(src.getType()); + } if (src.hasProfile()) tgt.setProfile(VersionConvertor_10_30.convertReference(src.getProfile())); if (src.hasBinding()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/parser/Parser.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/parser/Parser.java index 2bb1490fd..e667fbbd7 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/parser/Parser.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/parser/Parser.java @@ -4,14 +4,13 @@ import com.github.javaparser.StaticJavaParser; import com.github.javaparser.ast.*; import com.github.javaparser.ast.body.*; import com.github.javaparser.ast.comments.Comment; -import com.github.javaparser.ast.expr.Expression; -import com.github.javaparser.ast.expr.MethodCallExpr; -import com.github.javaparser.ast.expr.NameExpr; +import com.github.javaparser.ast.expr.*; import com.github.javaparser.ast.nodeTypes.NodeWithIdentifier; import com.github.javaparser.ast.nodeTypes.NodeWithName; import com.github.javaparser.ast.nodeTypes.NodeWithSimpleName; import com.github.javaparser.ast.nodeTypes.modifiers.NodeWithStaticModifier; import com.github.javaparser.ast.stmt.*; +import com.github.javaparser.ast.type.ClassOrInterfaceType; import com.github.javaparser.ast.type.Type; import com.github.javaparser.ast.type.VarType; import com.github.javaparser.ast.visitor.ModifierVisitor; @@ -25,6 +24,8 @@ import com.github.javaparser.symbolsolver.resolution.typesolvers.CombinedTypeSol import com.github.javaparser.symbolsolver.resolution.typesolvers.JarTypeSolver; import com.github.javaparser.symbolsolver.resolution.typesolvers.JavaParserTypeSolver; import com.github.javaparser.symbolsolver.resolution.typesolvers.ReflectionTypeSolver; +import jdk.nashorn.internal.runtime.options.Option; +import org.checkerframework.checker.nullness.Opt; import org.hl7.fhir.dstu3.model.Enumeration; import org.hl7.fhir.dstu3.model.MedicationAdministration; @@ -52,6 +53,14 @@ public class Parser { "Markdown", "Oid", "PositiveInt", "String", "Time", "UnsignedInt", "Uri", "Url", "Uuid", "XhtmlNode"); + private static final String ONE_TO_ONE = "tgt.set%1$sElement((%3$s%4$s) VersionConvertor_%2$s.convertType(src.get%1$sElement()));"; + private static final String ONE_TO_MANY = "tgt.set%1$s(Collections.singletonList((%3$s%4$s) VersionConvertor_%2$s.convertType(src.get%1$sElement())));"; + private static final String MANY_TO_ONE = "tgt.set%1$sElement((%3$s%4$s) VersionConvertor_%2$s.convertType(src.get%1$s().get(0)));"; + private static final String MANY_TO_MANY = "tgt.set%1$s(src.get%1$s().stream()\n" + + ".map(toConvert -> (%3$s%4$s) VersionConvertor_%2$s.convertType(toConvert))\n" + + ".collect(Collectors.toList())\n" + + ");"; + private static org.hl7.fhir.r5.model.Enumeration convertMedicationAdministrationStatus(org.hl7.fhir.dstu3.model.Enumeration src) { if (src == null) @@ -92,20 +101,20 @@ public class Parser { // VERSION_FILES.forEach(version -> { -// //String version = "10_30"; -// List filenames = listAllJavaFilesInDirectory(new File("").getAbsolutePath() + "/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv" + version + "/"); -// Collections.sort(filenames); -// filenames.forEach(name -> { -// try { -// modifyElementNotField("/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv" + version + "/", name, ".java", listOfPrimitiveTypes, version); -// } catch (FileNotFoundException e) { -// e.printStackTrace(); -// } -// }); + String version = "10_30"; + List filenames = listAllJavaFilesInDirectory(new File("").getAbsolutePath() + "/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv" + version + "/"); + Collections.sort(filenames); + filenames.forEach(name -> { + try { + modifyElementNotField("/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv" + version + "/", name, ".java", listOfPrimitiveTypes, version); + } catch (FileNotFoundException e) { + e.printStackTrace(); + } + }); // }); // try { - modifyElementNotField("/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/", "Account40_50", ".java", listOfPrimitiveTypes, "10_30"); +// modifyElementNotField("/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/", "Account40_50", ".java", listOfPrimitiveTypes, "10_30"); // modifyElementNotField("/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/", "AuditEvent10_30", ".java", listOfPrimitiveTypes, "10_30"); // modifyElementNotField("/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/", "Binary10_30", ".java", listOfPrimitiveTypes, "10_30"); // modifyElementNotField("/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/", "Bundle10_30", ".java", listOfPrimitiveTypes, "10_30"); @@ -127,14 +136,15 @@ public class Parser { ClassOrInterfaceDeclaration classOrInterfaceDeclaration = initializeTypeSovlerAndParser(compilationUnit, projectDirectory, srcdirectory, filename); - MethodDeclaration declaration = null; + MethodDeclaration declaration; - try { - declaration = classOrInterfaceDeclaration.getMethods().stream() - .filter(md -> md.getNameAsString().equals("convert" + extractName(filename))) - .findFirst().get(); - } catch (Exception e) { - System.out.println(); + Optional declarationOption = classOrInterfaceDeclaration.getMethods().stream() + .filter(md -> md.getNameAsString().equals("convert" + extractName(filename))) + .findFirst(); + if (!declarationOption.isPresent()) { + return; + } else { + declaration = declarationOption.get(); // Can't find } String lowerVersionTypeAbsPath = getLowerVersionAbsPathFromImportStatement(declaration.getTypeAsString(), declaration.getParameter(0).getTypeAsString(), version); @@ -215,35 +225,13 @@ public class Parser { @Override public Visitable visit(IfStmt ifStmt, Void arg) { super.visit(ifStmt, arg); - Expression condition = ifStmt.getCondition(); - Statement thenStmt = ifStmt.getThenStmt(); + processIfStatement(ifStmt); + - if (thenStmt instanceof ReturnStmt) { - } else if (thenStmt instanceof IfStmt) { - } else if (thenStmt instanceof ForEachStmt) { - } else if (thenStmt instanceof BlockStmt) { - } else if (thenStmt instanceof ExpressionStmt) { - } else if (thenStmt instanceof TryStmt) { - } else if (thenStmt instanceof ThrowStmt) { -// if (thenStmt instanceof ForEachStmt) { -// System.out.println(); -// } else { -// thenStmt.accept(new VoidVisitorAdapter() { -// @Override -// public void visit(ExpressionStmt n, Void arg) { -// super.visit(n, arg); -// n.getExpression(); -// System.out.println(); -// } -// }, null); -// } - } else { - System.out.println("You haven't caught this then statement case yet."); - System.exit(0); - } return ifStmt; } + }, null); } @@ -252,9 +240,92 @@ public class Parser { } } + public static void processIfStatement(IfStmt ifStmt) { + Expression condition = ifStmt.getCondition(); + Statement thenStmt = ifStmt.getThenStmt(); + //Handle multiple big if blocks + if ((thenStmt instanceof BlockStmt) && (thenStmt.getChildNodes().size() > 1)) { + thenStmt.getChildNodes().forEach(n -> { + if (n instanceof IfStmt) { + processIfStatement((IfStmt) n); + } else { + System.out.println(); + } + }); + } else if (thenStmt instanceof IfStmt) { + processIfStatement((IfStmt) thenStmt); + } else { + Expression expression = processGetStatement(thenStmt); + if (expression != null && !expression.toString().contains("get")) { + System.out.println(); + } else if (expression == null) { + System.out.println("Logger :: was not able to get a getStatement for if statement :: " + ifStmt.toString()); + } + } + } + + public static Expression processGetStatement(Node stmt) { + + if ((stmt instanceof ReturnStmt) || (stmt instanceof ThrowStmt) || (stmt instanceof TryStmt) + || (stmt instanceof NameExpr) || (stmt instanceof FieldAccessExpr) || (stmt instanceof BooleanLiteralExpr) + || (stmt instanceof ConditionalExpr) || (stmt instanceof StringLiteralExpr)) { + // ignore + } else if (stmt instanceof IfStmt) { + System.out.println(); + } else if (stmt instanceof ForEachStmt) { + return ((ForEachStmt) stmt).getIterable(); + } else if (stmt instanceof BlockStmt) { + if (stmt.getChildNodes().size() > 1) { + System.out.println(); + } else { + return processGetStatement(stmt.getChildNodes().get(0)); + } + } else if (stmt instanceof ExpressionStmt) { + return processGetStatement(((ExpressionStmt) stmt).getExpression()); + } else if (stmt instanceof MethodCallExpr) { + if (((MethodCallExpr) stmt).getArguments().size() > 0) { + return processGetStatement(((MethodCallExpr) stmt).getArgument(0)); + } else { + return containsOrReturnNull((Expression) stmt, "get"); + } + } else if (stmt instanceof AssignExpr) { + if (((AssignExpr) stmt).getOperator().equals(AssignExpr.Operator.ASSIGN)) { + return (processGetStatement(stmt.getChildNodes().get(1))); + } else { + System.out.println(); + } + } else if (stmt instanceof UnaryExpr) { + return containsOrReturnNull((Expression) stmt, "get"); + } else if (stmt instanceof BinaryExpr) { + if (((BinaryExpr) stmt).getLeft().toString().contains("get")) { + return processGetStatement(((BinaryExpr) stmt).getLeft()); + } else { + return processGetStatement(((BinaryExpr) stmt).getRight()); + } + } else if (stmt instanceof CastExpr) { + return processGetStatement(((CastExpr) stmt).getExpression()); + } else if (stmt instanceof Expression) { + System.out.println(); + } else { + System.out.println("You haven't caught this then statement case yet."); + System.exit(0); + } + + return null; + } + + public static Expression containsOrReturnNull(Expression e, String keyWord) { + if (e.toString().contains(keyWord)) { + return e; + } else { + return null; + } + } + public static Type resolveInnerType(Type type) { Type toReturn = type; - if (type.toString().contains("List") && !type.toString().contains("List_") && !type.toString().contains("ListResource")) { + if (type.toString().contains("List") && !type.toString().contains("List_") + && !type.toString().contains("ListResource") && !type.toString().contains("ListMode")) { try { toReturn = (Type) type.getChildNodes().get(1); } catch (Exception e) { From 5054c83e90e0ad664a35018cf2feac40a56704e1 Mon Sep 17 00:00:00 2001 From: markiantorno Date: Thu, 6 Feb 2020 15:42:28 -0500 Subject: [PATCH 04/12] convo10_30 updated and verified --- .../convertors/conv10_30/Account10_30.java | 19 +- .../conv10_30/Appointment10_30.java | 55 +- .../conv10_30/AppointmentResponse10_30.java | 31 +- .../convertors/conv10_30/AuditEvent10_30.java | 112 ++-- .../fhir/convertors/conv10_30/Basic10_30.java | 11 +- .../convertors/conv10_30/Binary10_30.java | 20 +- .../convertors/conv10_30/Bundle10_30.java | 137 ++--- .../convertors/conv10_30/CarePlan10_30.java | 30 +- .../conv10_30/ClinicalImpression10_30.java | 39 +- .../conv10_30/Communication10_30.java | 21 +- .../conv10_30/CommunicationRequest10_30.java | 10 +- .../conv10_30/Composition10_30.java | 39 +- .../convertors/conv10_30/ConceptMap10_30.java | 132 ++--- .../convertors/conv10_30/Condition10_30.java | 6 +- .../conv10_30/Conformance10_30.java | 288 +++++---- .../convertors/conv10_30/Contract10_30.java | 84 ++- .../conv10_30/DataElement10_30.java | 113 ++-- .../conv10_30/DetectedIssue10_30.java | 37 +- .../convertors/conv10_30/Device10_30.java | 70 +-- .../conv10_30/DeviceComponent10_30.java | 21 +- .../conv10_30/DeviceMetric10_30.java | 11 +- .../conv10_30/DeviceUseStatement10_30.java | 11 +- .../conv10_30/DiagnosticReport10_30.java | 31 +- .../conv10_30/DocumentManifest10_30.java | 31 +- .../conv10_30/DocumentReference10_30.java | 31 +- .../convertors/conv10_30/Encounter10_30.java | 1 + .../conv10_30/EnrollmentRequest10_30.java | 11 +- .../conv10_30/EnrollmentResponse10_30.java | 21 +- .../conv10_30/EpisodeOfCare10_30.java | 1 + .../conv10_30/FamilyMemberHistory10_30.java | 19 +- .../fhir/convertors/conv10_30/Flag10_30.java | 1 + .../fhir/convertors/conv10_30/Group10_30.java | 45 +- .../conv10_30/HealthcareService10_30.java | 88 ++- .../conv10_30/ImagingStudy10_30.java | 116 ++-- .../conv10_30/Immunization10_30.java | 74 ++- .../ImmunizationRecommendation10_30.java | 48 +- .../conv10_30/ImplementationGuide10_30.java | 193 +++--- .../fhir/convertors/conv10_30/List10_30.java | 27 +- .../convertors/conv10_30/Location10_30.java | 46 +- .../fhir/convertors/conv10_30/Media10_30.java | 35 +- .../convertors/conv10_30/Medication10_30.java | 10 +- .../conv10_30/MedicationDispense10_30.java | 25 +- .../conv10_30/MedicationStatement10_30.java | 22 +- .../conv10_30/MessageHeader10_30.java | 81 ++- .../conv10_30/NamingSystem10_30.java | 88 ++- .../conv10_30/Observation10_30.java | 30 +- .../conv10_30/OperationDefinition10_30.java | 168 +++--- .../conv10_30/OperationOutcome10_30.java | 11 +- .../conv10_30/Organization10_30.java | 20 +- .../convertors/conv10_30/Parameters10_30.java | 11 +- .../convertors/conv10_30/Patient10_30.java | 20 +- .../convertors/conv10_30/Person10_30.java | 20 +- .../conv10_30/Practitioner10_30.java | 20 +- .../convertors/conv10_30/Procedure10_30.java | 10 +- .../conv10_30/ProcedureRequest10_30.java | 1 + .../convertors/conv10_30/Provenance10_30.java | 11 +- .../conv10_30/Questionnaire10_30.java | 99 ++-- .../conv10_30/QuestionnaireResponse10_30.java | 51 +- .../conv10_30/ReferralRequest10_30.java | 11 +- .../conv10_30/RelatedPerson10_30.java | 11 +- .../conv10_30/RiskAssessment10_30.java | 30 +- .../convertors/conv10_30/Schedule10_30.java | 11 +- .../conv10_30/SearchParameter10_30.java | 103 ++-- .../fhir/convertors/conv10_30/Slot10_30.java | 40 +- .../convertors/conv10_30/Specimen10_30.java | 13 +- .../conv10_30/StructureDefinition10_30.java | 167 +++--- .../conv10_30/Subscription10_30.java | 66 +-- .../convertors/conv10_30/Substance10_30.java | 21 +- .../conv10_30/SupplyDelivery10_30.java | 1 + .../conv10_30/SupplyRequest10_30.java | 1 + .../convertors/conv10_30/TestScript10_30.java | 456 ++++++-------- .../convertors/conv10_30/ValueSet10_30.java | 309 +++++----- .../hl7/fhir/convertors/parser/Parser.java | 558 +++++++++--------- 73 files changed, 2077 insertions(+), 2535 deletions(-) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Account10_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Account10_30.java index 6d6707391..89676e3e0 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Account10_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Account10_30.java @@ -13,9 +13,8 @@ public class Account10_30 { if (src.hasIdentifier()) { for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t)); } - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getNameElement())); if (src.hasType()) { tgt.setType(VersionConvertor_10_30.convertCodeableConcept(src.getType())); } @@ -34,9 +33,8 @@ public class Account10_30 { if (src.hasOwner()) { tgt.setOwner(VersionConvertor_10_30.convertReference(src.getOwner())); } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getDescriptionElement())); return tgt; } @@ -48,8 +46,8 @@ public class Account10_30 { if (src.hasIdentifier()) { for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t)); } - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getNameElement())); if (src.hasType()) tgt.setType(VersionConvertor_10_30.convertCodeableConcept(src.getType())); if (src.hasStatus()) { @@ -67,9 +65,8 @@ public class Account10_30 { if (src.hasOwner()) { tgt.setOwner(VersionConvertor_10_30.convertReference(src.getOwner())); } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getDescriptionElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Appointment10_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Appointment10_30.java index e957f51c1..4168d6cf0 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Appointment10_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Appointment10_30.java @@ -1,7 +1,10 @@ package org.hl7.fhir.convertors.conv10_30; import org.hl7.fhir.convertors.VersionConvertor_10_30; +import org.hl7.fhir.dstu2.model.PositiveIntType; +import org.hl7.fhir.dstu2.model.UnsignedIntType; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Appointment10_30 { @@ -19,27 +22,23 @@ public class Appointment10_30 { if (src.hasServiceType()) { for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getServiceType()) tgt.setType(VersionConvertor_10_30.convertCodeableConcept(t)); } - if (src.hasPriority()) { - tgt.setPriority(src.getPriority()); + if (src.hasPriorityElement()) { + tgt.setPriorityElement((UnsignedIntType) VersionConvertor_10_30.convertType(src.getPriorityElement())); } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } - if (src.hasStart()) { - tgt.setStart(src.getStart()); - } - if (src.hasEnd()) { - tgt.setEnd(src.getEnd()); - } - if (src.hasMinutesDuration()) { - tgt.setMinutesDuration(src.getMinutesDuration()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getDescriptionElement())); + if (src.hasStartElement()) + tgt.setStartElement((org.hl7.fhir.dstu2.model.InstantType) VersionConvertor_10_30.convertType(src.getStartElement())); + if (src.hasEndElement()) + tgt.setEndElement((org.hl7.fhir.dstu2.model.InstantType) VersionConvertor_10_30.convertType(src.getEndElement())); + if (src.hasMinutesDurationElement()) { + tgt.setMinutesDurationElement((PositiveIntType) VersionConvertor_10_30.convertType(src.getMinutesDurationElement())); } if (src.hasSlot()) { for (org.hl7.fhir.dstu3.model.Reference t : src.getSlot()) tgt.addSlot(VersionConvertor_10_30.convertReference(t)); } - if (src.hasComment()) { - tgt.setComment(src.getComment()); - } + if (src.hasCommentElement()) + tgt.setCommentElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getCommentElement())); if (src.hasParticipant()) { for (org.hl7.fhir.dstu3.model.Appointment.AppointmentParticipantComponent t : src.getParticipant()) tgt.addParticipant(convertAppointmentParticipantComponent(t)); } @@ -62,24 +61,20 @@ public class Appointment10_30 { if (src.hasPriority()) { tgt.setPriority(src.getPriority()); } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } - if (src.hasStart()) { - tgt.setStart(src.getStart()); - } - if (src.hasEnd()) { - tgt.setEnd(src.getEnd()); - } - if (src.hasMinutesDuration()) { - tgt.setMinutesDuration(src.getMinutesDuration()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getDescriptionElement())); + if (src.hasStartElement()) + tgt.setStartElement((org.hl7.fhir.dstu3.model.InstantType) VersionConvertor_10_30.convertType(src.getStartElement())); + if (src.hasEndElement()) + tgt.setEndElement((org.hl7.fhir.dstu3.model.InstantType) VersionConvertor_10_30.convertType(src.getEndElement())); + if (src.hasMinutesDurationElement()) { + tgt.setMinutesDurationElement((org.hl7.fhir.dstu3.model.PositiveIntType) VersionConvertor_10_30.convertType(src.getMinutesDurationElement())); } if (src.hasSlot()) { for (org.hl7.fhir.dstu2.model.Reference t : src.getSlot()) tgt.addSlot(VersionConvertor_10_30.convertReference(t)); } - if (src.hasComment()) { - tgt.setComment(src.getComment()); - } + if (src.hasCommentElement()) + tgt.setCommentElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getCommentElement())); if (src.hasParticipant()) { for (org.hl7.fhir.dstu2.model.Appointment.AppointmentParticipantComponent t : src.getParticipant()) tgt.addParticipant(convertAppointmentParticipantComponent(t)); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/AppointmentResponse10_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/AppointmentResponse10_30.java index b5eaaee0c..092e82652 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/AppointmentResponse10_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/AppointmentResponse10_30.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_30; import org.hl7.fhir.convertors.VersionConvertor_10_30; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class AppointmentResponse10_30 { @@ -16,12 +17,10 @@ public class AppointmentResponse10_30 { if (src.hasAppointment()) { tgt.setAppointment(VersionConvertor_10_30.convertReference(src.getAppointment())); } - if (src.hasStart()) { - tgt.setStart(src.getStart()); - } - if (src.hasEnd()) { - tgt.setEnd(src.getEnd()); - } + if (src.hasStartElement()) + tgt.setStartElement((org.hl7.fhir.dstu2.model.InstantType) VersionConvertor_10_30.convertType(src.getStartElement())); + if (src.hasEndElement()) + tgt.setEndElement((org.hl7.fhir.dstu2.model.InstantType) VersionConvertor_10_30.convertType(src.getEndElement())); if (src.hasParticipantType()) { for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getParticipantType()) tgt.addParticipantType(VersionConvertor_10_30.convertCodeableConcept(t)); } @@ -31,9 +30,8 @@ public class AppointmentResponse10_30 { if (src.hasParticipantStatus()) { tgt.setParticipantStatus(convertParticipantStatus(src.getParticipantStatus())); } - if (src.hasComment()) { - tgt.setComment(src.getComment()); - } + if (src.hasCommentElement()) + tgt.setCommentElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getCommentElement())); return tgt; } @@ -48,12 +46,10 @@ public class AppointmentResponse10_30 { if (src.hasAppointment()) { tgt.setAppointment(VersionConvertor_10_30.convertReference(src.getAppointment())); } - if (src.hasStart()) { - tgt.setStart(src.getStart()); - } - if (src.hasEnd()) { - tgt.setEnd(src.getEnd()); - } + if (src.hasStartElement()) + tgt.setStartElement((org.hl7.fhir.dstu3.model.InstantType) VersionConvertor_10_30.convertType(src.getStartElement())); + if (src.hasEndElement()) + tgt.setEndElement((org.hl7.fhir.dstu3.model.InstantType) VersionConvertor_10_30.convertType(src.getEndElement())); if (src.hasParticipantType()) { for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getParticipantType()) tgt.addParticipantType(VersionConvertor_10_30.convertCodeableConcept(t)); } @@ -63,9 +59,8 @@ public class AppointmentResponse10_30 { if (src.hasParticipantStatus()) { tgt.setParticipantStatus(convertParticipantStatus(src.getParticipantStatus())); } - if (src.hasComment()) { - tgt.setComment(src.getComment()); - } + if (src.hasCommentElement()) + tgt.setCommentElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getCommentElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/AuditEvent10_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/AuditEvent10_30.java index f4ef2ef09..0a6a52937 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/AuditEvent10_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/AuditEvent10_30.java @@ -1,7 +1,13 @@ package org.hl7.fhir.convertors.conv10_30; import org.hl7.fhir.convertors.VersionConvertor_10_30; +import org.hl7.fhir.dstu2.model.Base64BinaryType; +import org.hl7.fhir.dstu2.model.InstantType; +import org.hl7.fhir.dstu2.model.StringType; +import org.hl7.fhir.dstu3.model.BooleanType; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; +import java.util.stream.Collectors; public class AuditEvent10_30 { @@ -19,14 +25,14 @@ public class AuditEvent10_30 { if (src.hasAction()) { tgt.getEvent().setAction(convertAuditEventAction(src.getAction())); } - if (src.hasRecorded()) { - tgt.getEvent().setDateTime(src.getRecorded()); + if (src.hasRecordedElement()) { + tgt.getEvent().setDateTimeElement((InstantType) VersionConvertor_10_30.convertType(src.getRecordedElement())); } if (src.hasOutcome()) { tgt.getEvent().setOutcome(convertAuditEventOutcome(src.getOutcome())); } - if (src.hasOutcomeDesc()) { - tgt.getEvent().setOutcomeDesc(src.getOutcomeDesc()); + if (src.hasOutcomeDescElement()) { + tgt.getEvent().setOutcomeDescElement((StringType) VersionConvertor_10_30.convertType(src.getOutcomeDescElement())); } if (src.hasPurposeOfEvent()) { for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getPurposeOfEvent()) for (org.hl7.fhir.dstu3.model.Coding cc : t.getCoding()) tgt.getEvent().addPurposeOfEvent(VersionConvertor_10_30.convertCoding(cc)); @@ -59,13 +65,13 @@ public class AuditEvent10_30 { tgt.setAction(convertAuditEventAction(src.getEvent().getAction())); } if (src.hasEvent()) { - tgt.setRecorded(src.getEvent().getDateTime()); + tgt.setRecordedElement((org.hl7.fhir.dstu3.model.InstantType) VersionConvertor_10_30.convertType(src.getEvent().getDateTimeElement())); } if (src.hasEvent()) { tgt.setOutcome(convertAuditEventOutcome(src.getEvent().getOutcome())); } if (src.hasEvent()) { - tgt.setOutcomeDesc(src.getEvent().getOutcomeDesc()); + tgt.setOutcomeDescElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getEvent().getOutcomeDescElement())); } if (src.hasEvent()) { for (org.hl7.fhir.dstu2.model.Coding t : src.getEvent().getPurposeOfEvent()) tgt.addPurposeOfEvent().addCoding(VersionConvertor_10_30.convertCoding(t)); @@ -135,20 +141,20 @@ public class AuditEvent10_30 { if (src.hasUserId()) { tgt.setUserId(VersionConvertor_10_30.convertIdentifier(src.getUserId())); } - if (src.hasAltId()) { - tgt.setAltId(src.getAltId()); - } - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasRequestor()) { - tgt.setRequestor(src.getRequestor()); + if (src.hasAltIdElement()) + tgt.setAltIdElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getAltIdElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getNameElement())); + if (src.hasRequestorElement()) { + tgt.setRequestorElement((BooleanType) VersionConvertor_10_30.convertType(src.getRequestorElement())); } if (src.hasLocation()) { tgt.setLocation(VersionConvertor_10_30.convertReference(src.getLocation())); } if (src.hasPolicy()) { - for (org.hl7.fhir.dstu2.model.UriType t : src.getPolicy()) tgt.addPolicy(t.getValue()); + tgt.setPolicy(src.getPolicy().stream() + .map(policy -> (org.hl7.fhir.dstu3.model.UriType) VersionConvertor_10_30.convertType(policy)) + .collect(Collectors.toList())); } if (src.hasMedia()) { tgt.setMedia(VersionConvertor_10_30.convertCoding(src.getMedia())); @@ -176,14 +182,12 @@ public class AuditEvent10_30 { if (src.hasUserId()) { tgt.setUserId(VersionConvertor_10_30.convertIdentifier(src.getUserId())); } - if (src.hasAltId()) { - tgt.setAltId(src.getAltId()); - } - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasRequestor()) { - tgt.setRequestor(src.getRequestor()); + if (src.hasAltIdElement()) + tgt.setAltIdElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getAltIdElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getNameElement())); + if (src.hasRequestorElement()) { + tgt.setRequestorElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_30.convertType(src.getRequestorElement())); } if (src.hasLocation()) { tgt.setLocation(VersionConvertor_10_30.convertReference(src.getLocation())); @@ -208,9 +212,8 @@ public class AuditEvent10_30 { return null; org.hl7.fhir.dstu2.model.AuditEvent.AuditEventParticipantNetworkComponent tgt = new org.hl7.fhir.dstu2.model.AuditEvent.AuditEventParticipantNetworkComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasAddress()) { - tgt.setAddress(src.getAddress()); - } + if (src.hasAddressElement()) + tgt.setAddressElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getAddressElement())); if (src.hasType()) { tgt.setType(convertAuditEventParticipantNetworkType(src.getType())); } @@ -222,9 +225,8 @@ public class AuditEvent10_30 { return null; org.hl7.fhir.dstu3.model.AuditEvent.AuditEventAgentNetworkComponent tgt = new org.hl7.fhir.dstu3.model.AuditEvent.AuditEventAgentNetworkComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasAddress()) { - tgt.setAddress(src.getAddress()); - } + if (src.hasAddressElement()) + tgt.setAddressElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getAddressElement())); if (src.hasType()) { tgt.setType(convertAuditEventParticipantNetworkType(src.getType())); } @@ -254,12 +256,10 @@ public class AuditEvent10_30 { if (src.hasSecurityLabel()) { for (org.hl7.fhir.dstu2.model.Coding t : src.getSecurityLabel()) tgt.addSecurityLabel(VersionConvertor_10_30.convertCoding(t)); } - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getNameElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getDescriptionElement())); if (src.hasQuery()) { tgt.setQuery(src.getQuery()); } @@ -292,14 +292,12 @@ public class AuditEvent10_30 { if (src.hasSecurityLabel()) { for (org.hl7.fhir.dstu3.model.Coding t : src.getSecurityLabel()) tgt.addSecurityLabel(VersionConvertor_10_30.convertCoding(t)); } - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } - if (src.hasQuery()) { - tgt.setQuery(src.getQuery()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getNameElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getDescriptionElement())); + if (src.hasQueryElement()) { + tgt.setQueryElement((Base64BinaryType) VersionConvertor_10_30.convertType(src.getQueryElement())); } if (src.hasDetail()) { for (org.hl7.fhir.dstu3.model.AuditEvent.AuditEventEntityDetailComponent t : src.getDetail()) tgt.addDetail(convertAuditEventEntityDetailComponent(t)); @@ -312,11 +310,10 @@ public class AuditEvent10_30 { return null; org.hl7.fhir.dstu2.model.AuditEvent.AuditEventObjectDetailComponent tgt = new org.hl7.fhir.dstu2.model.AuditEvent.AuditEventObjectDetailComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasType()) { - tgt.setType(src.getType()); - } - if (src.hasValue()) { - tgt.setValue(src.getValue()); + if (src.hasTypeElement()) + tgt.setTypeElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getTypeElement())); + if (src.hasValueElement()) { + tgt.setValueElement((Base64BinaryType) VersionConvertor_10_30.convertType(src.getValueElement())); } return tgt; } @@ -326,11 +323,10 @@ public class AuditEvent10_30 { return null; org.hl7.fhir.dstu3.model.AuditEvent.AuditEventEntityDetailComponent tgt = new org.hl7.fhir.dstu3.model.AuditEvent.AuditEventEntityDetailComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasType()) { - tgt.setType(src.getType()); - } - if (src.hasValue()) { - tgt.setValue(src.getValue()); + if (src.hasTypeElement()) + tgt.setTypeElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getTypeElement())); + if (src.hasValueElement()) { + tgt.setValueElement((org.hl7.fhir.dstu3.model.Base64BinaryType) VersionConvertor_10_30.convertType(src.getValueElement())); } return tgt; } @@ -412,9 +408,8 @@ public class AuditEvent10_30 { return null; org.hl7.fhir.dstu2.model.AuditEvent.AuditEventSourceComponent tgt = new org.hl7.fhir.dstu2.model.AuditEvent.AuditEventSourceComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasSite()) { - tgt.setSite(src.getSite()); - } + if (src.hasSiteElement()) + tgt.setSiteElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getSiteElement())); if (src.hasIdentifier()) { tgt.setIdentifier(VersionConvertor_10_30.convertIdentifier(src.getIdentifier())); } @@ -429,9 +424,8 @@ public class AuditEvent10_30 { return null; org.hl7.fhir.dstu3.model.AuditEvent.AuditEventSourceComponent tgt = new org.hl7.fhir.dstu3.model.AuditEvent.AuditEventSourceComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasSite()) { - tgt.setSite(src.getSite()); - } + if (src.hasSiteElement()) + tgt.setSiteElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getSiteElement())); if (src.hasIdentifier()) { tgt.setIdentifier(VersionConvertor_10_30.convertIdentifier(src.getIdentifier())); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Basic10_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Basic10_30.java index 58035aeb6..73cd38b86 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Basic10_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Basic10_30.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_30; import org.hl7.fhir.convertors.VersionConvertor_10_30; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Basic10_30 { @@ -19,9 +20,8 @@ public class Basic10_30 { if (src.hasSubject()) { tgt.setSubject(VersionConvertor_10_30.convertReference(src.getSubject())); } - if (src.hasCreated()) { - tgt.setCreated(src.getCreated()); - } + if (src.hasCreatedElement()) + tgt.setCreatedElement((org.hl7.fhir.dstu2.model.DateType) VersionConvertor_10_30.convertType(src.getCreatedElement())); if (src.hasAuthor()) { tgt.setAuthor(VersionConvertor_10_30.convertReference(src.getAuthor())); } @@ -42,9 +42,8 @@ public class Basic10_30 { if (src.hasSubject()) { tgt.setSubject(VersionConvertor_10_30.convertReference(src.getSubject())); } - if (src.hasCreated()) { - tgt.setCreated(src.getCreated()); - } + if (src.hasCreatedElement()) + tgt.setCreatedElement((org.hl7.fhir.dstu3.model.DateType) VersionConvertor_10_30.convertType(src.getCreatedElement())); if (src.hasAuthor()) { tgt.setAuthor(VersionConvertor_10_30.convertReference(src.getAuthor())); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Binary10_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Binary10_30.java index 2d15a7b55..14ad2f73a 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Binary10_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Binary10_30.java @@ -1,7 +1,9 @@ package org.hl7.fhir.convertors.conv10_30; import org.hl7.fhir.convertors.VersionConvertor_10_30; +import org.hl7.fhir.dstu2.model.Base64BinaryType; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Binary10_30 { @@ -10,11 +12,10 @@ public class Binary10_30 { return null; org.hl7.fhir.dstu2.model.Binary tgt = new org.hl7.fhir.dstu2.model.Binary(); VersionConvertor_10_30.copyResource(src, tgt); - if (src.hasContentType()) { - tgt.setContentType(src.getContentType()); - } - if (src.hasContent()) { - tgt.setContent(src.getContent()); + if (src.hasContentTypeElement()) + tgt.setContentTypeElement((org.hl7.fhir.dstu2.model.CodeType) VersionConvertor_10_30.convertType(src.getContentTypeElement())); + if (src.hasContentElement()) { + tgt.setContentElement((Base64BinaryType) VersionConvertor_10_30.convertType(src.getContentElement())); } return tgt; } @@ -24,11 +25,10 @@ public class Binary10_30 { return null; org.hl7.fhir.dstu3.model.Binary tgt = new org.hl7.fhir.dstu3.model.Binary(); VersionConvertor_10_30.copyResource(src, tgt); - if (src.hasContentType()) { - tgt.setContentType(src.getContentType()); - } - if (src.hasContent()) { - tgt.setContent(src.getContent()); + if (src.hasContentTypeElement()) + tgt.setContentTypeElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_10_30.convertType(src.getContentTypeElement())); + if (src.hasContentElement()) { + tgt.setContentElement((org.hl7.fhir.dstu3.model.Base64BinaryType) VersionConvertor_10_30.convertType(src.getContentElement())); } return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Bundle10_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Bundle10_30.java index d1eb6fbfc..40ead638e 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Bundle10_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Bundle10_30.java @@ -2,7 +2,11 @@ package org.hl7.fhir.convertors.conv10_30; import org.hl7.fhir.convertors.VersionConvertorAdvisor30; import org.hl7.fhir.convertors.VersionConvertor_10_30; +import org.hl7.fhir.dstu2.model.DecimalType; +import org.hl7.fhir.dstu2.model.UriType; +import org.hl7.fhir.dstu3.model.UnsignedIntType; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Bundle10_30 { @@ -14,8 +18,8 @@ public class Bundle10_30 { if (src.hasType()) { tgt.setType(convertBundleType(src.getType())); } - if (src.hasTotal()) - tgt.setTotal(src.getTotal()); + if (src.hasTotalElement()) + tgt.setTotalElement((UnsignedIntType) VersionConvertor_10_30.convertType(src.getTotalElement())); if (src.hasLink()) { for (org.hl7.fhir.dstu2.model.Bundle.BundleLinkComponent t : src.getLink()) tgt.addLink(convertBundleLinkComponent(t)); } @@ -36,8 +40,8 @@ public class Bundle10_30 { if (src.hasType()) { tgt.setType(convertBundleType(src.getType())); } - if (src.hasTotal()) - tgt.setTotal(src.getTotal()); + if (src.hasTotalElement()) + tgt.setTotalElement((org.hl7.fhir.dstu2.model.UnsignedIntType) VersionConvertor_10_30.convertType(src.getTotalElement())); if (src.hasLink()) { for (org.hl7.fhir.dstu3.model.Bundle.BundleLinkComponent t : src.getLink()) tgt.addLink(convertBundleLinkComponent(t)); } @@ -61,7 +65,7 @@ public class Bundle10_30 { org.hl7.fhir.dstu2.model.Bundle.BundleEntryComponent tgt = new org.hl7.fhir.dstu2.model.Bundle.BundleEntryComponent(); VersionConvertor_10_30.copyElement(src, tgt); for (org.hl7.fhir.dstu3.model.Bundle.BundleLinkComponent t : src.getLink()) tgt.addLink(convertBundleLinkComponent(t)); - tgt.setFullUrl(src.getFullUrl()); + tgt.setFullUrlElement((UriType) VersionConvertor_10_30.convertType(src.getFullUrlElement())); org.hl7.fhir.dstu2.model.Resource res = advisor.convert(src.getResource()); if (res == null) res = VersionConvertor_10_30.convertResource(src.getResource()); @@ -87,9 +91,8 @@ public class Bundle10_30 { if (src.hasLink()) { for (org.hl7.fhir.dstu2.model.Bundle.BundleLinkComponent t : src.getLink()) tgt.addLink(convertBundleLinkComponent(t)); } - if (src.hasFullUrl()) { - tgt.setFullUrl(src.getFullUrl()); - } + if (src.hasFullUrlElement()) + tgt.setFullUrlElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_10_30.convertType(src.getFullUrlElement())); if (src.hasResource()) { tgt.setResource(VersionConvertor_10_30.convertResource(src.getResource())); } @@ -113,21 +116,16 @@ public class Bundle10_30 { if (src.hasMethod()) { tgt.setMethod(convertHTTPVerb(src.getMethod())); } - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } - if (src.hasIfNoneMatch()) { - tgt.setIfNoneMatch(src.getIfNoneMatch()); - } - if (src.hasIfModifiedSince()) { - tgt.setIfModifiedSince(src.getIfModifiedSince()); - } - if (src.hasIfMatch()) { - tgt.setIfMatch(src.getIfMatch()); - } - if (src.hasIfNoneExist()) { - tgt.setIfNoneExist(src.getIfNoneExist()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_30.convertType(src.getUrlElement())); + if (src.hasIfNoneMatchElement()) + tgt.setIfNoneMatchElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getIfNoneMatchElement())); + if (src.hasIfModifiedSinceElement()) + tgt.setIfModifiedSinceElement((org.hl7.fhir.dstu2.model.InstantType) VersionConvertor_10_30.convertType(src.getIfModifiedSinceElement())); + if (src.hasIfMatchElement()) + tgt.setIfMatchElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getIfMatchElement())); + if (src.hasIfNoneExistElement()) + tgt.setIfNoneExistElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getIfNoneExistElement())); return tgt; } @@ -139,21 +137,16 @@ public class Bundle10_30 { if (src.hasMethod()) { tgt.setMethod(convertHTTPVerb(src.getMethod())); } - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } - if (src.hasIfNoneMatch()) { - tgt.setIfNoneMatch(src.getIfNoneMatch()); - } - if (src.hasIfModifiedSince()) { - tgt.setIfModifiedSince(src.getIfModifiedSince()); - } - if (src.hasIfMatch()) { - tgt.setIfMatch(src.getIfMatch()); - } - if (src.hasIfNoneExist()) { - tgt.setIfNoneExist(src.getIfNoneExist()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_10_30.convertType(src.getUrlElement())); + if (src.hasIfNoneMatchElement()) + tgt.setIfNoneMatchElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getIfNoneMatchElement())); + if (src.hasIfModifiedSinceElement()) + tgt.setIfModifiedSinceElement((org.hl7.fhir.dstu3.model.InstantType) VersionConvertor_10_30.convertType(src.getIfModifiedSinceElement())); + if (src.hasIfMatchElement()) + tgt.setIfMatchElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getIfMatchElement())); + if (src.hasIfNoneExistElement()) + tgt.setIfNoneExistElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getIfNoneExistElement())); return tgt; } @@ -162,18 +155,14 @@ public class Bundle10_30 { return null; org.hl7.fhir.dstu2.model.Bundle.BundleEntryResponseComponent tgt = new org.hl7.fhir.dstu2.model.Bundle.BundleEntryResponseComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasStatus()) { - tgt.setStatus(src.getStatus()); - } - if (src.hasLocation()) { - tgt.setLocation(src.getLocation()); - } - if (src.hasEtag()) { - tgt.setEtag(src.getEtag()); - } - if (src.hasLastModified()) { - tgt.setLastModified(src.getLastModified()); - } + if (src.hasStatusElement()) + tgt.setStatusElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getStatusElement())); + if (src.hasLocationElement()) + tgt.setLocationElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_30.convertType(src.getLocationElement())); + if (src.hasEtagElement()) + tgt.setEtagElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getEtagElement())); + if (src.hasLastModifiedElement()) + tgt.setLastModifiedElement((org.hl7.fhir.dstu2.model.InstantType) VersionConvertor_10_30.convertType(src.getLastModifiedElement())); return tgt; } @@ -182,18 +171,14 @@ public class Bundle10_30 { return null; org.hl7.fhir.dstu3.model.Bundle.BundleEntryResponseComponent tgt = new org.hl7.fhir.dstu3.model.Bundle.BundleEntryResponseComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasStatus()) { - tgt.setStatus(src.getStatus()); - } - if (src.hasLocation()) { - tgt.setLocation(src.getLocation()); - } - if (src.hasEtag()) { - tgt.setEtag(src.getEtag()); - } - if (src.hasLastModified()) { - tgt.setLastModified(src.getLastModified()); - } + if (src.hasStatusElement()) + tgt.setStatusElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getStatusElement())); + if (src.hasLocationElement()) + tgt.setLocationElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_10_30.convertType(src.getLocationElement())); + if (src.hasEtagElement()) + tgt.setEtagElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getEtagElement())); + if (src.hasLastModifiedElement()) + tgt.setLastModifiedElement((org.hl7.fhir.dstu3.model.InstantType) VersionConvertor_10_30.convertType(src.getLastModifiedElement())); return tgt; } @@ -205,8 +190,8 @@ public class Bundle10_30 { if (src.hasMode()) { tgt.setMode(convertSearchEntryMode(src.getMode())); } - if (src.hasScore()) { - tgt.setScore(src.getScore()); + if (src.hasScoreElement()) { + tgt.setScoreElement((DecimalType) VersionConvertor_10_30.convertType(src.getScoreElement())); } return tgt; } @@ -219,8 +204,8 @@ public class Bundle10_30 { if (src.hasMode()) { tgt.setMode(convertSearchEntryMode(src.getMode())); } - if (src.hasScore()) { - tgt.setScore(src.getScore()); + if (src.hasScoreElement()) { + tgt.setScoreElement((org.hl7.fhir.dstu3.model.DecimalType) VersionConvertor_10_30.convertType(src.getScoreElement())); } return tgt; } @@ -230,12 +215,10 @@ public class Bundle10_30 { return null; org.hl7.fhir.dstu2.model.Bundle.BundleLinkComponent tgt = new org.hl7.fhir.dstu2.model.Bundle.BundleLinkComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasRelation()) { - tgt.setRelation(src.getRelation()); - } - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } + if (src.hasRelationElement()) + tgt.setRelationElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getRelationElement())); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_30.convertType(src.getUrlElement())); return tgt; } @@ -244,12 +227,10 @@ public class Bundle10_30 { return null; org.hl7.fhir.dstu3.model.Bundle.BundleLinkComponent tgt = new org.hl7.fhir.dstu3.model.Bundle.BundleLinkComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasRelation()) { - tgt.setRelation(src.getRelation()); - } - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } + if (src.hasRelationElement()) + tgt.setRelationElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getRelationElement())); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_10_30.convertType(src.getUrlElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/CarePlan10_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/CarePlan10_30.java index d5fcaf7af..68b7739b2 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/CarePlan10_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/CarePlan10_30.java @@ -1,7 +1,9 @@ package org.hl7.fhir.convertors.conv10_30; import org.hl7.fhir.convertors.VersionConvertor_10_30; +import org.hl7.fhir.dstu3.model.BooleanType; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class CarePlan10_30 { @@ -31,9 +33,8 @@ public class CarePlan10_30 { if (src.hasCategory()) { for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getCategory()) tgt.addCategory(VersionConvertor_10_30.convertCodeableConcept(t)); } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getDescriptionElement())); if (src.hasAddresses()) { for (org.hl7.fhir.dstu2.model.Reference t : src.getAddresses()) tgt.addAddresses(VersionConvertor_10_30.convertReference(t)); } @@ -72,9 +73,8 @@ public class CarePlan10_30 { if (src.hasCategory()) { for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getCategory()) tgt.addCategory(VersionConvertor_10_30.convertCodeableConcept(t)); } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getDescriptionElement())); if (src.hasAddresses()) { for (org.hl7.fhir.dstu3.model.Reference t : src.getAddresses()) tgt.addAddresses(VersionConvertor_10_30.convertReference(t)); } @@ -144,8 +144,8 @@ public class CarePlan10_30 { if (src.hasStatus()) { tgt.setStatus(convertCarePlanActivityStatus(src.getStatus())); } - if (src.hasProhibited()) { - tgt.setProhibited(src.getProhibited()); + if (src.hasProhibitedElement()) { + tgt.setProhibitedElement((BooleanType) VersionConvertor_10_30.convertType(src.getProhibitedElement())); } if (src.hasScheduled()) { tgt.setScheduled(VersionConvertor_10_30.convertType(src.getScheduled())); @@ -165,9 +165,8 @@ public class CarePlan10_30 { if (src.hasQuantity()) { tgt.setQuantity(VersionConvertor_10_30.convertSimpleQuantity(src.getQuantity())); } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getDescriptionElement())); return tgt; } @@ -194,8 +193,8 @@ public class CarePlan10_30 { if (src.hasStatus()) { tgt.setStatus(convertCarePlanActivityStatus(src.getStatus())); } - if (src.hasProhibited()) { - tgt.setProhibited(src.getProhibited()); + if (src.hasProhibitedElement()) { + tgt.setProhibitedElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_30.convertType(src.getProhibitedElement())); } if (src.hasScheduled()) { tgt.setScheduled(VersionConvertor_10_30.convertType(src.getScheduled())); @@ -215,9 +214,8 @@ public class CarePlan10_30 { if (src.hasQuantity()) { tgt.setQuantity(VersionConvertor_10_30.convertSimpleQuantity(src.getQuantity())); } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getDescriptionElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/ClinicalImpression10_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/ClinicalImpression10_30.java index 085624c3e..15fbe8458 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/ClinicalImpression10_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/ClinicalImpression10_30.java @@ -1,8 +1,10 @@ package org.hl7.fhir.convertors.conv10_30; import org.hl7.fhir.convertors.VersionConvertor_10_30; +import org.hl7.fhir.dstu3.model.StringType; import org.hl7.fhir.dstu3.model.UriType; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class ClinicalImpression10_30 { @@ -20,28 +22,25 @@ public class ClinicalImpression10_30 { if (src.hasStatus()) { tgt.setStatus(convertClinicalImpressionStatus(src.getStatus())); } - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_10_30.convertType(src.getDateElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getDescriptionElement())); if (src.hasPrevious()) { tgt.setPrevious(VersionConvertor_10_30.convertReference(src.getPrevious())); } if (src.hasProblem()) { for (org.hl7.fhir.dstu2.model.Reference t : src.getProblem()) tgt.addProblem(VersionConvertor_10_30.convertReference(t)); } - if (src.hasProtocol()) { - tgt.addProtocol(src.getProtocol()); - } - if (src.hasSummary()) { - tgt.setSummary(src.getSummary()); - } + if (src.hasProtocolElement()) + tgt.setProtocol(Collections.singletonList((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_10_30.convertType(src.getProtocolElement()))); + if (src.hasSummaryElement()) + tgt.setSummaryElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getSummaryElement())); if (src.hasFinding()) { for (org.hl7.fhir.dstu2.model.ClinicalImpression.ClinicalImpressionFindingComponent t : src.getFinding()) tgt.addFinding(convertClinicalImpressionFindingComponent(t)); } - if (src.hasPrognosis()) - tgt.addPrognosisCodeableConcept().setText(src.getPrognosis()); + if (src.hasPrognosisElement()) + tgt.addPrognosisCodeableConcept().setTextElement((StringType) VersionConvertor_10_30.convertType(src.getPrognosisElement())); if (src.hasAction()) { for (org.hl7.fhir.dstu2.model.Reference t : src.getAction()) tgt.addAction(VersionConvertor_10_30.convertReference(t)); } @@ -62,11 +61,10 @@ public class ClinicalImpression10_30 { if (src.hasStatus()) { tgt.setStatus(convertClinicalImpressionStatus(src.getStatus())); } - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_30.convertType(src.getDateElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getDescriptionElement())); if (src.hasPrevious()) { tgt.setPrevious(VersionConvertor_10_30.convertReference(src.getPrevious())); } @@ -76,9 +74,8 @@ public class ClinicalImpression10_30 { if (src.hasProtocol()) { for (UriType t : src.getProtocol()) tgt.setProtocol(t.asStringValue()); } - if (src.hasSummary()) { - tgt.setSummary(src.getSummary()); - } + if (src.hasSummaryElement()) + tgt.setSummaryElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getSummaryElement())); if (src.hasFinding()) { for (org.hl7.fhir.dstu3.model.ClinicalImpression.ClinicalImpressionFindingComponent t : src.getFinding()) tgt.addFinding(convertClinicalImpressionFindingComponent(t)); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Communication10_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Communication10_30.java index a6077ae79..98194f78b 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Communication10_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Communication10_30.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_30; import org.hl7.fhir.convertors.VersionConvertor_10_30; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Communication10_30 { @@ -34,12 +35,10 @@ public class Communication10_30 { if (src.hasEncounter()) { tgt.setContext(VersionConvertor_10_30.convertReference(src.getEncounter())); } - if (src.hasSent()) { - tgt.setSent(src.getSent()); - } - if (src.hasReceived()) { - tgt.setReceived(src.getReceived()); - } + if (src.hasSentElement()) + tgt.setSentElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_10_30.convertType(src.getSentElement())); + if (src.hasReceivedElement()) + tgt.setReceivedElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_10_30.convertType(src.getReceivedElement())); if (src.hasReason()) { for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getReason()) tgt.addReasonCode(VersionConvertor_10_30.convertCodeableConcept(t)); } @@ -78,12 +77,10 @@ public class Communication10_30 { if (src.hasContext()) { tgt.setEncounter(VersionConvertor_10_30.convertReference(src.getContext())); } - if (src.hasSent()) { - tgt.setSent(src.getSent()); - } - if (src.hasReceived()) { - tgt.setReceived(src.getReceived()); - } + if (src.hasSentElement()) + tgt.setSentElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_30.convertType(src.getSentElement())); + if (src.hasReceivedElement()) + tgt.setReceivedElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_30.convertType(src.getReceivedElement())); if (src.hasReasonCode()) { for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getReasonCode()) tgt.addReason(VersionConvertor_10_30.convertCodeableConcept(t)); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/CommunicationRequest10_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/CommunicationRequest10_30.java index 7f9cba1c5..dd3a301e2 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/CommunicationRequest10_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/CommunicationRequest10_30.java @@ -1,7 +1,9 @@ package org.hl7.fhir.convertors.conv10_30; import org.hl7.fhir.convertors.VersionConvertor_10_30; +import org.hl7.fhir.dstu2.model.DateTimeType; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class CommunicationRequest10_30 { @@ -43,8 +45,8 @@ public class CommunicationRequest10_30 { if (src.hasReasonCode()) { for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getReasonCode()) tgt.addReason(VersionConvertor_10_30.convertCodeableConcept(t)); } - if (src.hasAuthoredOn()) { - tgt.setRequestedOn(src.getAuthoredOn()); + if (src.hasAuthoredOnElement()) { + tgt.setRequestedOnElement((DateTimeType) VersionConvertor_10_30.convertType(src.getAuthoredOnElement())); } if (src.hasSubject()) { tgt.setSubject(VersionConvertor_10_30.convertReference(src.getSubject())); @@ -93,8 +95,8 @@ public class CommunicationRequest10_30 { if (src.hasReason()) { for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getReason()) tgt.addReasonCode(VersionConvertor_10_30.convertCodeableConcept(t)); } - if (src.hasRequestedOn()) { - tgt.setAuthoredOn(src.getRequestedOn()); + if (src.hasRequestedOnElement()) { + tgt.setAuthoredOnElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_10_30.convertType(src.getRequestedOnElement())); } if (src.hasSubject()) { tgt.setSubject(VersionConvertor_10_30.convertReference(src.getSubject())); diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Composition10_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Composition10_30.java index 20defc7c3..45f300ea3 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Composition10_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Composition10_30.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_30; import org.hl7.fhir.convertors.VersionConvertor_10_30; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Composition10_30 { @@ -13,17 +14,16 @@ public class Composition10_30 { if (src.hasIdentifier()) { tgt.setIdentifier(VersionConvertor_10_30.convertIdentifier(src.getIdentifier())); } - if (src.hasDate()) - tgt.setDate(src.getDate()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_10_30.convertType(src.getDateElement())); if (src.hasType()) { tgt.setType(VersionConvertor_10_30.convertCodeableConcept(src.getType())); } if (src.hasClass_()) { tgt.setClass_(VersionConvertor_10_30.convertCodeableConcept(src.getClass_())); } - if (src.hasTitle()) { - tgt.setTitle(src.getTitle()); - } + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getTitleElement())); if (src.hasStatus()) { tgt.setStatus(convertCompositionStatus(src.getStatus())); } @@ -66,17 +66,16 @@ public class Composition10_30 { if (src.hasIdentifier()) { tgt.setIdentifier(VersionConvertor_10_30.convertIdentifier(src.getIdentifier())); } - if (src.hasDate()) - tgt.setDate(src.getDate()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_30.convertType(src.getDateElement())); if (src.hasType()) { tgt.setType(VersionConvertor_10_30.convertCodeableConcept(src.getType())); } if (src.hasClass_()) { tgt.setClass_(VersionConvertor_10_30.convertCodeableConcept(src.getClass_())); } - if (src.hasTitle()) { - tgt.setTitle(src.getTitle()); - } + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getTitleElement())); if (src.hasStatus()) { tgt.setStatus(convertCompositionStatus(src.getStatus())); } @@ -149,9 +148,8 @@ public class Composition10_30 { if (src.hasMode()) { for (org.hl7.fhir.dstu2.model.Enumeration t : src.getMode()) VersionConvertor_10_30.copyElement(t, tgt.addModeElement().setValue(convertCompositionAttestationMode(t.getValue()))); } - if (src.hasTime()) { - tgt.setTime(src.getTime()); - } + if (src.hasTimeElement()) + tgt.setTimeElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_10_30.convertType(src.getTimeElement())); if (src.hasParty()) { tgt.setParty(VersionConvertor_10_30.convertReference(src.getParty())); } @@ -166,9 +164,8 @@ public class Composition10_30 { if (src.hasMode()) { for (org.hl7.fhir.dstu3.model.Enumeration t : src.getMode()) VersionConvertor_10_30.copyElement(t, tgt.addModeElement().setValue(convertCompositionAttestationMode(t.getValue()))); } - if (src.hasTime()) { - tgt.setTime(src.getTime()); - } + if (src.hasTimeElement()) + tgt.setTimeElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_30.convertType(src.getTimeElement())); if (src.hasParty()) { tgt.setParty(VersionConvertor_10_30.convertReference(src.getParty())); } @@ -248,9 +245,8 @@ public class Composition10_30 { return null; org.hl7.fhir.dstu3.model.Composition.SectionComponent tgt = new org.hl7.fhir.dstu3.model.Composition.SectionComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasTitle()) { - tgt.setTitle(src.getTitle()); - } + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getTitleElement())); if (src.hasCode()) { tgt.setCode(VersionConvertor_10_30.convertCodeableConcept(src.getCode())); } @@ -284,9 +280,8 @@ public class Composition10_30 { return null; org.hl7.fhir.dstu2.model.Composition.SectionComponent tgt = new org.hl7.fhir.dstu2.model.Composition.SectionComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasTitle()) { - tgt.setTitle(src.getTitle()); - } + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getTitleElement())); if (src.hasCode()) { tgt.setCode(VersionConvertor_10_30.convertCodeableConcept(src.getCode())); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/ConceptMap10_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/ConceptMap10_30.java index b2237975e..671ef0114 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/ConceptMap10_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/ConceptMap10_30.java @@ -1,11 +1,16 @@ package org.hl7.fhir.convertors.conv10_30; import org.hl7.fhir.convertors.VersionConvertor_10_30; +import org.hl7.fhir.dstu2.model.BooleanType; +import org.hl7.fhir.dstu2.model.StringType; +import org.hl7.fhir.dstu3.model.CodeType; import org.hl7.fhir.dstu3.model.ConceptMap; import org.hl7.fhir.dstu3.model.ConceptMap.ConceptMapGroupComponent; +import org.hl7.fhir.dstu3.model.UriType; import org.hl7.fhir.exceptions.FHIRException; import java.util.ArrayList; import java.util.List; +import java.util.Collections; public class ConceptMap10_30 { @@ -14,34 +19,29 @@ public class ConceptMap10_30 { return null; org.hl7.fhir.dstu2.model.ConceptMap tgt = new org.hl7.fhir.dstu2.model.ConceptMap(); VersionConvertor_10_30.copyDomainResource(src, tgt); - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_30.convertType(src.getUrlElement())); if (src.hasIdentifier()) { tgt.setIdentifier(VersionConvertor_10_30.convertIdentifier(src.getIdentifier())); } - if (src.hasVersion()) { - tgt.setVersion(src.getVersion()); - } - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_10_30.convertConformanceResourceStatus(src.getStatus())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasPublisher()) { - tgt.setPublisher(src.getPublisher()); - } + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((BooleanType) VersionConvertor_10_30.convertType(src.getExperimentalElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) tgt.addContact(convertConceptMapContactComponent(t)); } - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_30.convertType(src.getDateElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getDescriptionElement())); for (org.hl7.fhir.dstu3.model.UsageContext t : src.getUseContext()) if (t.hasValueCodeableConcept()) tgt.addUseContext(VersionConvertor_10_30.convertCodeableConcept(t.getValueCodeableConcept())); if (src.hasJurisdiction()) { @@ -50,9 +50,8 @@ public class ConceptMap10_30 { if (src.hasPurpose()) { tgt.setRequirements(src.getPurpose()); } - if (src.hasCopyright()) { - tgt.setCopyright(src.getCopyright()); - } + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getCopyrightElement())); if (src.hasSource()) { tgt.setSource(VersionConvertor_10_30.convertType(src.getSource())); } @@ -70,34 +69,29 @@ public class ConceptMap10_30 { return null; org.hl7.fhir.dstu3.model.ConceptMap tgt = new org.hl7.fhir.dstu3.model.ConceptMap(); VersionConvertor_10_30.copyDomainResource(src, tgt); - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_10_30.convertType(src.getUrlElement())); if (src.hasIdentifier()) { tgt.setIdentifier(VersionConvertor_10_30.convertIdentifier(src.getIdentifier())); } - if (src.hasVersion()) { - tgt.setVersion(src.getVersion()); - } - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_10_30.convertConformanceResourceStatus(src.getStatus())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasPublisher()) { - tgt.setPublisher(src.getPublisher()); - } + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_10_30.convertType(src.getExperimentalElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu2.model.ConceptMap.ConceptMapContactComponent t : src.getContact()) tgt.addContact(convertConceptMapContactComponent(t)); } - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_10_30.convertType(src.getDateElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_10_30.convertType(src.getDescriptionElement())); for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getUseContext()) if (VersionConvertor_10_30.isJurisdiction(t)) tgt.addJurisdiction(VersionConvertor_10_30.convertCodeableConcept(t)); else @@ -105,9 +99,8 @@ public class ConceptMap10_30 { if (src.hasRequirements()) { tgt.setPurpose(src.getRequirements()); } - if (src.hasCopyright()) { - tgt.setCopyright(src.getCopyright()); - } + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_10_30.convertType(src.getCopyrightElement())); if (src.hasSource()) { tgt.setSource(VersionConvertor_10_30.convertType(src.getSource())); } @@ -126,9 +119,8 @@ public class ConceptMap10_30 { return null; org.hl7.fhir.dstu3.model.ContactDetail tgt = new org.hl7.fhir.dstu3.model.ContactDetail(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_30.convertContactPoint(t)); } @@ -140,9 +132,8 @@ public class ConceptMap10_30 { return null; org.hl7.fhir.dstu2.model.ConceptMap.ConceptMapContactComponent tgt = new org.hl7.fhir.dstu2.model.ConceptMap.ConceptMapContactComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu3.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_30.convertContactPoint(t)); } @@ -208,15 +199,14 @@ public class ConceptMap10_30 { return null; org.hl7.fhir.dstu3.model.ConceptMap.OtherElementComponent tgt = new org.hl7.fhir.dstu3.model.ConceptMap.OtherElementComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasElement()) { - tgt.setProperty(src.getElement()); + if (src.hasElementElement()) { + tgt.setPropertyElement((UriType) VersionConvertor_10_30.convertType(src.getElementElement())); } if (src.hasCodeSystem()) { tgt.setSystem(src.getCodeSystem()); } - if (src.hasCode()) { - tgt.setCode(src.getCode()); - } + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getCodeElement())); return tgt; } @@ -231,9 +221,8 @@ public class ConceptMap10_30 { if (src.hasSystem()) { tgt.setCodeSystem(src.getSystem()); } - if (src.hasCode()) { - tgt.setCode(src.getCode()); - } + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getCodeElement())); return tgt; } @@ -244,8 +233,8 @@ public class ConceptMap10_30 { for (org.hl7.fhir.dstu2.model.ConceptMap.TargetElementComponent t : src.getTarget()) { org.hl7.fhir.dstu3.model.ConceptMap.SourceElementComponent tgt = new org.hl7.fhir.dstu3.model.ConceptMap.SourceElementComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasCode()) { - tgt.setCode(src.getCode()); + if (src.hasCodeElement()) { + tgt.setCodeElement((CodeType) VersionConvertor_10_30.convertType(src.getCodeElement())); } tgt.addTarget(convertTargetElementComponent(t)); if (src.hasCodeSystem()) { @@ -261,9 +250,8 @@ public class ConceptMap10_30 { org.hl7.fhir.dstu2.model.ConceptMap.SourceElementComponent tgt = new org.hl7.fhir.dstu2.model.ConceptMap.SourceElementComponent(); VersionConvertor_10_30.copyElement(src, tgt); tgt.setCodeSystem(g.getSource()); - if (src.hasCode()) { - tgt.setCode(src.getCode()); - } + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu2.model.CodeType) VersionConvertor_10_30.convertType(src.getCodeElement())); if (src.hasTarget()) { for (org.hl7.fhir.dstu3.model.ConceptMap.TargetElementComponent t : src.getTarget()) tgt.addTarget(convertTargetElementComponent(t, g)); } @@ -276,14 +264,13 @@ public class ConceptMap10_30 { org.hl7.fhir.dstu2.model.ConceptMap.TargetElementComponent tgt = new org.hl7.fhir.dstu2.model.ConceptMap.TargetElementComponent(); VersionConvertor_10_30.copyElement(src, tgt); tgt.setCodeSystem(g.getTarget()); - if (src.hasCode()) { - tgt.setCode(src.getCode()); - } + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu2.model.CodeType) VersionConvertor_10_30.convertType(src.getCodeElement())); if (src.hasEquivalence()) { tgt.setEquivalence(convertConceptMapEquivalence(src.getEquivalence())); } - if (src.hasComment()) { - tgt.setComments(src.getComment()); + if (src.hasCommentElement()) { + tgt.setCommentsElement((StringType) VersionConvertor_10_30.convertType(src.getCommentElement())); } if (src.hasDependsOn()) { for (org.hl7.fhir.dstu3.model.ConceptMap.OtherElementComponent t : src.getDependsOn()) tgt.addDependsOn(convertOtherElementComponent(t)); @@ -299,14 +286,13 @@ public class ConceptMap10_30 { return null; org.hl7.fhir.dstu3.model.ConceptMap.TargetElementComponent tgt = new org.hl7.fhir.dstu3.model.ConceptMap.TargetElementComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasCode()) { - tgt.setCode(src.getCode()); - } + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_10_30.convertType(src.getCodeElement())); if (src.hasEquivalence()) { tgt.setEquivalence(convertConceptMapEquivalence(src.getEquivalence())); } - if (src.hasComments()) { - tgt.setComment(src.getComments()); + if (src.hasCommentsElement()) { + tgt.setCommentElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getCommentsElement())); } if (src.hasDependsOn()) { for (org.hl7.fhir.dstu2.model.ConceptMap.OtherElementComponent t : src.getDependsOn()) tgt.addDependsOn(convertOtherElementComponent(t)); diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Condition10_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Condition10_30.java index ac00e90cc..5ef3b97c0 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Condition10_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Condition10_30.java @@ -1,7 +1,9 @@ package org.hl7.fhir.convertors.conv10_30; import org.hl7.fhir.convertors.VersionConvertor_10_30; +import org.hl7.fhir.dstu3.model.DateTimeType; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Condition10_30 { @@ -22,8 +24,8 @@ public class Condition10_30 { if (src.hasAsserter()) { tgt.setAsserter(VersionConvertor_10_30.convertReference(src.getAsserter())); } - if (src.hasDateRecorded()) - tgt.setAssertedDate(src.getDateRecorded()); + if (src.hasDateRecordedElement()) + tgt.setAssertedDateElement((DateTimeType) VersionConvertor_10_30.convertType(src.getDateRecordedElement())); if (src.hasCode()) { tgt.setCode(VersionConvertor_10_30.convertCodeableConcept(src.getCode())); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Conformance10_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Conformance10_30.java index 03eb3f7c4..391c8a7e8 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Conformance10_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Conformance10_30.java @@ -1,8 +1,16 @@ package org.hl7.fhir.convertors.conv10_30; import org.hl7.fhir.convertors.VersionConvertor_10_30; +import org.hl7.fhir.dstu2.model.Base64BinaryType; +import org.hl7.fhir.dstu2.model.BooleanType; +import org.hl7.fhir.dstu2.model.StringType; +import org.hl7.fhir.dstu2.model.UriType; import org.hl7.fhir.dstu3.model.CapabilityStatement.SystemRestfulInteraction; +import org.hl7.fhir.dstu3.model.DateTimeType; +import org.hl7.fhir.dstu3.model.MarkdownType; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; +import java.util.stream.Collectors; public class Conformance10_30 { @@ -41,37 +49,31 @@ public class Conformance10_30 { return null; org.hl7.fhir.dstu2.model.Conformance tgt = new org.hl7.fhir.dstu2.model.Conformance(); VersionConvertor_10_30.copyDomainResource(src, tgt); - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } - if (src.hasVersion()) { - tgt.setVersion(src.getVersion()); - } - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_30.convertType(src.getUrlElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_10_30.convertConformanceResourceStatus(src.getStatus())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) { - tgt.setPublisher(src.getPublisher()); - } + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((BooleanType) VersionConvertor_10_30.convertType(src.getExperimentalElement())); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_30.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) tgt.addContact(convertConformanceContactComponent(t)); } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } - if (src.hasPurpose()) { - tgt.setRequirements(src.getPurpose()); - } - if (src.hasCopyright()) { - tgt.setCopyright(src.getCopyright()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getDescriptionElement())); + if (src.hasPurposeElement()) { + tgt.setRequirementsElement((StringType) VersionConvertor_10_30.convertType(src.getPurposeElement())); } + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getCopyrightElement())); if (src.hasKind()) { tgt.setKind(convertConformanceStatementKind(src.getKind())); } @@ -80,9 +82,8 @@ public class Conformance10_30 { } if (src.hasImplementation()) tgt.setImplementation(convertConformanceImplementationComponent(src.getImplementation())); - if (src.hasFhirVersion()) { - tgt.setFhirVersion(src.getFhirVersion()); - } + if (src.hasFhirVersionElement()) + tgt.setFhirVersionElement((org.hl7.fhir.dstu2.model.IdType) VersionConvertor_10_30.convertType(src.getFhirVersionElement())); if (src.hasAcceptUnknown()) { tgt.setAcceptUnknown(convertUnknownContentCode(src.getAcceptUnknown())); } @@ -109,25 +110,21 @@ public class Conformance10_30 { return null; org.hl7.fhir.dstu3.model.CapabilityStatement tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement(); VersionConvertor_10_30.copyDomainResource(src, tgt); - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } - if (src.hasVersion()) { - tgt.setVersion(src.getVersion()); - } - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_10_30.convertType(src.getUrlElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_10_30.convertConformanceResourceStatus(src.getStatus())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) { - tgt.setPublisher(src.getPublisher()); - } + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_10_30.convertType(src.getExperimentalElement())); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_10_30.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu2.model.Conformance.ConformanceContactComponent t : src.getContact()) tgt.addContact(convertConformanceContactComponent(t)); } @@ -149,9 +146,8 @@ public class Conformance10_30 { if (src.hasImplementation()) { tgt.setImplementation(convertConformanceImplementationComponent(src.getImplementation())); } - if (src.hasFhirVersion()) { - tgt.setFhirVersion(src.getFhirVersion()); - } + if (src.hasFhirVersionElement()) + tgt.setFhirVersionElement((org.hl7.fhir.dstu3.model.IdType) VersionConvertor_10_30.convertType(src.getFhirVersionElement())); if (src.hasAcceptUnknown()) { tgt.setAcceptUnknown(convertUnknownContentCode(src.getAcceptUnknown())); } @@ -178,9 +174,8 @@ public class Conformance10_30 { return null; org.hl7.fhir.dstu2.model.Conformance.ConformanceContactComponent tgt = new org.hl7.fhir.dstu2.model.Conformance.ConformanceContactComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu3.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_30.convertContactPoint(t)); } @@ -192,9 +187,8 @@ public class Conformance10_30 { return null; org.hl7.fhir.dstu3.model.ContactDetail tgt = new org.hl7.fhir.dstu3.model.ContactDetail(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_30.convertContactPoint(t)); } @@ -209,8 +203,8 @@ public class Conformance10_30 { if (src.hasMode()) { tgt.setMode(convertDocumentMode(src.getMode())); } - if (src.hasDocumentation()) { - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) { + tgt.setDocumentationElement((StringType) VersionConvertor_10_30.convertType(src.getDocumentationElement())); } if (src.hasProfile()) { tgt.setProfile(VersionConvertor_10_30.convertReference(src.getProfile())); @@ -226,8 +220,8 @@ public class Conformance10_30 { if (src.hasMode()) { tgt.setMode(convertDocumentMode(src.getMode())); } - if (src.hasDocumentation()) { - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) { + tgt.setDocumentationElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getDocumentationElement())); } if (src.hasProfile()) { tgt.setProfile(VersionConvertor_10_30.convertReference(src.getProfile())); @@ -266,12 +260,10 @@ public class Conformance10_30 { return null; org.hl7.fhir.dstu2.model.Conformance.ConformanceImplementationComponent tgt = new org.hl7.fhir.dstu2.model.Conformance.ConformanceImplementationComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getDescriptionElement())); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_30.convertType(src.getUrlElement())); return tgt; } @@ -280,12 +272,10 @@ public class Conformance10_30 { return null; org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementImplementationComponent tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementImplementationComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getDescriptionElement())); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_10_30.convertType(src.getUrlElement())); return tgt; } @@ -300,8 +290,8 @@ public class Conformance10_30 { if (src.hasReliableCache()) { tgt.setReliableCache(src.getReliableCache()); } - if (src.hasDocumentation()) { - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) { + tgt.setDocumentationElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getDocumentationElement())); } if (src.hasEvent()) { for (org.hl7.fhir.dstu2.model.Conformance.ConformanceMessagingEventComponent t : src.getEvent()) tgt.addEvent(convertConformanceMessagingEventComponent(t)); @@ -320,8 +310,8 @@ public class Conformance10_30 { if (src.hasReliableCache()) { tgt.setReliableCache(src.getReliableCache()); } - if (src.hasDocumentation()) { - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) { + tgt.setDocumentationElement((StringType) VersionConvertor_10_30.convertType(src.getDocumentationElement())); } if (src.hasEvent()) { for (org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingEventComponent t : src.getEvent()) tgt.addEvent(convertConformanceMessagingEventComponent(t)); @@ -380,8 +370,8 @@ public class Conformance10_30 { if (src.hasResponse()) { tgt.setResponse(VersionConvertor_10_30.convertReference(src.getResponse())); } - if (src.hasDocumentation()) { - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) { + tgt.setDocumentationElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getDocumentationElement())); } return tgt; } @@ -409,8 +399,8 @@ public class Conformance10_30 { if (src.hasResponse()) { tgt.setResponse(VersionConvertor_10_30.convertReference(src.getResponse())); } - if (src.hasDocumentation()) { - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) { + tgt.setDocumentationElement((StringType) VersionConvertor_10_30.convertType(src.getDocumentationElement())); } return tgt; } @@ -423,8 +413,8 @@ public class Conformance10_30 { if (src.hasMode()) { tgt.setMode(convertRestfulConformanceMode(src.getMode())); } - if (src.hasDocumentation()) { - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) { + tgt.setDocumentationElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getDocumentationElement())); } if (src.hasSecurity()) { tgt.setSecurity(convertConformanceRestSecurityComponent(src.getSecurity())); @@ -457,8 +447,8 @@ public class Conformance10_30 { if (src.hasMode()) { tgt.setMode(convertRestfulConformanceMode(src.getMode())); } - if (src.hasDocumentation()) { - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) { + tgt.setDocumentationElement((StringType) VersionConvertor_10_30.convertType(src.getDocumentationElement())); } if (src.hasSecurity()) { tgt.setSecurity(convertConformanceRestSecurityComponent(src.getSecurity())); @@ -497,9 +487,8 @@ public class Conformance10_30 { return null; org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestOperationComponent tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestOperationComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getNameElement())); if (src.hasDefinition()) { tgt.setDefinition(VersionConvertor_10_30.convertReference(src.getDefinition())); } @@ -511,9 +500,8 @@ public class Conformance10_30 { return null; org.hl7.fhir.dstu2.model.Conformance.ConformanceRestOperationComponent tgt = new org.hl7.fhir.dstu2.model.Conformance.ConformanceRestOperationComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getNameElement())); if (src.hasDefinition()) { tgt.setDefinition(VersionConvertor_10_30.convertReference(src.getDefinition())); } @@ -536,17 +524,17 @@ public class Conformance10_30 { if (src.hasVersioning()) { tgt.setVersioning(convertResourceVersionPolicy(src.getVersioning())); } - if (src.hasReadHistory()) { - tgt.setReadHistory(src.getReadHistory()); + if (src.hasReadHistoryElement()) { + tgt.setReadHistoryElement((BooleanType) VersionConvertor_10_30.convertType(src.getReadHistoryElement())); } - if (src.hasUpdateCreate()) { - tgt.setUpdateCreate(src.getUpdateCreate()); + if (src.hasUpdateCreateElement()) { + tgt.setUpdateCreateElement((BooleanType) VersionConvertor_10_30.convertType(src.getUpdateCreateElement())); } - if (src.hasConditionalCreate()) { - tgt.setConditionalCreate(src.getConditionalCreate()); + if (src.hasConditionalCreateElement()) { + tgt.setConditionalCreateElement((BooleanType) VersionConvertor_10_30.convertType(src.getConditionalCreateElement())); } - if (src.hasConditionalUpdate()) { - tgt.setConditionalUpdate(src.getConditionalUpdate()); + if (src.hasConditionalUpdateElement()) { + tgt.setConditionalUpdateElement((BooleanType) VersionConvertor_10_30.convertType(src.getConditionalUpdateElement())); } if (src.hasConditionalDelete()) { tgt.setConditionalDelete(convertConditionalDeleteStatus(src.getConditionalDelete())); @@ -580,17 +568,17 @@ public class Conformance10_30 { if (src.hasVersioning()) { tgt.setVersioning(convertResourceVersionPolicy(src.getVersioning())); } - if (src.hasReadHistory()) { - tgt.setReadHistory(src.getReadHistory()); + if (src.hasReadHistoryElement()) { + tgt.setReadHistoryElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_10_30.convertType(src.getReadHistoryElement())); } - if (src.hasUpdateCreate()) { - tgt.setUpdateCreate(src.getUpdateCreate()); + if (src.hasUpdateCreateElement()) { + tgt.setUpdateCreateElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_10_30.convertType(src.getUpdateCreateElement())); } - if (src.hasConditionalCreate()) { - tgt.setConditionalCreate(src.getConditionalCreate()); + if (src.hasConditionalCreateElement()) { + tgt.setConditionalCreateElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_10_30.convertType(src.getConditionalCreateElement())); } - if (src.hasConditionalUpdate()) { - tgt.setConditionalUpdate(src.getConditionalUpdate()); + if (src.hasConditionalUpdateElement()) { + tgt.setConditionalUpdateElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_10_30.convertType(src.getConditionalUpdateElement())); } if (src.hasConditionalDelete()) { tgt.setConditionalDelete(convertConditionalDeleteStatus(src.getConditionalDelete())); @@ -612,17 +600,16 @@ public class Conformance10_30 { return null; org.hl7.fhir.dstu2.model.Conformance.ConformanceRestResourceSearchParamComponent tgt = new org.hl7.fhir.dstu2.model.Conformance.ConformanceRestResourceSearchParamComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasDefinition()) { - tgt.setDefinition(src.getDefinition()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getNameElement())); + if (src.hasDefinitionElement()) { + tgt.setDefinitionElement((UriType) VersionConvertor_10_30.convertType(src.getDefinitionElement())); } if (src.hasType()) { tgt.setType(VersionConvertor_10_30.convertSearchParamType(src.getType())); } - if (src.hasDocumentation()) { - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) { + tgt.setDocumentationElement((StringType) VersionConvertor_10_30.convertType(src.getDocumentationElement())); } return tgt; } @@ -632,17 +619,16 @@ public class Conformance10_30 { return null; org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasDefinition()) { - tgt.setDefinition(src.getDefinition()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getNameElement())); + if (src.hasDefinitionElement()) { + tgt.setDefinitionElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_10_30.convertType(src.getDefinitionElement())); } if (src.hasType()) { tgt.setType(VersionConvertor_10_30.convertSearchParamType(src.getType())); } - if (src.hasDocumentation()) { - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) { + tgt.setDocumentationElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getDocumentationElement())); } return tgt; } @@ -655,8 +641,8 @@ public class Conformance10_30 { if (src.hasType()) { tgt.setType(src.getType()); } - if (src.hasBlob()) { - tgt.setBlob(src.getBlob()); + if (src.hasBlobElement()) { + tgt.setBlobElement((Base64BinaryType) VersionConvertor_10_30.convertType(src.getBlobElement())); } return tgt; } @@ -669,8 +655,8 @@ public class Conformance10_30 { if (src.hasType()) { tgt.setType(src.getType()); } - if (src.hasBlob()) { - tgt.setBlob(src.getBlob()); + if (src.hasBlobElement()) { + tgt.setBlobElement((org.hl7.fhir.dstu3.model.Base64BinaryType) VersionConvertor_10_30.convertType(src.getBlobElement())); } return tgt; } @@ -680,15 +666,14 @@ public class Conformance10_30 { return null; org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestSecurityComponent tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestSecurityComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasCors()) { - tgt.setCors(src.getCors()); + if (src.hasCorsElement()) { + tgt.setCorsElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_10_30.convertType(src.getCorsElement())); } if (src.hasService()) { for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getService()) tgt.addService(VersionConvertor_10_30.convertCodeableConcept(t)); } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getDescriptionElement())); if (src.hasCertificate()) { for (org.hl7.fhir.dstu2.model.Conformance.ConformanceRestSecurityCertificateComponent t : src.getCertificate()) tgt.addCertificate(convertConformanceRestSecurityCertificateComponent(t)); } @@ -700,15 +685,14 @@ public class Conformance10_30 { return null; org.hl7.fhir.dstu2.model.Conformance.ConformanceRestSecurityComponent tgt = new org.hl7.fhir.dstu2.model.Conformance.ConformanceRestSecurityComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasCors()) { - tgt.setCors(src.getCors()); + if (src.hasCorsElement()) { + tgt.setCorsElement((BooleanType) VersionConvertor_10_30.convertType(src.getCorsElement())); } if (src.hasService()) { for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getService()) tgt.addService(VersionConvertor_10_30.convertCodeableConcept(t)); } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getDescriptionElement())); if (src.hasCertificate()) { for (org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestSecurityCertificateComponent t : src.getCertificate()) tgt.addCertificate(convertConformanceRestSecurityCertificateComponent(t)); } @@ -720,14 +704,12 @@ public class Conformance10_30 { return null; org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementSoftwareComponent tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementSoftwareComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasVersion()) { - tgt.setVersion(src.getVersion()); - } - if (src.hasReleaseDate()) { - tgt.setReleaseDate(src.getReleaseDate()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getNameElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getVersionElement())); + if (src.hasReleaseDateElement()) { + tgt.setReleaseDateElement((DateTimeType) VersionConvertor_10_30.convertType(src.getReleaseDateElement())); } return tgt; } @@ -737,14 +719,12 @@ public class Conformance10_30 { return null; org.hl7.fhir.dstu2.model.Conformance.ConformanceSoftwareComponent tgt = new org.hl7.fhir.dstu2.model.Conformance.ConformanceSoftwareComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasVersion()) { - tgt.setVersion(src.getVersion()); - } - if (src.hasReleaseDate()) { - tgt.setReleaseDate(src.getReleaseDate()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getNameElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getVersionElement())); + if (src.hasReleaseDateElement()) { + tgt.setReleaseDateElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_30.convertType(src.getReleaseDateElement())); } return tgt; } @@ -843,8 +823,8 @@ public class Conformance10_30 { if (src.hasCode()) { tgt.setCode(convertTypeRestfulInteraction(src.getCode())); } - if (src.hasDocumentation()) { - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) { + tgt.setDocumentationElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getDocumentationElement())); } return tgt; } @@ -857,8 +837,8 @@ public class Conformance10_30 { if (src.hasCode()) { tgt.setCode(convertTypeRestfulInteraction(src.getCode())); } - if (src.hasDocumentation()) { - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) { + tgt.setDocumentationElement((StringType) VersionConvertor_10_30.convertType(src.getDocumentationElement())); } return tgt; } @@ -927,8 +907,8 @@ public class Conformance10_30 { if (src.hasCode()) { tgt.setCode(convertSystemRestfulInteraction(src.getCode())); } - if (src.hasDocumentation()) { - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) { + tgt.setDocumentationElement((StringType) VersionConvertor_10_30.convertType(src.getDocumentationElement())); } return tgt; } @@ -941,8 +921,8 @@ public class Conformance10_30 { if (src.hasCode()) { tgt.setCode(convertSystemRestfulInteraction(src.getCode())); } - if (src.hasDocumentation()) { - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) { + tgt.setDocumentationElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getDocumentationElement())); } return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Contract10_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Contract10_30.java index ba5295628..798c12b1a 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Contract10_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Contract10_30.java @@ -2,7 +2,9 @@ package org.hl7.fhir.convertors.conv10_30; import org.apache.commons.codec.binary.Base64; import org.hl7.fhir.convertors.VersionConvertor_10_30; +import org.hl7.fhir.dstu2.model.DecimalType; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Contract10_30 { @@ -64,9 +66,8 @@ public class Contract10_30 { if (src.hasIdentifier()) { tgt.setIdentifier(VersionConvertor_10_30.convertIdentifier(src.getIdentifier())); } - if (src.hasIssued()) { - tgt.setIssued(src.getIssued()); - } + if (src.hasIssuedElement()) + tgt.setIssuedElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_30.convertType(src.getIssuedElement())); if (src.hasApplies()) { tgt.setApplies(VersionConvertor_10_30.convertPeriod(src.getApplies())); } @@ -126,9 +127,8 @@ public class Contract10_30 { if (src.hasIdentifier()) { tgt.setIdentifier(VersionConvertor_10_30.convertIdentifier(src.getIdentifier())); } - if (src.hasIssued()) { - tgt.setIssued(src.getIssued()); - } + if (src.hasIssuedElement()) + tgt.setIssuedElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_10_30.convertType(src.getIssuedElement())); if (src.hasApplies()) { tgt.setApplies(VersionConvertor_10_30.convertPeriod(src.getApplies())); } @@ -293,9 +293,8 @@ public class Contract10_30 { if (src.hasIdentifier()) { tgt.setIdentifier(VersionConvertor_10_30.convertIdentifier(src.getIdentifier())); } - if (src.hasIssued()) { - tgt.setIssued(src.getIssued()); - } + if (src.hasIssuedElement()) + tgt.setIssuedElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_10_30.convertType(src.getIssuedElement())); if (src.hasApplies()) { tgt.setApplies(VersionConvertor_10_30.convertPeriod(src.getApplies())); } @@ -314,9 +313,8 @@ public class Contract10_30 { if (src.hasActor()) { for (org.hl7.fhir.dstu2.model.Contract.TermActorComponent t : src.getActor()) tgt.addAgent(convertTermAgentComponent(t)); } - if (src.hasText()) { - tgt.setText(src.getText()); - } + if (src.hasTextElement()) + tgt.setTextElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getTextElement())); if (src.hasValuedItem()) { for (org.hl7.fhir.dstu2.model.Contract.TermValuedItemComponent t : src.getValuedItem()) tgt.addValuedItem(convertTermValuedItemComponent(t)); } @@ -334,9 +332,8 @@ public class Contract10_30 { if (src.hasIdentifier()) { tgt.setIdentifier(VersionConvertor_10_30.convertIdentifier(src.getIdentifier())); } - if (src.hasIssued()) { - tgt.setIssued(src.getIssued()); - } + if (src.hasIssuedElement()) + tgt.setIssuedElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_30.convertType(src.getIssuedElement())); if (src.hasApplies()) { tgt.setApplies(VersionConvertor_10_30.convertPeriod(src.getApplies())); } @@ -355,9 +352,8 @@ public class Contract10_30 { if (src.hasAgent()) { for (org.hl7.fhir.dstu3.model.Contract.TermAgentComponent t : src.getAgent()) tgt.addActor(convertTermAgentComponent(t)); } - if (src.hasText()) { - tgt.setText(src.getText()); - } + if (src.hasTextElement()) + tgt.setTextElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getTextElement())); if (src.hasValuedItem()) { for (org.hl7.fhir.dstu3.model.Contract.TermValuedItemComponent t : src.getValuedItem()) tgt.addValuedItem(convertTermValuedItemComponent(t)); } @@ -378,20 +374,19 @@ public class Contract10_30 { if (src.hasIdentifier()) { tgt.setIdentifier(VersionConvertor_10_30.convertIdentifier(src.getIdentifier())); } - if (src.hasEffectiveTime()) { - tgt.setEffectiveTime(src.getEffectiveTime()); - } + if (src.hasEffectiveTimeElement()) + tgt.setEffectiveTimeElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_30.convertType(src.getEffectiveTimeElement())); if (src.hasQuantity()) { tgt.setQuantity(VersionConvertor_10_30.convertSimpleQuantity(src.getQuantity())); } if (src.hasUnitPrice()) { tgt.setUnitPrice(VersionConvertor_10_30.convertMoney(src.getUnitPrice())); } - if (src.hasFactor()) { - tgt.setFactor(src.getFactor()); + if (src.hasFactorElement()) { + tgt.setFactorElement((DecimalType) VersionConvertor_10_30.convertType(src.getFactorElement())); } - if (src.hasPoints()) { - tgt.setPoints(src.getPoints()); + if (src.hasPointsElement()) { + tgt.setPointsElement((DecimalType) VersionConvertor_10_30.convertType(src.getPointsElement())); } if (src.hasNet()) { tgt.setNet(VersionConvertor_10_30.convertMoney(src.getNet())); @@ -410,20 +405,19 @@ public class Contract10_30 { if (src.hasIdentifier()) { tgt.setIdentifier(VersionConvertor_10_30.convertIdentifier(src.getIdentifier())); } - if (src.hasEffectiveTime()) { - tgt.setEffectiveTime(src.getEffectiveTime()); - } + if (src.hasEffectiveTimeElement()) + tgt.setEffectiveTimeElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_10_30.convertType(src.getEffectiveTimeElement())); if (src.hasQuantity()) { tgt.setQuantity(VersionConvertor_10_30.convertSimpleQuantity(src.getQuantity())); } if (src.hasUnitPrice()) { tgt.setUnitPrice(VersionConvertor_10_30.convertMoney(src.getUnitPrice())); } - if (src.hasFactor()) { - tgt.setFactor(src.getFactor()); + if (src.hasFactorElement()) { + tgt.setFactorElement((org.hl7.fhir.dstu3.model.DecimalType) VersionConvertor_10_30.convertType(src.getFactorElement())); } - if (src.hasPoints()) { - tgt.setPoints(src.getPoints()); + if (src.hasPointsElement()) { + tgt.setPointsElement((org.hl7.fhir.dstu3.model.DecimalType) VersionConvertor_10_30.convertType(src.getPointsElement())); } if (src.hasNet()) { tgt.setNet(VersionConvertor_10_30.convertMoney(src.getNet())); @@ -442,20 +436,19 @@ public class Contract10_30 { if (src.hasIdentifier()) { tgt.setIdentifier(VersionConvertor_10_30.convertIdentifier(src.getIdentifier())); } - if (src.hasEffectiveTime()) { - tgt.setEffectiveTime(src.getEffectiveTime()); - } + if (src.hasEffectiveTimeElement()) + tgt.setEffectiveTimeElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_30.convertType(src.getEffectiveTimeElement())); if (src.hasQuantity()) { tgt.setQuantity(VersionConvertor_10_30.convertSimpleQuantity(src.getQuantity())); } if (src.hasUnitPrice()) { tgt.setUnitPrice(VersionConvertor_10_30.convertMoney(src.getUnitPrice())); } - if (src.hasFactor()) { - tgt.setFactor(src.getFactor()); + if (src.hasFactorElement()) { + tgt.setFactorElement((DecimalType) VersionConvertor_10_30.convertType(src.getFactorElement())); } - if (src.hasPoints()) { - tgt.setPoints(src.getPoints()); + if (src.hasPointsElement()) { + tgt.setPointsElement((DecimalType) VersionConvertor_10_30.convertType(src.getPointsElement())); } if (src.hasNet()) { tgt.setNet(VersionConvertor_10_30.convertMoney(src.getNet())); @@ -474,20 +467,19 @@ public class Contract10_30 { if (src.hasIdentifier()) { tgt.setIdentifier(VersionConvertor_10_30.convertIdentifier(src.getIdentifier())); } - if (src.hasEffectiveTime()) { - tgt.setEffectiveTime(src.getEffectiveTime()); - } + if (src.hasEffectiveTimeElement()) + tgt.setEffectiveTimeElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_10_30.convertType(src.getEffectiveTimeElement())); if (src.hasQuantity()) { tgt.setQuantity(VersionConvertor_10_30.convertSimpleQuantity(src.getQuantity())); } if (src.hasUnitPrice()) { tgt.setUnitPrice(VersionConvertor_10_30.convertMoney(src.getUnitPrice())); } - if (src.hasFactor()) { - tgt.setFactor(src.getFactor()); + if (src.hasFactorElement()) { + tgt.setFactorElement((org.hl7.fhir.dstu3.model.DecimalType) VersionConvertor_10_30.convertType(src.getFactorElement())); } - if (src.hasPoints()) { - tgt.setPoints(src.getPoints()); + if (src.hasPointsElement()) { + tgt.setPointsElement((org.hl7.fhir.dstu3.model.DecimalType) VersionConvertor_10_30.convertType(src.getPointsElement())); } if (src.hasNet()) { tgt.setNet(VersionConvertor_10_30.convertMoney(src.getNet())); diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/DataElement10_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/DataElement10_30.java index b38b8020e..4475001e1 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/DataElement10_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/DataElement10_30.java @@ -1,9 +1,12 @@ package org.hl7.fhir.convertors.conv10_30; import org.hl7.fhir.convertors.VersionConvertor_10_30; +import org.hl7.fhir.dstu2.model.BooleanType; +import org.hl7.fhir.dstu2.model.StringType; import org.hl7.fhir.exceptions.FHIRException; import java.util.ArrayList; import java.util.List; +import java.util.Collections; public class DataElement10_30 { @@ -12,28 +15,24 @@ public class DataElement10_30 { return null; org.hl7.fhir.dstu2.model.DataElement tgt = new org.hl7.fhir.dstu2.model.DataElement(); VersionConvertor_10_30.copyDomainResource(src, tgt); - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_30.convertType(src.getUrlElement())); if (src.hasIdentifier()) { for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t)); } - if (src.hasVersion()) { - tgt.setVersion(src.getVersion()); - } + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getVersionElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_10_30.convertConformanceResourceStatus(src.getStatus())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasPublisher()) { - tgt.setPublisher(src.getPublisher()); - } - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((BooleanType) VersionConvertor_10_30.convertType(src.getExperimentalElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getPublisherElement())); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_30.convertType(src.getDateElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getNameElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) tgt.addContact(convertDataElementContactComponent(t)); } @@ -42,9 +41,8 @@ public class DataElement10_30 { if (src.hasJurisdiction()) { for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getJurisdiction()) tgt.addUseContext(VersionConvertor_10_30.convertCodeableConcept(t)); } - if (src.hasCopyright()) { - tgt.setCopyright(src.getCopyright()); - } + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getCopyrightElement())); if (src.hasStringency()) { tgt.setStringency(convertDataElementStringency(src.getStringency())); } @@ -62,28 +60,24 @@ public class DataElement10_30 { return null; org.hl7.fhir.dstu3.model.DataElement tgt = new org.hl7.fhir.dstu3.model.DataElement(); VersionConvertor_10_30.copyDomainResource(src, tgt); - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_10_30.convertType(src.getUrlElement())); if (src.hasIdentifier()) { for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t)); } - if (src.hasVersion()) { - tgt.setVersion(src.getVersion()); - } + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getVersionElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_10_30.convertConformanceResourceStatus(src.getStatus())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasPublisher()) { - tgt.setPublisher(src.getPublisher()); - } - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_10_30.convertType(src.getExperimentalElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getPublisherElement())); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_10_30.convertType(src.getDateElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getNameElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu2.model.DataElement.DataElementContactComponent t : src.getContact()) tgt.addContact(convertDataElementContactComponent(t)); } @@ -91,9 +85,8 @@ public class DataElement10_30 { tgt.addJurisdiction(VersionConvertor_10_30.convertCodeableConcept(t)); else tgt.addUseContext(VersionConvertor_10_30.convertCodeableConceptToUsageContext(t)); - if (src.hasCopyright()) { - tgt.setCopyright(src.getCopyright()); - } + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_10_30.convertType(src.getCopyrightElement())); if (src.hasStringency()) { tgt.setStringency(convertDataElementStringency(src.getStringency())); } @@ -114,9 +107,8 @@ public class DataElement10_30 { return null; org.hl7.fhir.dstu3.model.ContactDetail tgt = new org.hl7.fhir.dstu3.model.ContactDetail(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_30.convertContactPoint(t)); } @@ -128,9 +120,8 @@ public class DataElement10_30 { return null; org.hl7.fhir.dstu2.model.DataElement.DataElementContactComponent tgt = new org.hl7.fhir.dstu2.model.DataElement.DataElementContactComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu3.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_30.convertContactPoint(t)); } @@ -142,15 +133,12 @@ public class DataElement10_30 { return null; org.hl7.fhir.dstu3.model.DataElement.DataElementMappingComponent tgt = new org.hl7.fhir.dstu3.model.DataElement.DataElementMappingComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasIdentity()) { - tgt.setIdentity(src.getIdentity()); - } - if (src.hasUri()) { - tgt.setUri(src.getUri()); - } - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasIdentityElement()) + tgt.setIdentityElement((org.hl7.fhir.dstu3.model.IdType) VersionConvertor_10_30.convertType(src.getIdentityElement())); + if (src.hasUriElement()) + tgt.setUriElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_10_30.convertType(src.getUriElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getNameElement())); if (src.hasComments()) { tgt.setComment(src.getComments()); } @@ -162,17 +150,14 @@ public class DataElement10_30 { return null; org.hl7.fhir.dstu2.model.DataElement.DataElementMappingComponent tgt = new org.hl7.fhir.dstu2.model.DataElement.DataElementMappingComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasIdentity()) { - tgt.setIdentity(src.getIdentity()); - } - if (src.hasUri()) { - tgt.setUri(src.getUri()); - } - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasComment()) { - tgt.setComments(src.getComment()); + if (src.hasIdentityElement()) + tgt.setIdentityElement((org.hl7.fhir.dstu2.model.IdType) VersionConvertor_10_30.convertType(src.getIdentityElement())); + if (src.hasUriElement()) + tgt.setUriElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_30.convertType(src.getUriElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getNameElement())); + if (src.hasCommentElement()) { + tgt.setCommentsElement((StringType) VersionConvertor_10_30.convertType(src.getCommentElement())); } return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/DetectedIssue10_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/DetectedIssue10_30.java index 41bc4ab84..8b76977f5 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/DetectedIssue10_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/DetectedIssue10_30.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_30; import org.hl7.fhir.convertors.VersionConvertor_10_30; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class DetectedIssue10_30 { @@ -22,20 +23,18 @@ public class DetectedIssue10_30 { if (src.hasImplicated()) { for (org.hl7.fhir.dstu3.model.Reference t : src.getImplicated()) tgt.addImplicated(VersionConvertor_10_30.convertReference(t)); } - if (src.hasDetail()) { - tgt.setDetail(src.getDetail()); - } - if (src.hasDate()) - tgt.setDate(src.getDate()); + if (src.hasDetailElement()) + tgt.setDetailElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getDetailElement())); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_30.convertType(src.getDateElement())); if (src.hasAuthor()) { tgt.setAuthor(VersionConvertor_10_30.convertReference(src.getAuthor())); } if (src.hasIdentifier()) { tgt.setIdentifier(VersionConvertor_10_30.convertIdentifier(src.getIdentifier())); } - if (src.hasReference()) { - tgt.setReference(src.getReference()); - } + if (src.hasReferenceElement()) + tgt.setReferenceElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_30.convertType(src.getReferenceElement())); if (src.hasMitigation()) { for (org.hl7.fhir.dstu3.model.DetectedIssue.DetectedIssueMitigationComponent t : src.getMitigation()) tgt.addMitigation(convertDetectedIssueMitigationComponent(t)); } @@ -59,20 +58,18 @@ public class DetectedIssue10_30 { if (src.hasImplicated()) { for (org.hl7.fhir.dstu2.model.Reference t : src.getImplicated()) tgt.addImplicated(VersionConvertor_10_30.convertReference(t)); } - if (src.hasDetail()) { - tgt.setDetail(src.getDetail()); - } - if (src.hasDate()) - tgt.setDate(src.getDate()); + if (src.hasDetailElement()) + tgt.setDetailElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getDetailElement())); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_10_30.convertType(src.getDateElement())); if (src.hasAuthor()) { tgt.setAuthor(VersionConvertor_10_30.convertReference(src.getAuthor())); } if (src.hasIdentifier()) { tgt.setIdentifier(VersionConvertor_10_30.convertIdentifier(src.getIdentifier())); } - if (src.hasReference()) { - tgt.setReference(src.getReference()); - } + if (src.hasReferenceElement()) + tgt.setReferenceElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_10_30.convertType(src.getReferenceElement())); if (src.hasMitigation()) { for (org.hl7.fhir.dstu2.model.DetectedIssue.DetectedIssueMitigationComponent t : src.getMitigation()) tgt.addMitigation(convertDetectedIssueMitigationComponent(t)); } @@ -87,8 +84,8 @@ public class DetectedIssue10_30 { if (src.hasAction()) { tgt.setAction(VersionConvertor_10_30.convertCodeableConcept(src.getAction())); } - if (src.hasDate()) - tgt.setDate(src.getDate()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_30.convertType(src.getDateElement())); if (src.hasAuthor()) { tgt.setAuthor(VersionConvertor_10_30.convertReference(src.getAuthor())); } @@ -103,8 +100,8 @@ public class DetectedIssue10_30 { if (src.hasAction()) { tgt.setAction(VersionConvertor_10_30.convertCodeableConcept(src.getAction())); } - if (src.hasDate()) - tgt.setDate(src.getDate()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_10_30.convertType(src.getDateElement())); if (src.hasAuthor()) { tgt.setAuthor(VersionConvertor_10_30.convertReference(src.getAuthor())); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Device10_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Device10_30.java index 210f8861a..6de92be8f 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Device10_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Device10_30.java @@ -1,7 +1,9 @@ package org.hl7.fhir.convertors.conv10_30; import org.hl7.fhir.convertors.VersionConvertor_10_30; +import org.hl7.fhir.dstu2.model.DateTimeType; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Device10_30 { @@ -21,24 +23,19 @@ public class Device10_30 { if (src.hasType()) { tgt.setType(VersionConvertor_10_30.convertCodeableConcept(src.getType())); } - if (src.hasLotNumber()) { - tgt.setLotNumber(src.getLotNumber()); - } - if (src.hasManufacturer()) { - tgt.setManufacturer(src.getManufacturer()); - } - if (src.hasManufactureDate()) { - tgt.setManufactureDate(src.getManufactureDate()); - } - if (src.hasExpirationDate()) { - tgt.setExpiry(src.getExpirationDate()); - } - if (src.hasModel()) { - tgt.setModel(src.getModel()); - } - if (src.hasVersion()) { - tgt.setVersion(src.getVersion()); + if (src.hasLotNumberElement()) + tgt.setLotNumberElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getLotNumberElement())); + if (src.hasManufacturerElement()) + tgt.setManufacturerElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getManufacturerElement())); + if (src.hasManufactureDateElement()) + tgt.setManufactureDateElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_30.convertType(src.getManufactureDateElement())); + if (src.hasExpirationDateElement()) { + tgt.setExpiryElement((DateTimeType) VersionConvertor_10_30.convertType(src.getExpirationDateElement())); } + if (src.hasModelElement()) + tgt.setModelElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getModelElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getVersionElement())); if (src.hasPatient()) { tgt.setPatient(VersionConvertor_10_30.convertReference(src.getPatient())); } @@ -51,9 +48,8 @@ public class Device10_30 { if (src.hasLocation()) { tgt.setLocation(VersionConvertor_10_30.convertReference(src.getLocation())); } - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_30.convertType(src.getUrlElement())); if (src.hasNote()) { for (org.hl7.fhir.dstu3.model.Annotation t : src.getNote()) tgt.addNote(VersionConvertor_10_30.convertAnnotation(t)); } @@ -77,24 +73,19 @@ public class Device10_30 { if (src.hasType()) { tgt.setType(VersionConvertor_10_30.convertCodeableConcept(src.getType())); } - if (src.hasLotNumber()) { - tgt.setLotNumber(src.getLotNumber()); - } - if (src.hasManufacturer()) { - tgt.setManufacturer(src.getManufacturer()); - } - if (src.hasManufactureDate()) { - tgt.setManufactureDate(src.getManufactureDate()); - } - if (src.hasExpiry()) { - tgt.setExpirationDate(src.getExpiry()); - } - if (src.hasModel()) { - tgt.setModel(src.getModel()); - } - if (src.hasVersion()) { - tgt.setVersion(src.getVersion()); + if (src.hasLotNumberElement()) + tgt.setLotNumberElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getLotNumberElement())); + if (src.hasManufacturerElement()) + tgt.setManufacturerElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getManufacturerElement())); + if (src.hasManufactureDateElement()) + tgt.setManufactureDateElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_10_30.convertType(src.getManufactureDateElement())); + if (src.hasExpiryElement()) { + tgt.setExpirationDateElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_10_30.convertType(src.getExpiryElement())); } + if (src.hasModelElement()) + tgt.setModelElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getModelElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getVersionElement())); if (src.hasPatient()) { tgt.setPatient(VersionConvertor_10_30.convertReference(src.getPatient())); } @@ -107,9 +98,8 @@ public class Device10_30 { if (src.hasLocation()) { tgt.setLocation(VersionConvertor_10_30.convertReference(src.getLocation())); } - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_10_30.convertType(src.getUrlElement())); if (src.hasNote()) { for (org.hl7.fhir.dstu2.model.Annotation t : src.getNote()) tgt.addNote(VersionConvertor_10_30.convertAnnotation(t)); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/DeviceComponent10_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/DeviceComponent10_30.java index 36b418a37..8f486d8d1 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/DeviceComponent10_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/DeviceComponent10_30.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_30; import org.hl7.fhir.convertors.VersionConvertor_10_30; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class DeviceComponent10_30 { @@ -16,9 +17,8 @@ public class DeviceComponent10_30 { if (src.hasIdentifier()) { tgt.setIdentifier(VersionConvertor_10_30.convertIdentifier(src.getIdentifier())); } - if (src.hasLastSystemChange()) { - tgt.setLastSystemChange(src.getLastSystemChange()); - } + if (src.hasLastSystemChangeElement()) + tgt.setLastSystemChangeElement((org.hl7.fhir.dstu2.model.InstantType) VersionConvertor_10_30.convertType(src.getLastSystemChangeElement())); if (src.hasSource()) { tgt.setSource(VersionConvertor_10_30.convertReference(src.getSource())); } @@ -54,9 +54,8 @@ public class DeviceComponent10_30 { if (src.hasIdentifier()) { tgt.setIdentifier(VersionConvertor_10_30.convertIdentifier(src.getIdentifier())); } - if (src.hasLastSystemChange()) { - tgt.setLastSystemChange(src.getLastSystemChange()); - } + if (src.hasLastSystemChangeElement()) + tgt.setLastSystemChangeElement((org.hl7.fhir.dstu3.model.InstantType) VersionConvertor_10_30.convertType(src.getLastSystemChangeElement())); if (src.hasSource()) { tgt.setSource(VersionConvertor_10_30.convertReference(src.getSource())); } @@ -92,9 +91,8 @@ public class DeviceComponent10_30 { if (src.hasComponentId()) { tgt.setComponentId(VersionConvertor_10_30.convertIdentifier(src.getComponentId())); } - if (src.hasProductionSpec()) { - tgt.setProductionSpec(src.getProductionSpec()); - } + if (src.hasProductionSpecElement()) + tgt.setProductionSpecElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getProductionSpecElement())); return tgt; } @@ -109,9 +107,8 @@ public class DeviceComponent10_30 { if (src.hasComponentId()) { tgt.setComponentId(VersionConvertor_10_30.convertIdentifier(src.getComponentId())); } - if (src.hasProductionSpec()) { - tgt.setProductionSpec(src.getProductionSpec()); - } + if (src.hasProductionSpecElement()) + tgt.setProductionSpecElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getProductionSpecElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/DeviceMetric10_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/DeviceMetric10_30.java index 0444f24a3..bf7ae63ca 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/DeviceMetric10_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/DeviceMetric10_30.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_30; import org.hl7.fhir.convertors.VersionConvertor_10_30; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class DeviceMetric10_30 { @@ -92,9 +93,8 @@ public class DeviceMetric10_30 { if (src.hasState()) { tgt.setState(convertDeviceMetricCalibrationState(src.getState())); } - if (src.hasTime()) { - tgt.setTime(src.getTime()); - } + if (src.hasTimeElement()) + tgt.setTimeElement((org.hl7.fhir.dstu3.model.InstantType) VersionConvertor_10_30.convertType(src.getTimeElement())); return tgt; } @@ -109,9 +109,8 @@ public class DeviceMetric10_30 { if (src.hasState()) { tgt.setState(convertDeviceMetricCalibrationState(src.getState())); } - if (src.hasTime()) { - tgt.setTime(src.getTime()); - } + if (src.hasTimeElement()) + tgt.setTimeElement((org.hl7.fhir.dstu2.model.InstantType) VersionConvertor_10_30.convertType(src.getTimeElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/DeviceUseStatement10_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/DeviceUseStatement10_30.java index 3848e19d4..b64a023c5 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/DeviceUseStatement10_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/DeviceUseStatement10_30.java @@ -3,6 +3,7 @@ package org.hl7.fhir.convertors.conv10_30; import org.hl7.fhir.convertors.VersionConvertor_10_30; import org.hl7.fhir.dstu3.model.Annotation; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class DeviceUseStatement10_30 { @@ -29,9 +30,8 @@ public class DeviceUseStatement10_30 { if (src.hasNote()) { for (Annotation t : src.getNote()) tgt.addNotes(t.getText()); } - if (src.hasRecordedOn()) { - tgt.setRecordedOn(src.getRecordedOn()); - } + if (src.hasRecordedOnElement()) + tgt.setRecordedOnElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_30.convertType(src.getRecordedOnElement())); if (src.hasSubject()) { tgt.setSubject(VersionConvertor_10_30.convertReference(src.getSubject())); } @@ -63,9 +63,8 @@ public class DeviceUseStatement10_30 { if (src.hasNotes()) { for (org.hl7.fhir.dstu2.model.StringType t : src.getNotes()) tgt.addNote().setText(t.getValue()); } - if (src.hasRecordedOn()) { - tgt.setRecordedOn(src.getRecordedOn()); - } + if (src.hasRecordedOnElement()) + tgt.setRecordedOnElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_10_30.convertType(src.getRecordedOnElement())); if (src.hasSubject()) { tgt.setSubject(VersionConvertor_10_30.convertReference(src.getSubject())); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/DiagnosticReport10_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/DiagnosticReport10_30.java index ae774cba9..dad970f60 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/DiagnosticReport10_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/DiagnosticReport10_30.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_30; import org.hl7.fhir.convertors.VersionConvertor_10_30; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class DiagnosticReport10_30 { @@ -31,9 +32,8 @@ public class DiagnosticReport10_30 { if (src.hasEffective()) { tgt.setEffective(VersionConvertor_10_30.convertType(src.getEffective())); } - if (src.hasIssued()) { - tgt.setIssued(src.getIssued()); - } + if (src.hasIssuedElement()) + tgt.setIssuedElement((org.hl7.fhir.dstu2.model.InstantType) VersionConvertor_10_30.convertType(src.getIssuedElement())); if (src.hasBasedOn()) { for (org.hl7.fhir.dstu3.model.Reference t : src.getBasedOn()) tgt.addRequest(VersionConvertor_10_30.convertReference(t)); } @@ -49,9 +49,8 @@ public class DiagnosticReport10_30 { if (src.hasImage()) { for (org.hl7.fhir.dstu3.model.DiagnosticReport.DiagnosticReportImageComponent t : src.getImage()) tgt.addImage(convertDiagnosticReportImageComponent(t)); } - if (src.hasConclusion()) { - tgt.setConclusion(src.getConclusion()); - } + if (src.hasConclusionElement()) + tgt.setConclusionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getConclusionElement())); if (src.hasCodedDiagnosis()) { for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getCodedDiagnosis()) tgt.addCodedDiagnosis(VersionConvertor_10_30.convertCodeableConcept(t)); } @@ -87,9 +86,8 @@ public class DiagnosticReport10_30 { if (src.hasEffective()) { tgt.setEffective(VersionConvertor_10_30.convertType(src.getEffective())); } - if (src.hasIssued()) { - tgt.setIssued(src.getIssued()); - } + if (src.hasIssuedElement()) + tgt.setIssuedElement((org.hl7.fhir.dstu3.model.InstantType) VersionConvertor_10_30.convertType(src.getIssuedElement())); if (src.hasRequest()) { for (org.hl7.fhir.dstu2.model.Reference t : src.getRequest()) tgt.addBasedOn(VersionConvertor_10_30.convertReference(t)); } @@ -105,9 +103,8 @@ public class DiagnosticReport10_30 { if (src.hasImage()) { for (org.hl7.fhir.dstu2.model.DiagnosticReport.DiagnosticReportImageComponent t : src.getImage()) tgt.addImage(convertDiagnosticReportImageComponent(t)); } - if (src.hasConclusion()) { - tgt.setConclusion(src.getConclusion()); - } + if (src.hasConclusionElement()) + tgt.setConclusionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getConclusionElement())); if (src.hasCodedDiagnosis()) { for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getCodedDiagnosis()) tgt.addCodedDiagnosis(VersionConvertor_10_30.convertCodeableConcept(t)); } @@ -122,9 +119,8 @@ public class DiagnosticReport10_30 { return null; org.hl7.fhir.dstu3.model.DiagnosticReport.DiagnosticReportImageComponent tgt = new org.hl7.fhir.dstu3.model.DiagnosticReport.DiagnosticReportImageComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasComment()) { - tgt.setComment(src.getComment()); - } + if (src.hasCommentElement()) + tgt.setCommentElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getCommentElement())); if (src.hasLink()) { tgt.setLink(VersionConvertor_10_30.convertReference(src.getLink())); } @@ -136,9 +132,8 @@ public class DiagnosticReport10_30 { return null; org.hl7.fhir.dstu2.model.DiagnosticReport.DiagnosticReportImageComponent tgt = new org.hl7.fhir.dstu2.model.DiagnosticReport.DiagnosticReportImageComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasComment()) { - tgt.setComment(src.getComment()); - } + if (src.hasCommentElement()) + tgt.setCommentElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getCommentElement())); if (src.hasLink()) { tgt.setLink(VersionConvertor_10_30.convertReference(src.getLink())); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/DocumentManifest10_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/DocumentManifest10_30.java index 79d602bdc..4ae34fbbf 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/DocumentManifest10_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/DocumentManifest10_30.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_30; import org.hl7.fhir.convertors.VersionConvertor_10_30; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class DocumentManifest10_30 { @@ -28,18 +29,15 @@ public class DocumentManifest10_30 { if (src.hasAuthor()) { for (org.hl7.fhir.dstu3.model.Reference t : src.getAuthor()) tgt.addAuthor(VersionConvertor_10_30.convertReference(t)); } - if (src.hasCreated()) { - tgt.setCreated(src.getCreated()); - } - if (src.hasSource()) { - tgt.setSource(src.getSource()); - } + if (src.hasCreatedElement()) + tgt.setCreatedElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_30.convertType(src.getCreatedElement())); + if (src.hasSourceElement()) + tgt.setSourceElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_30.convertType(src.getSourceElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_10_30.convertDocumentReferenceStatus(src.getStatus())); } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getDescriptionElement())); if (src.hasContent()) { for (org.hl7.fhir.dstu3.model.DocumentManifest.DocumentManifestContentComponent t : src.getContent()) tgt.addContent(convertDocumentManifestContentComponent(t)); } @@ -72,18 +70,15 @@ public class DocumentManifest10_30 { if (src.hasAuthor()) { for (org.hl7.fhir.dstu2.model.Reference t : src.getAuthor()) tgt.addAuthor(VersionConvertor_10_30.convertReference(t)); } - if (src.hasCreated()) { - tgt.setCreated(src.getCreated()); - } - if (src.hasSource()) { - tgt.setSource(src.getSource()); - } + if (src.hasCreatedElement()) + tgt.setCreatedElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_10_30.convertType(src.getCreatedElement())); + if (src.hasSourceElement()) + tgt.setSourceElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_10_30.convertType(src.getSourceElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_10_30.convertDocumentReferenceStatus(src.getStatus())); } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getDescriptionElement())); if (src.hasContent()) { for (org.hl7.fhir.dstu2.model.DocumentManifest.DocumentManifestContentComponent t : src.getContent()) tgt.addContent(convertDocumentManifestContentComponent(t)); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/DocumentReference10_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/DocumentReference10_30.java index eea210aca..e3f8cd252 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/DocumentReference10_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/DocumentReference10_30.java @@ -4,6 +4,7 @@ import org.hl7.fhir.convertors.VersionConvertor_10_30; import org.hl7.fhir.dstu2.model.CodeableConcept; import org.hl7.fhir.dstu3.model.DocumentReference.ReferredDocumentStatus; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class DocumentReference10_30 { @@ -69,12 +70,10 @@ public class DocumentReference10_30 { if (src.hasAuthenticator()) { tgt.setAuthenticator(VersionConvertor_10_30.convertReference(src.getAuthenticator())); } - if (src.hasCreated()) { - tgt.setCreated(src.getCreated()); - } - if (src.hasIndexed()) { - tgt.setIndexed(src.getIndexed()); - } + if (src.hasCreatedElement()) + tgt.setCreatedElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_10_30.convertType(src.getCreatedElement())); + if (src.hasIndexedElement()) + tgt.setIndexedElement((org.hl7.fhir.dstu3.model.InstantType) VersionConvertor_10_30.convertType(src.getIndexedElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_10_30.convertDocumentReferenceStatus(src.getStatus())); } @@ -84,9 +83,8 @@ public class DocumentReference10_30 { if (src.hasRelatesTo()) { for (org.hl7.fhir.dstu2.model.DocumentReference.DocumentReferenceRelatesToComponent t : src.getRelatesTo()) tgt.addRelatesTo(convertDocumentReferenceRelatesToComponent(t)); } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getDescriptionElement())); if (src.hasSecurityLabel()) { for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getSecurityLabel()) tgt.addSecurityLabel(VersionConvertor_10_30.convertCodeableConcept(t)); } @@ -128,12 +126,10 @@ public class DocumentReference10_30 { if (src.hasAuthenticator()) { tgt.setAuthenticator(VersionConvertor_10_30.convertReference(src.getAuthenticator())); } - if (src.hasCreated()) { - tgt.setCreated(src.getCreated()); - } - if (src.hasIndexed()) { - tgt.setIndexed(src.getIndexed()); - } + if (src.hasCreatedElement()) + tgt.setCreatedElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_30.convertType(src.getCreatedElement())); + if (src.hasIndexedElement()) + tgt.setIndexedElement((org.hl7.fhir.dstu2.model.InstantType) VersionConvertor_10_30.convertType(src.getIndexedElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_10_30.convertDocumentReferenceStatus(src.getStatus())); } @@ -143,9 +139,8 @@ public class DocumentReference10_30 { if (src.hasRelatesTo()) { for (org.hl7.fhir.dstu3.model.DocumentReference.DocumentReferenceRelatesToComponent t : src.getRelatesTo()) tgt.addRelatesTo(convertDocumentReferenceRelatesToComponent(t)); } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getDescriptionElement())); if (src.hasSecurityLabel()) { for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getSecurityLabel()) tgt.addSecurityLabel(VersionConvertor_10_30.convertCodeableConcept(t)); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Encounter10_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Encounter10_30.java index a3be80529..c01a1472b 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Encounter10_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Encounter10_30.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_30; import org.hl7.fhir.convertors.VersionConvertor_10_30; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Encounter10_30 { diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/EnrollmentRequest10_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/EnrollmentRequest10_30.java index e0d6a1ef8..1d29d008b 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/EnrollmentRequest10_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/EnrollmentRequest10_30.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_30; import org.hl7.fhir.convertors.VersionConvertor_10_30; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class EnrollmentRequest10_30 { @@ -13,9 +14,8 @@ public class EnrollmentRequest10_30 { if (src.hasIdentifier()) { for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t)); } - if (src.hasCreated()) { - tgt.setCreated(src.getCreated()); - } + if (src.hasCreatedElement()) + tgt.setCreatedElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_10_30.convertType(src.getCreatedElement())); if (src.hasProvider()) { tgt.setProvider(VersionConvertor_10_30.convertReference(src.getProvider())); } @@ -39,9 +39,8 @@ public class EnrollmentRequest10_30 { if (src.hasIdentifier()) { for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t)); } - if (src.hasCreated()) { - tgt.setCreated(src.getCreated()); - } + if (src.hasCreatedElement()) + tgt.setCreatedElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_30.convertType(src.getCreatedElement())); if (src.hasCoverage()) { tgt.setCoverage(VersionConvertor_10_30.convertReference(src.getCoverage())); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/EnrollmentResponse10_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/EnrollmentResponse10_30.java index 3e74d2433..931b293b4 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/EnrollmentResponse10_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/EnrollmentResponse10_30.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_30; import org.hl7.fhir.convertors.VersionConvertor_10_30; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class EnrollmentResponse10_30 { @@ -16,12 +17,10 @@ public class EnrollmentResponse10_30 { if (src.hasRequest()) { tgt.setRequest(VersionConvertor_10_30.convertReference(src.getRequest())); } - if (src.hasDisposition()) { - tgt.setDisposition(src.getDisposition()); - } - if (src.hasCreated()) { - tgt.setCreated(src.getCreated()); - } + if (src.hasDispositionElement()) + tgt.setDispositionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getDispositionElement())); + if (src.hasCreatedElement()) + tgt.setCreatedElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_10_30.convertType(src.getCreatedElement())); if (src.hasOrganization()) { tgt.setOrganization(VersionConvertor_10_30.convertReference(src.getOrganization())); } @@ -42,12 +41,10 @@ public class EnrollmentResponse10_30 { if (src.hasIdentifier()) { for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t)); } - if (src.hasDisposition()) { - tgt.setDisposition(src.getDisposition()); - } - if (src.hasCreated()) { - tgt.setCreated(src.getCreated()); - } + if (src.hasDispositionElement()) + tgt.setDispositionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getDispositionElement())); + if (src.hasCreatedElement()) + tgt.setCreatedElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_30.convertType(src.getCreatedElement())); return tgt; } } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/EpisodeOfCare10_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/EpisodeOfCare10_30.java index ac5535b2c..ac69d4a71 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/EpisodeOfCare10_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/EpisodeOfCare10_30.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_30; import org.hl7.fhir.convertors.VersionConvertor_10_30; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class EpisodeOfCare10_30 { diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/FamilyMemberHistory10_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/FamilyMemberHistory10_30.java index 6ac0e5d56..360006fa4 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/FamilyMemberHistory10_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/FamilyMemberHistory10_30.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_30; import org.hl7.fhir.convertors.VersionConvertor_10_30; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class FamilyMemberHistory10_30 { @@ -50,14 +51,13 @@ public class FamilyMemberHistory10_30 { if (src.hasPatient()) { tgt.setPatient(VersionConvertor_10_30.convertReference(src.getPatient())); } - if (src.hasDate()) - tgt.setDate(src.getDate()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_10_30.convertType(src.getDateElement())); if (src.hasStatus()) { tgt.setStatus(convertFamilyHistoryStatus(src.getStatus())); } - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getNameElement())); if (src.hasRelationship()) { tgt.setRelationship(VersionConvertor_10_30.convertCodeableConcept(src.getRelationship())); } @@ -90,14 +90,13 @@ public class FamilyMemberHistory10_30 { if (src.hasPatient()) { tgt.setPatient(VersionConvertor_10_30.convertReference(src.getPatient())); } - if (src.hasDate()) - tgt.setDate(src.getDate()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_30.convertType(src.getDateElement())); if (src.hasStatus()) { tgt.setStatus(convertFamilyHistoryStatus(src.getStatus())); } - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getNameElement())); if (src.hasRelationship()) { tgt.setRelationship(VersionConvertor_10_30.convertCodeableConcept(src.getRelationship())); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Flag10_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Flag10_30.java index eeaf5868a..65593fe2e 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Flag10_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Flag10_30.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_30; import org.hl7.fhir.convertors.VersionConvertor_10_30; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Flag10_30 { diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Group10_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Group10_30.java index 0958d0c32..48d9c7fd7 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Group10_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Group10_30.java @@ -1,7 +1,10 @@ package org.hl7.fhir.convertors.conv10_30; import org.hl7.fhir.convertors.VersionConvertor_10_30; +import org.hl7.fhir.dstu2.model.BooleanType; +import org.hl7.fhir.dstu2.model.UnsignedIntType; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Group10_30 { @@ -16,17 +19,16 @@ public class Group10_30 { if (src.hasType()) { tgt.setType(convertGroupType(src.getType())); } - if (src.hasActual()) { - tgt.setActual(src.getActual()); + if (src.hasActualElement()) { + tgt.setActualElement((BooleanType) VersionConvertor_10_30.convertType(src.getActualElement())); } if (src.hasCode()) { tgt.setCode(VersionConvertor_10_30.convertCodeableConcept(src.getCode())); } - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasQuantity()) { - tgt.setQuantity(src.getQuantity()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getNameElement())); + if (src.hasQuantityElement()) { + tgt.setQuantityElement((UnsignedIntType) VersionConvertor_10_30.convertType(src.getQuantityElement())); } if (src.hasCharacteristic()) { for (org.hl7.fhir.dstu3.model.Group.GroupCharacteristicComponent t : src.getCharacteristic()) tgt.addCharacteristic(convertGroupCharacteristicComponent(t)); @@ -48,17 +50,16 @@ public class Group10_30 { if (src.hasType()) { tgt.setType(convertGroupType(src.getType())); } - if (src.hasActual()) { - tgt.setActual(src.getActual()); + if (src.hasActualElement()) { + tgt.setActualElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_10_30.convertType(src.getActualElement())); } if (src.hasCode()) { tgt.setCode(VersionConvertor_10_30.convertCodeableConcept(src.getCode())); } - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasQuantity()) { - tgt.setQuantity(src.getQuantity()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getNameElement())); + if (src.hasQuantityElement()) { + tgt.setQuantityElement((org.hl7.fhir.dstu3.model.UnsignedIntType) VersionConvertor_10_30.convertType(src.getQuantityElement())); } if (src.hasCharacteristic()) { for (org.hl7.fhir.dstu2.model.Group.GroupCharacteristicComponent t : src.getCharacteristic()) tgt.addCharacteristic(convertGroupCharacteristicComponent(t)); @@ -80,8 +81,8 @@ public class Group10_30 { if (src.hasValue()) { tgt.setValue(VersionConvertor_10_30.convertType(src.getValue())); } - if (src.hasExclude()) { - tgt.setExclude(src.getExclude()); + if (src.hasExcludeElement()) { + tgt.setExcludeElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_10_30.convertType(src.getExcludeElement())); } if (src.hasPeriod()) { tgt.setPeriod(VersionConvertor_10_30.convertPeriod(src.getPeriod())); @@ -100,8 +101,8 @@ public class Group10_30 { if (src.hasValue()) { tgt.setValue(VersionConvertor_10_30.convertType(src.getValue())); } - if (src.hasExclude()) { - tgt.setExclude(src.getExclude()); + if (src.hasExcludeElement()) { + tgt.setExcludeElement((BooleanType) VersionConvertor_10_30.convertType(src.getExcludeElement())); } if (src.hasPeriod()) { tgt.setPeriod(VersionConvertor_10_30.convertPeriod(src.getPeriod())); @@ -120,8 +121,8 @@ public class Group10_30 { if (src.hasPeriod()) { tgt.setPeriod(VersionConvertor_10_30.convertPeriod(src.getPeriod())); } - if (src.hasInactive()) { - tgt.setInactive(src.getInactive()); + if (src.hasInactiveElement()) { + tgt.setInactiveElement((BooleanType) VersionConvertor_10_30.convertType(src.getInactiveElement())); } return tgt; } @@ -137,8 +138,8 @@ public class Group10_30 { if (src.hasPeriod()) { tgt.setPeriod(VersionConvertor_10_30.convertPeriod(src.getPeriod())); } - if (src.hasInactive()) { - tgt.setInactive(src.getInactive()); + if (src.hasInactiveElement()) { + tgt.setInactiveElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_10_30.convertType(src.getInactiveElement())); } return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/HealthcareService10_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/HealthcareService10_30.java index 78b6d55f8..06bb7e843 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/HealthcareService10_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/HealthcareService10_30.java @@ -1,7 +1,9 @@ package org.hl7.fhir.convertors.conv10_30; import org.hl7.fhir.convertors.VersionConvertor_10_30; +import org.hl7.fhir.dstu2.model.BooleanType; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class HealthcareService10_30 { @@ -70,12 +72,10 @@ public class HealthcareService10_30 { if (src.hasLocation()) { for (org.hl7.fhir.dstu3.model.Reference t : src.getLocation()) tgt.setLocation(VersionConvertor_10_30.convertReference(t)); } - if (src.hasComment()) { - tgt.setComment(src.getComment()); - } - if (src.hasExtraDetails()) { - tgt.setExtraDetails(src.getExtraDetails()); - } + if (src.hasCommentElement()) + tgt.setCommentElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getCommentElement())); + if (src.hasExtraDetailsElement()) + tgt.setExtraDetailsElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getExtraDetailsElement())); if (src.hasPhoto()) { tgt.setPhoto(VersionConvertor_10_30.convertAttachment(src.getPhoto())); } @@ -91,9 +91,8 @@ public class HealthcareService10_30 { if (src.hasEligibility()) { tgt.setEligibility(VersionConvertor_10_30.convertCodeableConcept(src.getEligibility())); } - if (src.hasEligibilityNote()) { - tgt.setEligibilityNote(src.getEligibilityNote()); - } + if (src.hasEligibilityNoteElement()) + tgt.setEligibilityNoteElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getEligibilityNoteElement())); if (src.hasProgramName()) { for (org.hl7.fhir.dstu3.model.StringType t : src.getProgramName()) tgt.addProgramName(t.getValue()); } @@ -103,8 +102,8 @@ public class HealthcareService10_30 { if (src.hasReferralMethod()) { for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getReferralMethod()) tgt.addReferralMethod(VersionConvertor_10_30.convertCodeableConcept(t)); } - if (src.hasAppointmentRequired()) { - tgt.setAppointmentRequired(src.getAppointmentRequired()); + if (src.hasAppointmentRequiredElement()) { + tgt.setAppointmentRequiredElement((BooleanType) VersionConvertor_10_30.convertType(src.getAppointmentRequiredElement())); } if (src.hasAvailableTime()) { for (org.hl7.fhir.dstu3.model.HealthcareService.HealthcareServiceAvailableTimeComponent t : src.getAvailableTime()) tgt.addAvailableTime(convertHealthcareServiceAvailableTimeComponent(t)); @@ -112,9 +111,8 @@ public class HealthcareService10_30 { if (src.hasNotAvailable()) { for (org.hl7.fhir.dstu3.model.HealthcareService.HealthcareServiceNotAvailableComponent t : src.getNotAvailable()) tgt.addNotAvailable(convertHealthcareServiceNotAvailableComponent(t)); } - if (src.hasAvailabilityExceptions()) { - tgt.setAvailabilityExceptions(src.getAvailabilityExceptions()); - } + if (src.hasAvailabilityExceptionsElement()) + tgt.setAvailabilityExceptionsElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getAvailabilityExceptionsElement())); return tgt; } @@ -135,12 +133,10 @@ public class HealthcareService10_30 { if (src.hasLocation()) { tgt.addLocation(VersionConvertor_10_30.convertReference(src.getLocation())); } - if (src.hasComment()) { - tgt.setComment(src.getComment()); - } - if (src.hasExtraDetails()) { - tgt.setExtraDetails(src.getExtraDetails()); - } + if (src.hasCommentElement()) + tgt.setCommentElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getCommentElement())); + if (src.hasExtraDetailsElement()) + tgt.setExtraDetailsElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getExtraDetailsElement())); if (src.hasPhoto()) { tgt.setPhoto(VersionConvertor_10_30.convertAttachment(src.getPhoto())); } @@ -156,9 +152,8 @@ public class HealthcareService10_30 { if (src.hasEligibility()) { tgt.setEligibility(VersionConvertor_10_30.convertCodeableConcept(src.getEligibility())); } - if (src.hasEligibilityNote()) { - tgt.setEligibilityNote(src.getEligibilityNote()); - } + if (src.hasEligibilityNoteElement()) + tgt.setEligibilityNoteElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getEligibilityNoteElement())); if (src.hasProgramName()) { for (org.hl7.fhir.dstu2.model.StringType t : src.getProgramName()) tgt.addProgramName(t.getValue()); } @@ -168,8 +163,8 @@ public class HealthcareService10_30 { if (src.hasReferralMethod()) { for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getReferralMethod()) tgt.addReferralMethod(VersionConvertor_10_30.convertCodeableConcept(t)); } - if (src.hasAppointmentRequired()) { - tgt.setAppointmentRequired(src.getAppointmentRequired()); + if (src.hasAppointmentRequiredElement()) { + tgt.setAppointmentRequiredElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_10_30.convertType(src.getAppointmentRequiredElement())); } if (src.hasAvailableTime()) { for (org.hl7.fhir.dstu2.model.HealthcareService.HealthcareServiceAvailableTimeComponent t : src.getAvailableTime()) tgt.addAvailableTime(convertHealthcareServiceAvailableTimeComponent(t)); @@ -177,9 +172,8 @@ public class HealthcareService10_30 { if (src.hasNotAvailable()) { for (org.hl7.fhir.dstu2.model.HealthcareService.HealthcareServiceNotAvailableComponent t : src.getNotAvailable()) tgt.addNotAvailable(convertHealthcareServiceNotAvailableComponent(t)); } - if (src.hasAvailabilityExceptions()) { - tgt.setAvailabilityExceptions(src.getAvailabilityExceptions()); - } + if (src.hasAvailabilityExceptionsElement()) + tgt.setAvailabilityExceptionsElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getAvailabilityExceptionsElement())); return tgt; } @@ -191,15 +185,13 @@ public class HealthcareService10_30 { if (src.hasDaysOfWeek()) { for (org.hl7.fhir.dstu2.model.Enumeration t : src.getDaysOfWeek()) VersionConvertor_10_30.copyElement(t, tgt.addDaysOfWeekElement().setValue(convertDaysOfWeek(t.getValue()))); } - if (src.hasAllDay()) { - tgt.setAllDay(src.getAllDay()); - } - if (src.hasAvailableStartTime()) { - tgt.setAvailableStartTime(src.getAvailableStartTime()); - } - if (src.hasAvailableEndTime()) { - tgt.setAvailableEndTime(src.getAvailableEndTime()); + if (src.hasAllDayElement()) { + tgt.setAllDayElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_10_30.convertType(src.getAllDayElement())); } + if (src.hasAvailableStartTimeElement()) + tgt.setAvailableStartTimeElement((org.hl7.fhir.dstu3.model.TimeType) VersionConvertor_10_30.convertType(src.getAvailableStartTimeElement())); + if (src.hasAvailableEndTimeElement()) + tgt.setAvailableEndTimeElement((org.hl7.fhir.dstu3.model.TimeType) VersionConvertor_10_30.convertType(src.getAvailableEndTimeElement())); return tgt; } @@ -211,15 +203,13 @@ public class HealthcareService10_30 { if (src.hasDaysOfWeek()) { for (org.hl7.fhir.dstu3.model.Enumeration t : src.getDaysOfWeek()) VersionConvertor_10_30.copyElement(t, tgt.addDaysOfWeekElement().setValue(convertDaysOfWeek(t.getValue()))); } - if (src.hasAllDay()) { - tgt.setAllDay(src.getAllDay()); - } - if (src.hasAvailableStartTime()) { - tgt.setAvailableStartTime(src.getAvailableStartTime()); - } - if (src.hasAvailableEndTime()) { - tgt.setAvailableEndTime(src.getAvailableEndTime()); + if (src.hasAllDayElement()) { + tgt.setAllDayElement((BooleanType) VersionConvertor_10_30.convertType(src.getAllDayElement())); } + if (src.hasAvailableStartTimeElement()) + tgt.setAvailableStartTimeElement((org.hl7.fhir.dstu2.model.TimeType) VersionConvertor_10_30.convertType(src.getAvailableStartTimeElement())); + if (src.hasAvailableEndTimeElement()) + tgt.setAvailableEndTimeElement((org.hl7.fhir.dstu2.model.TimeType) VersionConvertor_10_30.convertType(src.getAvailableEndTimeElement())); return tgt; } @@ -228,9 +218,8 @@ public class HealthcareService10_30 { return null; org.hl7.fhir.dstu3.model.HealthcareService.HealthcareServiceNotAvailableComponent tgt = new org.hl7.fhir.dstu3.model.HealthcareService.HealthcareServiceNotAvailableComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getDescriptionElement())); if (src.hasDuring()) { tgt.setDuring(VersionConvertor_10_30.convertPeriod(src.getDuring())); } @@ -242,9 +231,8 @@ public class HealthcareService10_30 { return null; org.hl7.fhir.dstu2.model.HealthcareService.HealthcareServiceNotAvailableComponent tgt = new org.hl7.fhir.dstu2.model.HealthcareService.HealthcareServiceNotAvailableComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getDescriptionElement())); if (src.hasDuring()) { tgt.setDuring(VersionConvertor_10_30.convertPeriod(src.getDuring())); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/ImagingStudy10_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/ImagingStudy10_30.java index ec5bd3ab6..20a340aaf 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/ImagingStudy10_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/ImagingStudy10_30.java @@ -1,7 +1,9 @@ package org.hl7.fhir.convertors.conv10_30; import org.hl7.fhir.convertors.VersionConvertor_10_30; +import org.hl7.fhir.dstu3.model.UnsignedIntType; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class ImagingStudy10_30 { @@ -10,9 +12,8 @@ public class ImagingStudy10_30 { return null; org.hl7.fhir.dstu3.model.ImagingStudy tgt = new org.hl7.fhir.dstu3.model.ImagingStudy(); VersionConvertor_10_30.copyDomainResource(src, tgt); - if (src.hasUid()) { - tgt.setUid(src.getUid()); - } + if (src.hasUidElement()) + tgt.setUidElement((org.hl7.fhir.dstu3.model.OidType) VersionConvertor_10_30.convertType(src.getUidElement())); if (src.hasAccession()) { tgt.setAccession(VersionConvertor_10_30.convertIdentifier(src.getAccession())); } @@ -28,27 +29,25 @@ public class ImagingStudy10_30 { if (src.hasPatient()) { tgt.setPatient(VersionConvertor_10_30.convertReference(src.getPatient())); } - if (src.hasStarted()) { - tgt.setStarted(src.getStarted()); - } + if (src.hasStartedElement()) + tgt.setStartedElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_10_30.convertType(src.getStartedElement())); if (src.hasReferrer()) { tgt.setReferrer(VersionConvertor_10_30.convertReference(src.getReferrer())); } if (src.hasInterpreter()) { tgt.addInterpreter(VersionConvertor_10_30.convertReference(src.getInterpreter())); } - if (src.hasNumberOfSeries()) { - tgt.setNumberOfSeries(src.getNumberOfSeries()); + if (src.hasNumberOfSeriesElement()) { + tgt.setNumberOfSeriesElement((UnsignedIntType) VersionConvertor_10_30.convertType(src.getNumberOfSeriesElement())); } - if (src.hasNumberOfInstances()) { - tgt.setNumberOfInstances(src.getNumberOfInstances()); + if (src.hasNumberOfInstancesElement()) { + tgt.setNumberOfInstancesElement((UnsignedIntType) VersionConvertor_10_30.convertType(src.getNumberOfInstancesElement())); } if (src.hasProcedure()) { for (org.hl7.fhir.dstu2.model.Reference t : src.getProcedure()) tgt.addProcedureReference(VersionConvertor_10_30.convertReference(t)); } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getDescriptionElement())); if (src.hasSeries()) { for (org.hl7.fhir.dstu2.model.ImagingStudy.ImagingStudySeriesComponent t : src.getSeries()) tgt.addSeries(convertImagingStudySeriesComponent(t)); } @@ -60,9 +59,8 @@ public class ImagingStudy10_30 { return null; org.hl7.fhir.dstu2.model.ImagingStudy tgt = new org.hl7.fhir.dstu2.model.ImagingStudy(); VersionConvertor_10_30.copyDomainResource(src, tgt); - if (src.hasUid()) { - tgt.setUid(src.getUid()); - } + if (src.hasUidElement()) + tgt.setUidElement((org.hl7.fhir.dstu2.model.OidType) VersionConvertor_10_30.convertType(src.getUidElement())); if (src.hasAccession()) { tgt.setAccession(VersionConvertor_10_30.convertIdentifier(src.getAccession())); } @@ -78,27 +76,25 @@ public class ImagingStudy10_30 { if (src.hasPatient()) { tgt.setPatient(VersionConvertor_10_30.convertReference(src.getPatient())); } - if (src.hasStarted()) { - tgt.setStarted(src.getStarted()); - } + if (src.hasStartedElement()) + tgt.setStartedElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_30.convertType(src.getStartedElement())); if (src.hasReferrer()) { tgt.setReferrer(VersionConvertor_10_30.convertReference(src.getReferrer())); } if (src.hasInterpreter()) { for (org.hl7.fhir.dstu3.model.Reference t : src.getInterpreter()) tgt.setInterpreter(VersionConvertor_10_30.convertReference(t)); } - if (src.hasNumberOfSeries()) { - tgt.setNumberOfSeries(src.getNumberOfSeries()); + if (src.hasNumberOfSeriesElement()) { + tgt.setNumberOfSeriesElement((org.hl7.fhir.dstu2.model.UnsignedIntType) VersionConvertor_10_30.convertType(src.getNumberOfSeriesElement())); } - if (src.hasNumberOfInstances()) { - tgt.setNumberOfInstances(src.getNumberOfInstances()); + if (src.hasNumberOfInstancesElement()) { + tgt.setNumberOfInstancesElement((org.hl7.fhir.dstu2.model.UnsignedIntType) VersionConvertor_10_30.convertType(src.getNumberOfInstancesElement())); } if (src.hasProcedureReference()) { for (org.hl7.fhir.dstu3.model.Reference t : src.getProcedureReference()) tgt.addProcedure(VersionConvertor_10_30.convertReference(t)); } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getDescriptionElement())); if (src.hasSeries()) { for (org.hl7.fhir.dstu3.model.ImagingStudy.ImagingStudySeriesComponent t : src.getSeries()) tgt.addSeries(convertImagingStudySeriesComponent(t)); } @@ -110,18 +106,16 @@ public class ImagingStudy10_30 { return null; org.hl7.fhir.dstu2.model.ImagingStudy.ImagingStudySeriesComponent tgt = new org.hl7.fhir.dstu2.model.ImagingStudy.ImagingStudySeriesComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasUid()) { - tgt.setUid(src.getUid()); - } + if (src.hasUidElement()) + tgt.setUidElement((org.hl7.fhir.dstu2.model.OidType) VersionConvertor_10_30.convertType(src.getUidElement())); if (src.hasNumber()) { tgt.setNumber(src.getNumber()); } if (src.hasModality()) { tgt.setModality(VersionConvertor_10_30.convertCoding(src.getModality())); } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getDescriptionElement())); if (src.hasNumberOfInstances()) { tgt.setNumberOfInstances(src.getNumberOfInstances()); } @@ -134,9 +128,8 @@ public class ImagingStudy10_30 { if (src.hasLaterality()) { tgt.setLaterality(VersionConvertor_10_30.convertCoding(src.getLaterality())); } - if (src.hasStarted()) { - tgt.setStarted(src.getStarted()); - } + if (src.hasStartedElement()) + tgt.setStartedElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_30.convertType(src.getStartedElement())); if (src.hasInstance()) { for (org.hl7.fhir.dstu3.model.ImagingStudy.ImagingStudySeriesInstanceComponent t : src.getInstance()) tgt.addInstance(convertImagingStudySeriesInstanceComponent(t)); } @@ -148,18 +141,16 @@ public class ImagingStudy10_30 { return null; org.hl7.fhir.dstu3.model.ImagingStudy.ImagingStudySeriesComponent tgt = new org.hl7.fhir.dstu3.model.ImagingStudy.ImagingStudySeriesComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasUid()) { - tgt.setUid(src.getUid()); - } + if (src.hasUidElement()) + tgt.setUidElement((org.hl7.fhir.dstu3.model.OidType) VersionConvertor_10_30.convertType(src.getUidElement())); if (src.hasNumber()) { tgt.setNumber(src.getNumber()); } if (src.hasModality()) { tgt.setModality(VersionConvertor_10_30.convertCoding(src.getModality())); } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getDescriptionElement())); if (src.hasNumberOfInstances()) { tgt.setNumberOfInstances(src.getNumberOfInstances()); } @@ -172,9 +163,8 @@ public class ImagingStudy10_30 { if (src.hasLaterality()) { tgt.setLaterality(VersionConvertor_10_30.convertCoding(src.getLaterality())); } - if (src.hasStarted()) { - tgt.setStarted(src.getStarted()); - } + if (src.hasStartedElement()) + tgt.setStartedElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_10_30.convertType(src.getStartedElement())); if (src.hasInstance()) { for (org.hl7.fhir.dstu2.model.ImagingStudy.ImagingStudySeriesInstanceComponent t : src.getInstance()) tgt.addInstance(convertImagingStudySeriesInstanceComponent(t)); } @@ -186,18 +176,15 @@ public class ImagingStudy10_30 { return null; org.hl7.fhir.dstu3.model.ImagingStudy.ImagingStudySeriesInstanceComponent tgt = new org.hl7.fhir.dstu3.model.ImagingStudy.ImagingStudySeriesInstanceComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasUid()) { - tgt.setUid(src.getUid()); - } - if (src.hasNumber()) { - tgt.setNumber(src.getNumber()); - } - if (src.hasSopClass()) { - tgt.setSopClass(src.getSopClass()); - } - if (src.hasTitle()) { - tgt.setTitle(src.getTitle()); + if (src.hasUidElement()) + tgt.setUidElement((org.hl7.fhir.dstu3.model.OidType) VersionConvertor_10_30.convertType(src.getUidElement())); + if (src.hasNumberElement()) { + tgt.setNumberElement((UnsignedIntType) VersionConvertor_10_30.convertType(src.getNumberElement())); } + if (src.hasSopClassElement()) + tgt.setSopClassElement((org.hl7.fhir.dstu3.model.OidType) VersionConvertor_10_30.convertType(src.getSopClassElement())); + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getTitleElement())); return tgt; } @@ -206,18 +193,15 @@ public class ImagingStudy10_30 { return null; org.hl7.fhir.dstu2.model.ImagingStudy.ImagingStudySeriesInstanceComponent tgt = new org.hl7.fhir.dstu2.model.ImagingStudy.ImagingStudySeriesInstanceComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasUid()) { - tgt.setUid(src.getUid()); - } - if (src.hasNumber()) { - tgt.setNumber(src.getNumber()); - } - if (src.hasSopClass()) { - tgt.setSopClass(src.getSopClass()); - } - if (src.hasTitle()) { - tgt.setTitle(src.getTitle()); + if (src.hasUidElement()) + tgt.setUidElement((org.hl7.fhir.dstu2.model.OidType) VersionConvertor_10_30.convertType(src.getUidElement())); + if (src.hasNumberElement()) { + tgt.setNumberElement((org.hl7.fhir.dstu2.model.UnsignedIntType) VersionConvertor_10_30.convertType(src.getNumberElement())); } + if (src.hasSopClassElement()) + tgt.setSopClassElement((org.hl7.fhir.dstu2.model.OidType) VersionConvertor_10_30.convertType(src.getSopClassElement())); + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getTitleElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Immunization10_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Immunization10_30.java index 77381ff89..883941660 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Immunization10_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Immunization10_30.java @@ -1,10 +1,12 @@ package org.hl7.fhir.convertors.conv10_30; import org.hl7.fhir.convertors.VersionConvertor_10_30; +import org.hl7.fhir.dstu2.model.BooleanType; import org.hl7.fhir.dstu3.model.Coding; import org.hl7.fhir.dstu3.model.Immunization.ImmunizationPractitionerComponent; import org.hl7.fhir.exceptions.FHIRException; import java.util.List; +import java.util.Collections; public class Immunization10_30 { @@ -19,16 +21,16 @@ public class Immunization10_30 { if (src.hasStatus()) { tgt.setStatus(src.getStatus().toCode()); } - if (src.hasDate()) - tgt.setDate(src.getDate()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_30.convertType(src.getDateElement())); if (src.hasVaccineCode()) { tgt.setVaccineCode(VersionConvertor_10_30.convertCodeableConcept(src.getVaccineCode())); } if (src.hasPatient()) { tgt.setPatient(VersionConvertor_10_30.convertReference(src.getPatient())); } - if (src.hasNotGiven()) { - tgt.setWasNotGiven(src.getNotGiven()); + if (src.hasNotGivenElement()) { + tgt.setWasNotGivenElement((BooleanType) VersionConvertor_10_30.convertType(src.getNotGivenElement())); } if (src.hasPrimarySource()) { tgt.setReported(!src.getPrimarySource()); @@ -48,12 +50,10 @@ public class Immunization10_30 { if (src.hasLocation()) { tgt.setLocation(VersionConvertor_10_30.convertReference(src.getLocation())); } - if (src.hasLotNumber()) { - tgt.setLotNumber(src.getLotNumber()); - } - if (src.hasExpirationDate()) { - tgt.setExpirationDate(src.getExpirationDate()); - } + if (src.hasLotNumberElement()) + tgt.setLotNumberElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getLotNumberElement())); + if (src.hasExpirationDateElement()) + tgt.setExpirationDateElement((org.hl7.fhir.dstu2.model.DateType) VersionConvertor_10_30.convertType(src.getExpirationDateElement())); if (src.hasSite()) { tgt.setSite(VersionConvertor_10_30.convertCodeableConcept(src.getSite())); } @@ -93,16 +93,16 @@ public class Immunization10_30 { } catch (org.hl7.fhir.exceptions.FHIRException e) { throw new FHIRException(e); } - if (src.hasDate()) - tgt.setDate(src.getDate()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_10_30.convertType(src.getDateElement())); if (src.hasVaccineCode()) { tgt.setVaccineCode(VersionConvertor_10_30.convertCodeableConcept(src.getVaccineCode())); } if (src.hasPatient()) { tgt.setPatient(VersionConvertor_10_30.convertReference(src.getPatient())); } - if (src.hasWasNotGiven()) { - tgt.setNotGiven(src.getWasNotGiven()); + if (src.hasWasNotGivenElement()) { + tgt.setNotGivenElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_10_30.convertType(src.getWasNotGivenElement())); } if (src.hasReported()) { tgt.setPrimarySource(!src.getReported()); @@ -120,12 +120,10 @@ public class Immunization10_30 { if (src.hasLocation()) { tgt.setLocation(VersionConvertor_10_30.convertReference(src.getLocation())); } - if (src.hasLotNumber()) { - tgt.setLotNumber(src.getLotNumber()); - } - if (src.hasExpirationDate()) { - tgt.setExpirationDate(src.getExpirationDate()); - } + if (src.hasLotNumberElement()) + tgt.setLotNumberElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getLotNumberElement())); + if (src.hasExpirationDateElement()) + tgt.setExpirationDateElement((org.hl7.fhir.dstu3.model.DateType) VersionConvertor_10_30.convertType(src.getExpirationDateElement())); if (src.hasSite()) { tgt.setSite(VersionConvertor_10_30.convertCodeableConcept(src.getSite())); } @@ -183,13 +181,13 @@ public class Immunization10_30 { return null; org.hl7.fhir.dstu3.model.Immunization.ImmunizationReactionComponent tgt = new org.hl7.fhir.dstu3.model.Immunization.ImmunizationReactionComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasDate()) - tgt.setDate(src.getDate()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_10_30.convertType(src.getDateElement())); if (src.hasDetail()) { tgt.setDetail(VersionConvertor_10_30.convertReference(src.getDetail())); } - if (src.hasReported()) { - tgt.setReported(src.getReported()); + if (src.hasReportedElement()) { + tgt.setReportedElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_10_30.convertType(src.getReportedElement())); } return tgt; } @@ -199,13 +197,13 @@ public class Immunization10_30 { return null; org.hl7.fhir.dstu2.model.Immunization.ImmunizationReactionComponent tgt = new org.hl7.fhir.dstu2.model.Immunization.ImmunizationReactionComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasDate()) - tgt.setDate(src.getDate()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_30.convertType(src.getDateElement())); if (src.hasDetail()) { tgt.setDetail(VersionConvertor_10_30.convertReference(src.getDetail())); } - if (src.hasReported()) { - tgt.setReported(src.getReported()); + if (src.hasReportedElement()) { + tgt.setReportedElement((BooleanType) VersionConvertor_10_30.convertType(src.getReportedElement())); } return tgt; } @@ -218,15 +216,13 @@ public class Immunization10_30 { if (src.hasDoseSequence()) { tgt.setDoseSequence(src.getDoseSequence()); } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getDescriptionElement())); if (src.hasAuthority()) { tgt.setAuthority(VersionConvertor_10_30.convertReference(src.getAuthority())); } - if (src.hasSeries()) { - tgt.setSeries(src.getSeries()); - } + if (src.hasSeriesElement()) + tgt.setSeriesElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getSeriesElement())); if (src.hasSeriesDoses()) { tgt.setSeriesDoses(src.getSeriesDoses()); } @@ -250,15 +246,13 @@ public class Immunization10_30 { if (src.hasDoseSequence()) { tgt.setDoseSequence(src.getDoseSequence()); } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getDescriptionElement())); if (src.hasAuthority()) { tgt.setAuthority(VersionConvertor_10_30.convertReference(src.getAuthority())); } - if (src.hasSeries()) { - tgt.setSeries(src.getSeries()); - } + if (src.hasSeriesElement()) + tgt.setSeriesElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getSeriesElement())); if (src.hasSeriesDoses()) { tgt.setSeriesDoses(src.getSeriesDoses()); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/ImmunizationRecommendation10_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/ImmunizationRecommendation10_30.java index 17722ecd7..cf063a4fd 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/ImmunizationRecommendation10_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/ImmunizationRecommendation10_30.java @@ -1,7 +1,9 @@ package org.hl7.fhir.convertors.conv10_30; import org.hl7.fhir.convertors.VersionConvertor_10_30; +import org.hl7.fhir.dstu2.model.PositiveIntType; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class ImmunizationRecommendation10_30 { @@ -44,13 +46,13 @@ public class ImmunizationRecommendation10_30 { return null; org.hl7.fhir.dstu2.model.ImmunizationRecommendation.ImmunizationRecommendationRecommendationComponent tgt = new org.hl7.fhir.dstu2.model.ImmunizationRecommendation.ImmunizationRecommendationRecommendationComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasDate()) - tgt.setDate(src.getDate()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_30.convertType(src.getDateElement())); if (src.hasVaccineCode()) { tgt.setVaccineCode(VersionConvertor_10_30.convertCodeableConcept(src.getVaccineCode())); } - if (src.hasDoseNumber()) { - tgt.setDoseNumber(src.getDoseNumber()); + if (src.hasDoseNumberElement()) { + tgt.setDoseNumberElement((PositiveIntType) VersionConvertor_10_30.convertType(src.getDoseNumberElement())); } if (src.hasForecastStatus()) { tgt.setForecastStatus(VersionConvertor_10_30.convertCodeableConcept(src.getForecastStatus())); @@ -75,13 +77,13 @@ public class ImmunizationRecommendation10_30 { return null; org.hl7.fhir.dstu3.model.ImmunizationRecommendation.ImmunizationRecommendationRecommendationComponent tgt = new org.hl7.fhir.dstu3.model.ImmunizationRecommendation.ImmunizationRecommendationRecommendationComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasDate()) - tgt.setDate(src.getDate()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_10_30.convertType(src.getDateElement())); if (src.hasVaccineCode()) { tgt.setVaccineCode(VersionConvertor_10_30.convertCodeableConcept(src.getVaccineCode())); } - if (src.hasDoseNumber()) { - tgt.setDoseNumber(src.getDoseNumber()); + if (src.hasDoseNumberElement()) { + tgt.setDoseNumberElement((org.hl7.fhir.dstu3.model.PositiveIntType) VersionConvertor_10_30.convertType(src.getDoseNumberElement())); } if (src.hasForecastStatus()) { tgt.setForecastStatus(VersionConvertor_10_30.convertCodeableConcept(src.getForecastStatus())); @@ -109,9 +111,8 @@ public class ImmunizationRecommendation10_30 { if (src.hasCode()) { tgt.setCode(VersionConvertor_10_30.convertCodeableConcept(src.getCode())); } - if (src.hasValue()) { - tgt.setValue(src.getValue()); - } + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_30.convertType(src.getValueElement())); return tgt; } @@ -123,9 +124,8 @@ public class ImmunizationRecommendation10_30 { if (src.hasCode()) { tgt.setCode(VersionConvertor_10_30.convertCodeableConcept(src.getCode())); } - if (src.hasValue()) { - tgt.setValue(src.getValue()); - } + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_10_30.convertType(src.getValueElement())); return tgt; } @@ -137,15 +137,13 @@ public class ImmunizationRecommendation10_30 { if (src.hasDoseSequence()) { tgt.setDoseSequence(src.getDoseSequence()); } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getDescriptionElement())); if (src.hasAuthority()) { tgt.setAuthority(VersionConvertor_10_30.convertReference(src.getAuthority())); } - if (src.hasSeries()) { - tgt.setSeries(src.getSeries()); - } + if (src.hasSeriesElement()) + tgt.setSeriesElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getSeriesElement())); return tgt; } @@ -157,15 +155,13 @@ public class ImmunizationRecommendation10_30 { if (src.hasDoseSequence()) { tgt.setDoseSequence(src.getDoseSequence()); } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getDescriptionElement())); if (src.hasAuthority()) { tgt.setAuthority(VersionConvertor_10_30.convertReference(src.getAuthority())); } - if (src.hasSeries()) { - tgt.setSeries(src.getSeries()); - } + if (src.hasSeriesElement()) + tgt.setSeriesElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getSeriesElement())); return tgt; } } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/ImplementationGuide10_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/ImplementationGuide10_30.java index df04a482b..20795eb4a 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/ImplementationGuide10_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/ImplementationGuide10_30.java @@ -1,7 +1,10 @@ package org.hl7.fhir.convertors.conv10_30; import org.hl7.fhir.convertors.VersionConvertor_10_30; +import org.hl7.fhir.dstu3.model.BooleanType; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; +import java.util.stream.Collectors; public class ImplementationGuide10_30 { @@ -86,41 +89,34 @@ public class ImplementationGuide10_30 { return null; org.hl7.fhir.dstu3.model.ImplementationGuide tgt = new org.hl7.fhir.dstu3.model.ImplementationGuide(); VersionConvertor_10_30.copyDomainResource(src, tgt); - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } - if (src.hasVersion()) { - tgt.setVersion(src.getVersion()); - } - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_10_30.convertType(src.getUrlElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_10_30.convertConformanceResourceStatus(src.getStatus())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasPublisher()) { - tgt.setPublisher(src.getPublisher()); - } + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((BooleanType) VersionConvertor_10_30.convertType(src.getExperimentalElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuideContactComponent t : src.getContact()) tgt.addContact(convertImplementationGuideContactComponent(t)); } - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_10_30.convertType(src.getDateElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_10_30.convertType(src.getDescriptionElement())); for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getUseContext()) if (VersionConvertor_10_30.isJurisdiction(t)) tgt.addJurisdiction(VersionConvertor_10_30.convertCodeableConcept(t)); else tgt.addUseContext(VersionConvertor_10_30.convertCodeableConceptToUsageContext(t)); - if (src.hasCopyright()) { - tgt.setCopyright(src.getCopyright()); - } - if (src.hasFhirVersion()) { - tgt.setFhirVersion(src.getFhirVersion()); - } + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_10_30.convertType(src.getCopyrightElement())); + if (src.hasFhirVersionElement()) + tgt.setFhirVersionElement((org.hl7.fhir.dstu3.model.IdType) VersionConvertor_10_30.convertType(src.getFhirVersionElement())); if (src.hasDependency()) { for (org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuideDependencyComponent t : src.getDependency()) tgt.addDependency(convertImplementationGuideDependencyComponent(t)); } @@ -131,7 +127,9 @@ public class ImplementationGuide10_30 { for (org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuideGlobalComponent t : src.getGlobal()) tgt.addGlobal(convertImplementationGuideGlobalComponent(t)); } if (src.hasBinary()) { - for (org.hl7.fhir.dstu2.model.UriType t : src.getBinary()) tgt.addBinary(t.getValue()); + tgt.setBinary(src.getBinary().stream() + .map(binary -> (org.hl7.fhir.dstu3.model.UriType) VersionConvertor_10_30.convertType(binary)) + .collect(Collectors.toList())); } if (src.hasPage()) { tgt.setPage(convertImplementationGuidePageComponent(src.getPage())); @@ -144,42 +142,35 @@ public class ImplementationGuide10_30 { return null; org.hl7.fhir.dstu2.model.ImplementationGuide tgt = new org.hl7.fhir.dstu2.model.ImplementationGuide(); VersionConvertor_10_30.copyDomainResource(src, tgt); - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } - if (src.hasVersion()) { - tgt.setVersion(src.getVersion()); - } - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_30.convertType(src.getUrlElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_10_30.convertConformanceResourceStatus(src.getStatus())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasPublisher()) { - tgt.setPublisher(src.getPublisher()); - } + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_30.convertType(src.getExperimentalElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) tgt.addContact(convertImplementationGuideContactComponent(t)); } - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_30.convertType(src.getDateElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getDescriptionElement())); for (org.hl7.fhir.dstu3.model.UsageContext t : src.getUseContext()) if (t.hasValueCodeableConcept()) tgt.addUseContext(VersionConvertor_10_30.convertCodeableConcept(t.getValueCodeableConcept())); if (src.hasJurisdiction()) { for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getJurisdiction()) tgt.addUseContext(VersionConvertor_10_30.convertCodeableConcept(t)); } - if (src.hasCopyright()) { - tgt.setCopyright(src.getCopyright()); - } - if (src.hasFhirVersion()) { - tgt.setFhirVersion(src.getFhirVersion()); - } + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getCopyrightElement())); + if (src.hasFhirVersionElement()) + tgt.setFhirVersionElement((org.hl7.fhir.dstu2.model.IdType) VersionConvertor_10_30.convertType(src.getFhirVersionElement())); if (src.hasDependency()) { for (org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuideDependencyComponent t : src.getDependency()) tgt.addDependency(convertImplementationGuideDependencyComponent(t)); } @@ -203,9 +194,8 @@ public class ImplementationGuide10_30 { return null; org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuideContactComponent tgt = new org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuideContactComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu3.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_30.convertContactPoint(t)); } @@ -217,9 +207,8 @@ public class ImplementationGuide10_30 { return null; org.hl7.fhir.dstu3.model.ContactDetail tgt = new org.hl7.fhir.dstu3.model.ContactDetail(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_30.convertContactPoint(t)); } @@ -234,9 +223,8 @@ public class ImplementationGuide10_30 { if (src.hasType()) { tgt.setType(convertGuideDependencyType(src.getType())); } - if (src.hasUri()) { - tgt.setUri(src.getUri()); - } + if (src.hasUriElement()) + tgt.setUriElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_30.convertType(src.getUriElement())); return tgt; } @@ -248,9 +236,8 @@ public class ImplementationGuide10_30 { if (src.hasType()) { tgt.setType(convertGuideDependencyType(src.getType())); } - if (src.hasUri()) { - tgt.setUri(src.getUri()); - } + if (src.hasUriElement()) + tgt.setUriElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_10_30.convertType(src.getUriElement())); return tgt; } @@ -259,9 +246,8 @@ public class ImplementationGuide10_30 { return null; org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuideGlobalComponent tgt = new org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuideGlobalComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasType()) { - tgt.setType(src.getType()); - } + if (src.hasTypeElement()) + tgt.setTypeElement((org.hl7.fhir.dstu2.model.CodeType) VersionConvertor_10_30.convertType(src.getTypeElement())); if (src.hasProfile()) { tgt.setProfile(VersionConvertor_10_30.convertReference(src.getProfile())); } @@ -273,9 +259,8 @@ public class ImplementationGuide10_30 { return null; org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuideGlobalComponent tgt = new org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuideGlobalComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasType()) { - tgt.setType(src.getType()); - } + if (src.hasTypeElement()) + tgt.setTypeElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_10_30.convertType(src.getTypeElement())); if (src.hasProfile()) { tgt.setProfile(VersionConvertor_10_30.convertReference(src.getProfile())); } @@ -287,12 +272,10 @@ public class ImplementationGuide10_30 { return null; org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuidePackageComponent tgt = new org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuidePackageComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getNameElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getDescriptionElement())); if (src.hasResource()) { for (org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuidePackageResourceComponent t : src.getResource()) tgt.addResource(convertImplementationGuidePackageResourceComponent(t)); } @@ -304,12 +287,10 @@ public class ImplementationGuide10_30 { return null; org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuidePackageComponent tgt = new org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuidePackageComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getNameElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getDescriptionElement())); if (src.hasResource()) { for (org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuidePackageResourceComponent t : src.getResource()) tgt.addResource(convertImplementationGuidePackageResourceComponent(t)); } @@ -324,15 +305,12 @@ public class ImplementationGuide10_30 { if (src.hasPurpose()) { tgt.setExample(src.getPurpose() == org.hl7.fhir.dstu2.model.ImplementationGuide.GuideResourcePurpose.EXAMPLE); } - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } - if (src.hasAcronym()) { - tgt.setAcronym(src.getAcronym()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getNameElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getDescriptionElement())); + if (src.hasAcronymElement()) + tgt.setAcronymElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getAcronymElement())); if (src.hasSource()) { tgt.setSource(VersionConvertor_10_30.convertType(src.getSource())); } @@ -351,15 +329,12 @@ public class ImplementationGuide10_30 { tgt.setPurpose(org.hl7.fhir.dstu2.model.ImplementationGuide.GuideResourcePurpose.EXAMPLE); else tgt.setPurpose(org.hl7.fhir.dstu2.model.ImplementationGuide.GuideResourcePurpose.PROFILE); - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } - if (src.hasAcronym()) { - tgt.setAcronym(src.getAcronym()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getNameElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getDescriptionElement())); + if (src.hasAcronymElement()) + tgt.setAcronymElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getAcronymElement())); if (src.hasSource()) { tgt.setSource(VersionConvertor_10_30.convertType(src.getSource())); } @@ -374,9 +349,8 @@ public class ImplementationGuide10_30 { return null; org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuidePageComponent tgt = new org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuidePageComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasSource()) { - tgt.setSource(src.getSource()); - } + if (src.hasSourceElement()) + tgt.setSourceElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_30.convertType(src.getSourceElement())); if (src.hasTitle()) { tgt.setName(src.getTitle()); } @@ -389,9 +363,8 @@ public class ImplementationGuide10_30 { if (src.hasPackage()) { for (org.hl7.fhir.dstu3.model.StringType t : src.getPackage()) tgt.addPackage(t.getValue()); } - if (src.hasFormat()) { - tgt.setFormat(src.getFormat()); - } + if (src.hasFormatElement()) + tgt.setFormatElement((org.hl7.fhir.dstu2.model.CodeType) VersionConvertor_10_30.convertType(src.getFormatElement())); if (src.hasPage()) { for (org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuidePageComponent t : src.getPage()) tgt.addPage(convertImplementationGuidePageComponent(t)); } @@ -403,9 +376,8 @@ public class ImplementationGuide10_30 { return null; org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuidePageComponent tgt = new org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuidePageComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasSource()) { - tgt.setSource(src.getSource()); - } + if (src.hasSourceElement()) + tgt.setSourceElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_10_30.convertType(src.getSourceElement())); if (src.hasName()) { tgt.setTitle(src.getName()); } @@ -418,9 +390,8 @@ public class ImplementationGuide10_30 { if (src.hasPackage()) { for (org.hl7.fhir.dstu2.model.StringType t : src.getPackage()) tgt.addPackage(t.getValue()); } - if (src.hasFormat()) { - tgt.setFormat(src.getFormat()); - } + if (src.hasFormatElement()) + tgt.setFormatElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_10_30.convertType(src.getFormatElement())); if (src.hasPage()) { for (org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuidePageComponent t : src.getPage()) tgt.addPage(convertImplementationGuidePageComponent(t)); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/List10_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/List10_30.java index 5e315b227..44c577abc 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/List10_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/List10_30.java @@ -1,7 +1,10 @@ package org.hl7.fhir.convertors.conv10_30; import org.hl7.fhir.convertors.VersionConvertor_10_30; +import org.hl7.fhir.dstu2.model.DateTimeType; +import org.hl7.fhir.dstu3.model.BooleanType; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class List10_30 { @@ -31,8 +34,8 @@ public class List10_30 { if (src.hasStatus()) { tgt.setStatus(convertListStatus(src.getStatus())); } - if (src.hasDate()) - tgt.setDate(src.getDate()); + if (src.hasDateElement()) + tgt.setDateElement((DateTimeType) VersionConvertor_10_30.convertType(src.getDateElement())); if (src.hasOrderedBy()) { tgt.setOrderedBy(VersionConvertor_10_30.convertCodeableConcept(src.getOrderedBy())); } @@ -74,8 +77,8 @@ public class List10_30 { if (src.hasStatus()) { tgt.setStatus(convertListStatus(src.getStatus())); } - if (src.hasDate()) - tgt.setDate(src.getDate()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_10_30.convertType(src.getDateElement())); if (src.hasOrderedBy()) { tgt.setOrderedBy(VersionConvertor_10_30.convertCodeableConcept(src.getOrderedBy())); } @@ -98,11 +101,11 @@ public class List10_30 { if (src.hasFlag()) { tgt.setFlag(VersionConvertor_10_30.convertCodeableConcept(src.getFlag())); } - if (src.hasDeleted()) { - tgt.setDeleted(src.getDeleted()); + if (src.hasDeletedElement()) { + tgt.setDeletedElement((BooleanType) VersionConvertor_10_30.convertType(src.getDeletedElement())); } - if (src.hasDate()) - tgt.setDate(src.getDate()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_10_30.convertType(src.getDateElement())); if (src.hasItem()) { tgt.setItem(VersionConvertor_10_30.convertReference(src.getItem())); } @@ -117,11 +120,11 @@ public class List10_30 { if (src.hasFlag()) { tgt.setFlag(VersionConvertor_10_30.convertCodeableConcept(src.getFlag())); } - if (src.hasDeleted()) { - tgt.setDeleted(src.getDeleted()); + if (src.hasDeletedElement()) { + tgt.setDeletedElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_30.convertType(src.getDeletedElement())); } - if (src.hasDate()) - tgt.setDate(src.getDate()); + if (src.hasDateElement()) + tgt.setDateElement((DateTimeType) VersionConvertor_10_30.convertType(src.getDateElement())); if (src.hasItem()) { tgt.setItem(VersionConvertor_10_30.convertReference(src.getItem())); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Location10_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Location10_30.java index a57ec696d..c7aa08b7f 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Location10_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Location10_30.java @@ -1,7 +1,9 @@ package org.hl7.fhir.convertors.conv10_30; import org.hl7.fhir.convertors.VersionConvertor_10_30; +import org.hl7.fhir.dstu3.model.DecimalType; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Location10_30 { @@ -16,12 +18,10 @@ public class Location10_30 { if (src.hasStatus()) { tgt.setStatus(convertLocationStatus(src.getStatus())); } - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getNameElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getDescriptionElement())); if (src.hasMode()) { tgt.setMode(convertLocationMode(src.getMode())); } @@ -60,12 +60,10 @@ public class Location10_30 { if (src.hasStatus()) { tgt.setStatus(convertLocationStatus(src.getStatus())); } - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getNameElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getDescriptionElement())); if (src.hasMode()) { tgt.setMode(convertLocationMode(src.getMode())); } @@ -124,14 +122,14 @@ public class Location10_30 { return null; org.hl7.fhir.dstu3.model.Location.LocationPositionComponent tgt = new org.hl7.fhir.dstu3.model.Location.LocationPositionComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasLongitude()) { - tgt.setLongitude(src.getLongitude()); + if (src.hasLongitudeElement()) { + tgt.setLongitudeElement((DecimalType) VersionConvertor_10_30.convertType(src.getLongitudeElement())); } - if (src.hasLatitude()) { - tgt.setLatitude(src.getLatitude()); + if (src.hasLatitudeElement()) { + tgt.setLatitudeElement((DecimalType) VersionConvertor_10_30.convertType(src.getLatitudeElement())); } - if (src.hasAltitude()) { - tgt.setAltitude(src.getAltitude()); + if (src.hasAltitudeElement()) { + tgt.setAltitudeElement((DecimalType) VersionConvertor_10_30.convertType(src.getAltitudeElement())); } return tgt; } @@ -141,14 +139,14 @@ public class Location10_30 { return null; org.hl7.fhir.dstu2.model.Location.LocationPositionComponent tgt = new org.hl7.fhir.dstu2.model.Location.LocationPositionComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasLongitude()) { - tgt.setLongitude(src.getLongitude()); + if (src.hasLongitudeElement()) { + tgt.setLongitudeElement((org.hl7.fhir.dstu2.model.DecimalType) VersionConvertor_10_30.convertType(src.getLongitudeElement())); } - if (src.hasLatitude()) { - tgt.setLatitude(src.getLatitude()); + if (src.hasLatitudeElement()) { + tgt.setLatitudeElement((org.hl7.fhir.dstu2.model.DecimalType) VersionConvertor_10_30.convertType(src.getLatitudeElement())); } - if (src.hasAltitude()) { - tgt.setAltitude(src.getAltitude()); + if (src.hasAltitudeElement()) { + tgt.setAltitudeElement((org.hl7.fhir.dstu2.model.DecimalType) VersionConvertor_10_30.convertType(src.getAltitudeElement())); } return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Media10_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Media10_30.java index 901a5d741..a78cff347 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Media10_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Media10_30.java @@ -1,7 +1,10 @@ package org.hl7.fhir.convertors.conv10_30; import org.hl7.fhir.convertors.VersionConvertor_10_30; +import org.hl7.fhir.dstu2.model.PositiveIntType; +import org.hl7.fhir.dstu2.model.UnsignedIntType; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Media10_30 { @@ -61,17 +64,17 @@ public class Media10_30 { if (src.hasDevice()) { tgt.setDeviceName(src.getDevice().getDisplay()); } - if (src.hasHeight()) { - tgt.setHeight(src.getHeight()); + if (src.hasHeightElement()) { + tgt.setHeightElement((PositiveIntType) VersionConvertor_10_30.convertType(src.getHeightElement())); } - if (src.hasWidth()) { - tgt.setWidth(src.getWidth()); + if (src.hasWidthElement()) { + tgt.setWidthElement((PositiveIntType) VersionConvertor_10_30.convertType(src.getWidthElement())); } - if (src.hasFrames()) { - tgt.setFrames(src.getFrames()); + if (src.hasFramesElement()) { + tgt.setFramesElement((PositiveIntType) VersionConvertor_10_30.convertType(src.getFramesElement())); } - if (src.hasDuration()) { - tgt.setDuration(src.getDuration()); + if (src.hasDurationElement()) { + tgt.setDurationElement((UnsignedIntType) VersionConvertor_10_30.convertType(src.getDurationElement())); } if (src.hasContent()) { tgt.setContent(VersionConvertor_10_30.convertAttachment(src.getContent())); @@ -105,17 +108,17 @@ public class Media10_30 { if (src.hasDeviceName()) { tgt.getDevice().setDisplay(src.getDeviceName()); } - if (src.hasHeight()) { - tgt.setHeight(src.getHeight()); + if (src.hasHeightElement()) { + tgt.setHeightElement((org.hl7.fhir.dstu3.model.PositiveIntType) VersionConvertor_10_30.convertType(src.getHeightElement())); } - if (src.hasWidth()) { - tgt.setWidth(src.getWidth()); + if (src.hasWidthElement()) { + tgt.setWidthElement((org.hl7.fhir.dstu3.model.PositiveIntType) VersionConvertor_10_30.convertType(src.getWidthElement())); } - if (src.hasFrames()) { - tgt.setFrames(src.getFrames()); + if (src.hasFramesElement()) { + tgt.setFramesElement((org.hl7.fhir.dstu3.model.PositiveIntType) VersionConvertor_10_30.convertType(src.getFramesElement())); } - if (src.hasDuration()) { - tgt.setDuration(src.getDuration()); + if (src.hasDurationElement()) { + tgt.setDurationElement((org.hl7.fhir.dstu3.model.UnsignedIntType) VersionConvertor_10_30.convertType(src.getDurationElement())); } if (src.hasContent()) { tgt.setContent(VersionConvertor_10_30.convertAttachment(src.getContent())); diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Medication10_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Medication10_30.java index f5a89b295..ec06a2498 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Medication10_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Medication10_30.java @@ -1,7 +1,9 @@ package org.hl7.fhir.convertors.conv10_30; import org.hl7.fhir.convertors.VersionConvertor_10_30; +import org.hl7.fhir.dstu2.model.BooleanType; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Medication10_30 { @@ -13,8 +15,8 @@ public class Medication10_30 { if (src.hasCode()) { tgt.setCode(VersionConvertor_10_30.convertCodeableConcept(src.getCode())); } - if (src.hasIsBrand()) { - tgt.setIsBrand(src.getIsBrand()); + if (src.hasIsBrandElement()) { + tgt.setIsBrandElement((BooleanType) VersionConvertor_10_30.convertType(src.getIsBrandElement())); } if (src.hasManufacturer()) { tgt.setManufacturer(VersionConvertor_10_30.convertReference(src.getManufacturer())); @@ -33,8 +35,8 @@ public class Medication10_30 { if (src.hasCode()) { tgt.setCode(VersionConvertor_10_30.convertCodeableConcept(src.getCode())); } - if (src.hasIsBrand()) { - tgt.setIsBrand(src.getIsBrand()); + if (src.hasIsBrandElement()) { + tgt.setIsBrandElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_10_30.convertType(src.getIsBrandElement())); } if (src.hasManufacturer()) { tgt.setManufacturer(VersionConvertor_10_30.convertReference(src.getManufacturer())); diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/MedicationDispense10_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/MedicationDispense10_30.java index ab2cda095..bbe4cac50 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/MedicationDispense10_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/MedicationDispense10_30.java @@ -3,6 +3,7 @@ package org.hl7.fhir.convertors.conv10_30; import org.hl7.fhir.convertors.VersionConvertor_10_30; import org.hl7.fhir.dstu3.model.Dosage; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class MedicationDispense10_30 { @@ -35,20 +36,18 @@ public class MedicationDispense10_30 { if (src.hasDaysSupply()) { tgt.setDaysSupply(VersionConvertor_10_30.convertSimpleQuantity(src.getDaysSupply())); } - if (src.hasWhenPrepared()) { - tgt.setWhenPrepared(src.getWhenPrepared()); - } - if (src.hasWhenHandedOver()) { - tgt.setWhenHandedOver(src.getWhenHandedOver()); - } + if (src.hasWhenPreparedElement()) + tgt.setWhenPreparedElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_10_30.convertType(src.getWhenPreparedElement())); + if (src.hasWhenHandedOverElement()) + tgt.setWhenHandedOverElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_10_30.convertType(src.getWhenHandedOverElement())); if (src.hasDestination()) { tgt.setDestination(VersionConvertor_10_30.convertReference(src.getDestination())); } if (src.hasReceiver()) { for (org.hl7.fhir.dstu2.model.Reference t : src.getReceiver()) tgt.addReceiver(VersionConvertor_10_30.convertReference(t)); } - if (src.hasNote()) - tgt.addNote().setText(src.getNote()); + if (src.hasNoteElement()) + tgt.setNote(Collections.singletonList((org.hl7.fhir.dstu3.model.Annotation) VersionConvertor_10_30.convertType(src.getNoteElement()))); if (src.hasDosageInstruction()) { for (org.hl7.fhir.dstu2.model.MedicationDispense.MedicationDispenseDosageInstructionComponent t : src.getDosageInstruction()) tgt.addDosageInstruction(convertMedicationDispenseDosageInstructionComponent(t)); } @@ -87,12 +86,10 @@ public class MedicationDispense10_30 { if (src.hasDaysSupply()) { tgt.setDaysSupply(VersionConvertor_10_30.convertSimpleQuantity(src.getDaysSupply())); } - if (src.hasWhenPrepared()) { - tgt.setWhenPrepared(src.getWhenPrepared()); - } - if (src.hasWhenHandedOver()) { - tgt.setWhenHandedOver(src.getWhenHandedOver()); - } + if (src.hasWhenPreparedElement()) + tgt.setWhenPreparedElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_30.convertType(src.getWhenPreparedElement())); + if (src.hasWhenHandedOverElement()) + tgt.setWhenHandedOverElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_30.convertType(src.getWhenHandedOverElement())); if (src.hasDestination()) { tgt.setDestination(VersionConvertor_10_30.convertReference(src.getDestination())); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/MedicationStatement10_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/MedicationStatement10_30.java index 8776ed443..6269f1345 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/MedicationStatement10_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/MedicationStatement10_30.java @@ -1,7 +1,9 @@ package org.hl7.fhir.convertors.conv10_30; import org.hl7.fhir.convertors.VersionConvertor_10_30; +import org.hl7.fhir.dstu3.model.StringType; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class MedicationStatement10_30 { @@ -31,13 +33,13 @@ public class MedicationStatement10_30 { if (src.hasSupportingInformation()) { for (org.hl7.fhir.dstu2.model.Reference t : src.getSupportingInformation()) tgt.addDerivedFrom(VersionConvertor_10_30.convertReference(t)); } - if (src.hasDateAsserted()) - tgt.setDateAsserted(src.getDateAsserted()); + if (src.hasDateAssertedElement()) + tgt.setDateAssertedElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_10_30.convertType(src.getDateAssertedElement())); if (src.hasReasonNotTaken()) { for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getReasonNotTaken()) tgt.addReasonNotTaken(VersionConvertor_10_30.convertCodeableConcept(t)); } - if (src.hasNote()) - tgt.addNote().setText(src.getNote()); + if (src.hasNoteElement()) + tgt.setNote(Collections.singletonList((org.hl7.fhir.dstu3.model.Annotation) VersionConvertor_10_30.convertType(src.getNoteElement()))); if (src.hasDosage()) { for (org.hl7.fhir.dstu2.model.MedicationStatement.MedicationStatementDosageComponent t : src.getDosage()) tgt.addDosage(convertMedicationStatementDosageComponent(t)); } @@ -70,8 +72,8 @@ public class MedicationStatement10_30 { if (src.hasDerivedFrom()) { for (org.hl7.fhir.dstu3.model.Reference t : src.getDerivedFrom()) tgt.addSupportingInformation(VersionConvertor_10_30.convertReference(t)); } - if (src.hasDateAsserted()) - tgt.setDateAsserted(src.getDateAsserted()); + if (src.hasDateAssertedElement()) + tgt.setDateAssertedElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_30.convertType(src.getDateAssertedElement())); if (src.hasReasonNotTaken()) { for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getReasonNotTaken()) tgt.addReasonNotTaken(VersionConvertor_10_30.convertCodeableConcept(t)); } @@ -89,8 +91,8 @@ public class MedicationStatement10_30 { return null; org.hl7.fhir.dstu3.model.Dosage tgt = new org.hl7.fhir.dstu3.model.Dosage(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasText()) { - tgt.setText(src.getText()); + if (src.hasTextElement()) { + tgt.setTextElement((StringType) VersionConvertor_10_30.convertType(src.getTextElement())); } if (src.hasTiming()) { tgt.setTiming(VersionConvertor_10_30.convertTiming(src.getTiming())); @@ -120,8 +122,8 @@ public class MedicationStatement10_30 { return null; org.hl7.fhir.dstu2.model.MedicationStatement.MedicationStatementDosageComponent tgt = new org.hl7.fhir.dstu2.model.MedicationStatement.MedicationStatementDosageComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasText()) { - tgt.setText(src.getText()); + if (src.hasTextElement()) { + tgt.setTextElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getTextElement())); } if (src.hasTiming()) { tgt.setTiming(VersionConvertor_10_30.convertTiming(src.getTiming())); diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/MessageHeader10_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/MessageHeader10_30.java index 77ee37f57..8caf888ff 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/MessageHeader10_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/MessageHeader10_30.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_30; import org.hl7.fhir.convertors.VersionConvertor_10_30; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class MessageHeader10_30 { @@ -10,15 +11,13 @@ public class MessageHeader10_30 { return null; org.hl7.fhir.dstu3.model.MessageHeader.MessageDestinationComponent tgt = new org.hl7.fhir.dstu3.model.MessageHeader.MessageDestinationComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getNameElement())); if (src.hasTarget()) { tgt.setTarget(VersionConvertor_10_30.convertReference(src.getTarget())); } - if (src.hasEndpoint()) { - tgt.setEndpoint(src.getEndpoint()); - } + if (src.hasEndpointElement()) + tgt.setEndpointElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_10_30.convertType(src.getEndpointElement())); return tgt; } @@ -27,15 +26,13 @@ public class MessageHeader10_30 { return null; org.hl7.fhir.dstu2.model.MessageHeader.MessageDestinationComponent tgt = new org.hl7.fhir.dstu2.model.MessageHeader.MessageDestinationComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getNameElement())); if (src.hasTarget()) { tgt.setTarget(VersionConvertor_10_30.convertReference(src.getTarget())); } - if (src.hasEndpoint()) { - tgt.setEndpoint(src.getEndpoint()); - } + if (src.hasEndpointElement()) + tgt.setEndpointElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_30.convertType(src.getEndpointElement())); return tgt; } @@ -44,9 +41,8 @@ public class MessageHeader10_30 { return null; org.hl7.fhir.dstu2.model.MessageHeader tgt = new org.hl7.fhir.dstu2.model.MessageHeader(); VersionConvertor_10_30.copyDomainResource(src, tgt); - if (src.hasTimestamp()) { - tgt.setTimestamp(src.getTimestamp()); - } + if (src.hasTimestampElement()) + tgt.setTimestampElement((org.hl7.fhir.dstu2.model.InstantType) VersionConvertor_10_30.convertType(src.getTimestampElement())); if (src.hasEvent()) { tgt.setEvent(VersionConvertor_10_30.convertCoding(src.getEvent())); } @@ -85,9 +81,8 @@ public class MessageHeader10_30 { return null; org.hl7.fhir.dstu3.model.MessageHeader tgt = new org.hl7.fhir.dstu3.model.MessageHeader(); VersionConvertor_10_30.copyDomainResource(src, tgt); - if (src.hasTimestamp()) { - tgt.setTimestamp(src.getTimestamp()); - } + if (src.hasTimestampElement()) + tgt.setTimestampElement((org.hl7.fhir.dstu3.model.InstantType) VersionConvertor_10_30.convertType(src.getTimestampElement())); if (src.hasEvent()) { tgt.setEvent(VersionConvertor_10_30.convertCoding(src.getEvent())); } @@ -126,9 +121,8 @@ public class MessageHeader10_30 { return null; org.hl7.fhir.dstu2.model.MessageHeader.MessageHeaderResponseComponent tgt = new org.hl7.fhir.dstu2.model.MessageHeader.MessageHeaderResponseComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasIdentifier()) { - tgt.setIdentifier(src.getIdentifier()); - } + if (src.hasIdentifierElement()) + tgt.setIdentifierElement((org.hl7.fhir.dstu2.model.IdType) VersionConvertor_10_30.convertType(src.getIdentifierElement())); if (src.hasCode()) { tgt.setCode(convertResponseType(src.getCode())); } @@ -143,9 +137,8 @@ public class MessageHeader10_30 { return null; org.hl7.fhir.dstu3.model.MessageHeader.MessageHeaderResponseComponent tgt = new org.hl7.fhir.dstu3.model.MessageHeader.MessageHeaderResponseComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasIdentifier()) { - tgt.setIdentifier(src.getIdentifier()); - } + if (src.hasIdentifierElement()) + tgt.setIdentifierElement((org.hl7.fhir.dstu3.model.IdType) VersionConvertor_10_30.convertType(src.getIdentifierElement())); if (src.hasCode()) { tgt.setCode(convertResponseType(src.getCode())); } @@ -160,21 +153,17 @@ public class MessageHeader10_30 { return null; org.hl7.fhir.dstu3.model.MessageHeader.MessageSourceComponent tgt = new org.hl7.fhir.dstu3.model.MessageHeader.MessageSourceComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasSoftware()) { - tgt.setSoftware(src.getSoftware()); - } - if (src.hasVersion()) { - tgt.setVersion(src.getVersion()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getNameElement())); + if (src.hasSoftwareElement()) + tgt.setSoftwareElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getSoftwareElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getVersionElement())); if (src.hasContact()) { tgt.setContact(VersionConvertor_10_30.convertContactPoint(src.getContact())); } - if (src.hasEndpoint()) { - tgt.setEndpoint(src.getEndpoint()); - } + if (src.hasEndpointElement()) + tgt.setEndpointElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_10_30.convertType(src.getEndpointElement())); return tgt; } @@ -183,21 +172,17 @@ public class MessageHeader10_30 { return null; org.hl7.fhir.dstu2.model.MessageHeader.MessageSourceComponent tgt = new org.hl7.fhir.dstu2.model.MessageHeader.MessageSourceComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasSoftware()) { - tgt.setSoftware(src.getSoftware()); - } - if (src.hasVersion()) { - tgt.setVersion(src.getVersion()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getNameElement())); + if (src.hasSoftwareElement()) + tgt.setSoftwareElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getSoftwareElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getVersionElement())); if (src.hasContact()) { tgt.setContact(VersionConvertor_10_30.convertContactPoint(src.getContact())); } - if (src.hasEndpoint()) { - tgt.setEndpoint(src.getEndpoint()); - } + if (src.hasEndpointElement()) + tgt.setEndpointElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_30.convertType(src.getEndpointElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/NamingSystem10_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/NamingSystem10_30.java index ec8191ac3..67a860593 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/NamingSystem10_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/NamingSystem10_30.java @@ -1,7 +1,9 @@ package org.hl7.fhir.convertors.conv10_30; import org.hl7.fhir.convertors.VersionConvertor_10_30; +import org.hl7.fhir.dstu3.model.BooleanType; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class NamingSystem10_30 { @@ -10,39 +12,34 @@ public class NamingSystem10_30 { return null; org.hl7.fhir.dstu3.model.NamingSystem tgt = new org.hl7.fhir.dstu3.model.NamingSystem(); VersionConvertor_10_30.copyDomainResource(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_10_30.convertConformanceResourceStatus(src.getStatus())); } if (src.hasKind()) { tgt.setKind(convertNamingSystemType(src.getKind())); } - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) { - tgt.setPublisher(src.getPublisher()); - } + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_10_30.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu2.model.NamingSystem.NamingSystemContactComponent t : src.getContact()) tgt.addContact(convertNamingSystemContactComponent(t)); } - if (src.hasResponsible()) { - tgt.setResponsible(src.getResponsible()); - } + if (src.hasResponsibleElement()) + tgt.setResponsibleElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getResponsibleElement())); if (src.hasType()) { tgt.setType(VersionConvertor_10_30.convertCodeableConcept(src.getType())); } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_10_30.convertType(src.getDescriptionElement())); for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getUseContext()) if (VersionConvertor_10_30.isJurisdiction(t)) tgt.addJurisdiction(VersionConvertor_10_30.convertCodeableConcept(t)); else tgt.addUseContext(VersionConvertor_10_30.convertCodeableConceptToUsageContext(t)); - if (src.hasUsage()) { - tgt.setUsage(src.getUsage()); - } + if (src.hasUsageElement()) + tgt.setUsageElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getUsageElement())); if (src.hasUniqueId()) { for (org.hl7.fhir.dstu2.model.NamingSystem.NamingSystemUniqueIdComponent t : src.getUniqueId()) tgt.addUniqueId(convertNamingSystemUniqueIdComponent(t)); } @@ -57,40 +54,35 @@ public class NamingSystem10_30 { return null; org.hl7.fhir.dstu2.model.NamingSystem tgt = new org.hl7.fhir.dstu2.model.NamingSystem(); VersionConvertor_10_30.copyDomainResource(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_10_30.convertConformanceResourceStatus(src.getStatus())); } if (src.hasKind()) { tgt.setKind(convertNamingSystemType(src.getKind())); } - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) { - tgt.setPublisher(src.getPublisher()); - } + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_30.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) tgt.addContact(convertNamingSystemContactComponent(t)); } - if (src.hasResponsible()) { - tgt.setResponsible(src.getResponsible()); - } + if (src.hasResponsibleElement()) + tgt.setResponsibleElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getResponsibleElement())); if (src.hasType()) { tgt.setType(VersionConvertor_10_30.convertCodeableConcept(src.getType())); } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getDescriptionElement())); for (org.hl7.fhir.dstu3.model.UsageContext t : src.getUseContext()) if (t.hasValueCodeableConcept()) tgt.addUseContext(VersionConvertor_10_30.convertCodeableConcept(t.getValueCodeableConcept())); if (src.hasJurisdiction()) { for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getJurisdiction()) tgt.addUseContext(VersionConvertor_10_30.convertCodeableConcept(t)); } - if (src.hasUsage()) { - tgt.setUsage(src.getUsage()); - } + if (src.hasUsageElement()) + tgt.setUsageElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getUsageElement())); if (src.hasUniqueId()) { for (org.hl7.fhir.dstu3.model.NamingSystem.NamingSystemUniqueIdComponent t : src.getUniqueId()) tgt.addUniqueId(convertNamingSystemUniqueIdComponent(t)); } @@ -105,9 +97,8 @@ public class NamingSystem10_30 { return null; org.hl7.fhir.dstu2.model.NamingSystem.NamingSystemContactComponent tgt = new org.hl7.fhir.dstu2.model.NamingSystem.NamingSystemContactComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu3.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_30.convertContactPoint(t)); } @@ -119,9 +110,8 @@ public class NamingSystem10_30 { return null; org.hl7.fhir.dstu3.model.ContactDetail tgt = new org.hl7.fhir.dstu3.model.ContactDetail(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_30.convertContactPoint(t)); } @@ -200,11 +190,10 @@ public class NamingSystem10_30 { if (src.hasType()) { tgt.setType(convertNamingSystemIdentifierType(src.getType())); } - if (src.hasValue()) { - tgt.setValue(src.getValue()); - } - if (src.hasPreferred()) { - tgt.setPreferred(src.getPreferred()); + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getValueElement())); + if (src.hasPreferredElement()) { + tgt.setPreferredElement((BooleanType) VersionConvertor_10_30.convertType(src.getPreferredElement())); } if (src.hasPeriod()) { tgt.setPeriod(VersionConvertor_10_30.convertPeriod(src.getPeriod())); @@ -220,11 +209,10 @@ public class NamingSystem10_30 { if (src.hasType()) { tgt.setType(convertNamingSystemIdentifierType(src.getType())); } - if (src.hasValue()) { - tgt.setValue(src.getValue()); - } - if (src.hasPreferred()) { - tgt.setPreferred(src.getPreferred()); + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getValueElement())); + if (src.hasPreferredElement()) { + tgt.setPreferredElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_30.convertType(src.getPreferredElement())); } if (src.hasPeriod()) { tgt.setPeriod(VersionConvertor_10_30.convertPeriod(src.getPeriod())); diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Observation10_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Observation10_30.java index de472505e..5e0f51acc 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Observation10_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Observation10_30.java @@ -1,7 +1,9 @@ package org.hl7.fhir.convertors.conv10_30; import org.hl7.fhir.convertors.VersionConvertor_10_30; +import org.hl7.fhir.dstu3.model.StringType; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Observation10_30 { @@ -31,9 +33,8 @@ public class Observation10_30 { if (src.hasEffective()) { tgt.setEffective(VersionConvertor_10_30.convertType(src.getEffective())); } - if (src.hasIssued()) { - tgt.setIssued(src.getIssued()); - } + if (src.hasIssuedElement()) + tgt.setIssuedElement((org.hl7.fhir.dstu3.model.InstantType) VersionConvertor_10_30.convertType(src.getIssuedElement())); if (src.hasPerformer()) { for (org.hl7.fhir.dstu2.model.Reference t : src.getPerformer()) tgt.addPerformer(VersionConvertor_10_30.convertReference(t)); } @@ -46,8 +47,8 @@ public class Observation10_30 { if (src.hasInterpretation()) { tgt.setInterpretation(VersionConvertor_10_30.convertCodeableConcept(src.getInterpretation())); } - if (src.hasComments()) { - tgt.setComment(src.getComments()); + if (src.hasCommentsElement()) { + tgt.setCommentElement((StringType) VersionConvertor_10_30.convertType(src.getCommentsElement())); } if (src.hasBodySite()) { tgt.setBodySite(VersionConvertor_10_30.convertCodeableConcept(src.getBodySite())); @@ -99,9 +100,8 @@ public class Observation10_30 { if (src.hasEffective()) { tgt.setEffective(VersionConvertor_10_30.convertType(src.getEffective())); } - if (src.hasIssued()) { - tgt.setIssued(src.getIssued()); - } + if (src.hasIssuedElement()) + tgt.setIssuedElement((org.hl7.fhir.dstu2.model.InstantType) VersionConvertor_10_30.convertType(src.getIssuedElement())); if (src.hasPerformer()) { for (org.hl7.fhir.dstu3.model.Reference t : src.getPerformer()) tgt.addPerformer(VersionConvertor_10_30.convertReference(t)); } @@ -114,8 +114,8 @@ public class Observation10_30 { if (src.hasInterpretation()) { tgt.setInterpretation(VersionConvertor_10_30.convertCodeableConcept(src.getInterpretation())); } - if (src.hasComment()) { - tgt.setComments(src.getComment()); + if (src.hasCommentElement()) { + tgt.setCommentsElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getCommentElement())); } if (src.hasBodySite()) { tgt.setBodySite(VersionConvertor_10_30.convertCodeableConcept(src.getBodySite())); @@ -198,9 +198,8 @@ public class Observation10_30 { if (src.hasAge()) { tgt.setAge(VersionConvertor_10_30.convertRange(src.getAge())); } - if (src.hasText()) { - tgt.setText(src.getText()); - } + if (src.hasTextElement()) + tgt.setTextElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getTextElement())); return tgt; } @@ -221,9 +220,8 @@ public class Observation10_30 { if (src.hasAge()) { tgt.setAge(VersionConvertor_10_30.convertRange(src.getAge())); } - if (src.hasText()) { - tgt.setText(src.getText()); - } + if (src.hasTextElement()) + tgt.setTextElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getTextElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/OperationDefinition10_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/OperationDefinition10_30.java index c234ece13..d16abcb72 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/OperationDefinition10_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/OperationDefinition10_30.java @@ -1,9 +1,14 @@ package org.hl7.fhir.convertors.conv10_30; import org.hl7.fhir.convertors.VersionConvertor_10_30; +import org.hl7.fhir.dstu2.model.BooleanType; +import org.hl7.fhir.dstu2.model.IntegerType; +import org.hl7.fhir.dstu2.model.StringType; import org.hl7.fhir.dstu3.model.Enumerations.SearchParamType; +import org.hl7.fhir.dstu3.model.MarkdownType; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.utilities.Utilities; +import java.util.Collections; public class OperationDefinition10_30 { @@ -12,45 +17,39 @@ public class OperationDefinition10_30 { return null; org.hl7.fhir.dstu2.model.OperationDefinition tgt = new org.hl7.fhir.dstu2.model.OperationDefinition(); VersionConvertor_10_30.copyDomainResource(src, tgt); - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } - if (src.hasVersion()) { - tgt.setVersion(src.getVersion()); - } - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_30.convertType(src.getUrlElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_10_30.convertConformanceResourceStatus(src.getStatus())); } if (src.hasKind()) { tgt.setKind(convertOperationKind(src.getKind())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) { - tgt.setPublisher(src.getPublisher()); - } + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((BooleanType) VersionConvertor_10_30.convertType(src.getExperimentalElement())); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_30.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) tgt.addContact(convertOperationDefinitionContactComponent(t)); } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getDescriptionElement())); if (src.hasPurpose()) { tgt.setRequirements(src.getPurpose()); } - if (src.hasIdempotent()) { - tgt.setIdempotent(src.getIdempotent()); + if (src.hasIdempotentElement()) { + tgt.setIdempotentElement((BooleanType) VersionConvertor_10_30.convertType(src.getIdempotentElement())); } - if (src.hasCode()) { - tgt.setCode(src.getCode()); - } - if (src.hasComment()) { - tgt.setNotes(src.getComment()); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu2.model.CodeType) VersionConvertor_10_30.convertType(src.getCodeElement())); + if (src.hasCommentElement()) { + tgt.setNotesElement((StringType) VersionConvertor_10_30.convertType(src.getCommentElement())); } if (src.hasBase()) tgt.setBase(VersionConvertor_10_30.convertReference(src.getBase())); @@ -75,44 +74,38 @@ public class OperationDefinition10_30 { return null; org.hl7.fhir.dstu3.model.OperationDefinition tgt = new org.hl7.fhir.dstu3.model.OperationDefinition(); VersionConvertor_10_30.copyDomainResource(src, tgt); - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } - if (src.hasVersion()) { - tgt.setVersion(src.getVersion()); - } - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_10_30.convertType(src.getUrlElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_10_30.convertConformanceResourceStatus(src.getStatus())); } if (src.hasKind()) { tgt.setKind(convertOperationKind(src.getKind())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) { - tgt.setPublisher(src.getPublisher()); - } + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_10_30.convertType(src.getExperimentalElement())); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_10_30.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu2.model.OperationDefinition.OperationDefinitionContactComponent t : src.getContact()) tgt.addContact(convertOperationDefinitionContactComponent(t)); } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_10_30.convertType(src.getDescriptionElement())); + if (src.hasRequirementsElement()) { + tgt.setPurposeElement((MarkdownType) VersionConvertor_10_30.convertType(src.getRequirementsElement())); } - if (src.hasRequirements()) { - tgt.setPurpose(src.getRequirements()); - } - if (src.hasIdempotent()) - tgt.setIdempotent(src.getIdempotent()); - if (src.hasCode()) { - tgt.setCode(src.getCode()); - } - if (src.hasNotes()) { - tgt.setComment(src.getNotes()); + if (src.hasIdempotentElement()) + tgt.setIdempotentElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_10_30.convertType(src.getIdempotentElement())); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_10_30.convertType(src.getCodeElement())); + if (src.hasNotesElement()) { + tgt.setCommentElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getNotesElement())); } if (src.hasBase()) { tgt.setBase(VersionConvertor_10_30.convertReference(src.getBase())); @@ -138,9 +131,8 @@ public class OperationDefinition10_30 { return null; org.hl7.fhir.dstu2.model.OperationDefinition.OperationDefinitionContactComponent tgt = new org.hl7.fhir.dstu2.model.OperationDefinition.OperationDefinitionContactComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu3.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_30.convertContactPoint(t)); } @@ -152,9 +144,8 @@ public class OperationDefinition10_30 { return null; org.hl7.fhir.dstu3.model.ContactDetail tgt = new org.hl7.fhir.dstu3.model.ContactDetail(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_30.convertContactPoint(t)); } @@ -194,26 +185,20 @@ public class OperationDefinition10_30 { return null; org.hl7.fhir.dstu2.model.OperationDefinition.OperationDefinitionParameterComponent tgt = new org.hl7.fhir.dstu2.model.OperationDefinition.OperationDefinitionParameterComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.CodeType) VersionConvertor_10_30.convertType(src.getNameElement())); if (src.hasUse()) { tgt.setUse(convertOperationParameterUse(src.getUse())); } - if (src.hasMin()) { - tgt.setMin(src.getMin()); - } - if (src.hasMax()) { - tgt.setMax(src.getMax()); - } - if (src.hasDocumentation()) { - tgt.setDocumentation(src.getDocumentation()); - } - if (src.hasSearchType()) { - tgt.setType(src.getSearchType().toCode()); - } else { - tgt.setType(src.getType()); + if (src.hasMinElement()) { + tgt.setMinElement((IntegerType) VersionConvertor_10_30.convertType(src.getMinElement())); } + if (src.hasMaxElement()) + tgt.setMaxElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getMaxElement())); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getDocumentationElement())); + if (src.hasTypeElement()) + tgt.setTypeElement((org.hl7.fhir.dstu2.model.CodeType) VersionConvertor_10_30.convertType(src.getTypeElement())); if (src.hasProfile()) tgt.setProfile(VersionConvertor_10_30.convertReference(src.getProfile())); if (src.hasBinding()) @@ -229,31 +214,20 @@ public class OperationDefinition10_30 { return null; org.hl7.fhir.dstu3.model.OperationDefinition.OperationDefinitionParameterComponent tgt = new org.hl7.fhir.dstu3.model.OperationDefinition.OperationDefinitionParameterComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_10_30.convertType(src.getNameElement())); if (src.hasUse()) { tgt.setUse(convertOperationParameterUse(src.getUse())); } - if (src.hasMin()) { - tgt.setMin(src.getMin()); - } - if (src.hasMax()) { - tgt.setMax(src.getMax()); - } - if (src.hasDocumentation()) { - tgt.setDocumentation(src.getDocumentation()); - } - if (Utilities.existsInList(src.getType(), "token", "reference", "composite", "number", "date", "quantity", "uri")) { - tgt.setType("string"); - if (src.hasType()) { - tgt.setSearchType(SearchParamType.fromCode(src.getType())); - } - } else { - if (src.hasType()) { - tgt.setType(src.getType()); - } + if (src.hasMinElement()) { + tgt.setMinElement((org.hl7.fhir.dstu3.model.IntegerType) VersionConvertor_10_30.convertType(src.getMinElement())); } + if (src.hasMaxElement()) + tgt.setMaxElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getMaxElement())); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getDocumentationElement())); + if (Utilities.existsInList(src.getType(), "token", "reference", "composite", "number", "date", "quantity", "uri")) + tgt.setTypeElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_10_30.convertType(src.getTypeElement())); if (src.hasProfile()) { tgt.setProfile(VersionConvertor_10_30.convertReference(src.getProfile())); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/OperationOutcome10_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/OperationOutcome10_30.java index c5d661e49..68dcf8d0b 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/OperationOutcome10_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/OperationOutcome10_30.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_30; import org.hl7.fhir.convertors.VersionConvertor_10_30; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class OperationOutcome10_30 { @@ -209,9 +210,8 @@ public class OperationOutcome10_30 { if (src.hasDetails()) { tgt.setDetails(VersionConvertor_10_30.convertCodeableConcept(src.getDetails())); } - if (src.hasDiagnostics()) { - tgt.setDiagnostics(src.getDiagnostics()); - } + if (src.hasDiagnosticsElement()) + tgt.setDiagnosticsElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getDiagnosticsElement())); if (src.hasLocation()) { for (org.hl7.fhir.dstu2.model.StringType t : src.getLocation()) tgt.addLocation(t.getValue()); } @@ -232,9 +232,8 @@ public class OperationOutcome10_30 { if (src.hasDetails()) { tgt.setDetails(VersionConvertor_10_30.convertCodeableConcept(src.getDetails())); } - if (src.hasDiagnostics()) { - tgt.setDiagnostics(src.getDiagnostics()); - } + if (src.hasDiagnosticsElement()) + tgt.setDiagnosticsElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getDiagnosticsElement())); if (src.hasLocation()) { for (org.hl7.fhir.dstu3.model.StringType t : src.getLocation()) tgt.addLocation(t.getValue()); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Organization10_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Organization10_30.java index 3c9882804..56f842ce8 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Organization10_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Organization10_30.java @@ -1,7 +1,9 @@ package org.hl7.fhir.convertors.conv10_30; import org.hl7.fhir.convertors.VersionConvertor_10_30; +import org.hl7.fhir.dstu3.model.BooleanType; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Organization10_30 { @@ -13,15 +15,14 @@ public class Organization10_30 { if (src.hasIdentifier()) { for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t)); } - if (src.hasActive()) { - tgt.setActive(src.getActive()); + if (src.hasActiveElement()) { + tgt.setActiveElement((BooleanType) VersionConvertor_10_30.convertType(src.getActiveElement())); } if (src.hasType()) { tgt.addType(VersionConvertor_10_30.convertCodeableConcept(src.getType())); } - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_30.convertContactPoint(t)); } @@ -45,15 +46,14 @@ public class Organization10_30 { if (src.hasIdentifier()) { for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t)); } - if (src.hasActive()) { - tgt.setActive(src.getActive()); + if (src.hasActiveElement()) { + tgt.setActiveElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_30.convertType(src.getActiveElement())); } if (src.hasType()) { tgt.setType(VersionConvertor_10_30.convertCodeableConcept(src.getTypeFirstRep())); } - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu3.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_30.convertContactPoint(t)); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Parameters10_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Parameters10_30.java index c9b755ab7..9fcb4facc 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Parameters10_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Parameters10_30.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_30; import org.hl7.fhir.convertors.VersionConvertor_10_30; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Parameters10_30 { @@ -32,9 +33,8 @@ public class Parameters10_30 { return null; org.hl7.fhir.dstu3.model.Parameters.ParametersParameterComponent tgt = new org.hl7.fhir.dstu3.model.Parameters.ParametersParameterComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getNameElement())); if (src.hasValue()) { tgt.setValue(VersionConvertor_10_30.convertType(src.getValue())); } @@ -52,9 +52,8 @@ public class Parameters10_30 { return null; org.hl7.fhir.dstu2.model.Parameters.ParametersParameterComponent tgt = new org.hl7.fhir.dstu2.model.Parameters.ParametersParameterComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getNameElement())); if (src.hasValue()) { tgt.setValue(VersionConvertor_10_30.convertType(src.getValue())); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Patient10_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Patient10_30.java index 124d89338..f2ad6b863 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Patient10_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Patient10_30.java @@ -1,7 +1,9 @@ package org.hl7.fhir.convertors.conv10_30; import org.hl7.fhir.convertors.VersionConvertor_10_30; +import org.hl7.fhir.dstu3.model.BooleanType; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Patient10_30 { @@ -149,9 +151,8 @@ public class Patient10_30 { if (src.hasGender()) { tgt.setGender(VersionConvertor_10_30.convertAdministrativeGender(src.getGender())); } - if (src.hasBirthDate()) { - tgt.setBirthDate(src.getBirthDate()); - } + if (src.hasBirthDateElement()) + tgt.setBirthDateElement((org.hl7.fhir.dstu3.model.DateType) VersionConvertor_10_30.convertType(src.getBirthDateElement())); if (src.hasDeceased()) { tgt.setDeceased(VersionConvertor_10_30.convertType(src.getDeceased())); } @@ -208,9 +209,8 @@ public class Patient10_30 { if (src.hasGender()) { tgt.setGender(VersionConvertor_10_30.convertAdministrativeGender(src.getGender())); } - if (src.hasBirthDate()) { - tgt.setBirthDate(src.getBirthDate()); - } + if (src.hasBirthDateElement()) + tgt.setBirthDateElement((org.hl7.fhir.dstu2.model.DateType) VersionConvertor_10_30.convertType(src.getBirthDateElement())); if (src.hasDeceased()) { tgt.setDeceased(VersionConvertor_10_30.convertType(src.getDeceased())); } @@ -255,8 +255,8 @@ public class Patient10_30 { if (src.hasLanguage()) { tgt.setLanguage(VersionConvertor_10_30.convertCodeableConcept(src.getLanguage())); } - if (src.hasPreferred()) { - tgt.setPreferred(src.getPreferred()); + if (src.hasPreferredElement()) { + tgt.setPreferredElement((BooleanType) VersionConvertor_10_30.convertType(src.getPreferredElement())); } return tgt; } @@ -269,8 +269,8 @@ public class Patient10_30 { if (src.hasLanguage()) { tgt.setLanguage(VersionConvertor_10_30.convertCodeableConcept(src.getLanguage())); } - if (src.hasPreferred()) { - tgt.setPreferred(src.getPreferred()); + if (src.hasPreferredElement()) { + tgt.setPreferredElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_30.convertType(src.getPreferredElement())); } return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Person10_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Person10_30.java index b34cf94d4..0ee9fc66f 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Person10_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Person10_30.java @@ -1,7 +1,9 @@ package org.hl7.fhir.convertors.conv10_30; import org.hl7.fhir.convertors.VersionConvertor_10_30; +import org.hl7.fhir.dstu3.model.BooleanType; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Person10_30 { @@ -56,9 +58,8 @@ public class Person10_30 { if (src.hasGender()) { tgt.setGender(VersionConvertor_10_30.convertAdministrativeGender(src.getGender())); } - if (src.hasBirthDate()) { - tgt.setBirthDate(src.getBirthDate()); - } + if (src.hasBirthDateElement()) + tgt.setBirthDateElement((org.hl7.fhir.dstu3.model.DateType) VersionConvertor_10_30.convertType(src.getBirthDateElement())); if (src.hasAddress()) { for (org.hl7.fhir.dstu2.model.Address t : src.getAddress()) tgt.addAddress(VersionConvertor_10_30.convertAddress(t)); } @@ -68,8 +69,8 @@ public class Person10_30 { if (src.hasManagingOrganization()) { tgt.setManagingOrganization(VersionConvertor_10_30.convertReference(src.getManagingOrganization())); } - if (src.hasActive()) { - tgt.setActive(src.getActive()); + if (src.hasActiveElement()) { + tgt.setActiveElement((BooleanType) VersionConvertor_10_30.convertType(src.getActiveElement())); } if (src.hasLink()) { for (org.hl7.fhir.dstu2.model.Person.PersonLinkComponent t : src.getLink()) tgt.addLink(convertPersonLinkComponent(t)); @@ -94,9 +95,8 @@ public class Person10_30 { if (src.hasGender()) { tgt.setGender(VersionConvertor_10_30.convertAdministrativeGender(src.getGender())); } - if (src.hasBirthDate()) { - tgt.setBirthDate(src.getBirthDate()); - } + if (src.hasBirthDateElement()) + tgt.setBirthDateElement((org.hl7.fhir.dstu2.model.DateType) VersionConvertor_10_30.convertType(src.getBirthDateElement())); if (src.hasAddress()) { for (org.hl7.fhir.dstu3.model.Address t : src.getAddress()) tgt.addAddress(VersionConvertor_10_30.convertAddress(t)); } @@ -106,8 +106,8 @@ public class Person10_30 { if (src.hasManagingOrganization()) { tgt.setManagingOrganization(VersionConvertor_10_30.convertReference(src.getManagingOrganization())); } - if (src.hasActive()) { - tgt.setActive(src.getActive()); + if (src.hasActiveElement()) { + tgt.setActiveElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_30.convertType(src.getActiveElement())); } if (src.hasLink()) { for (org.hl7.fhir.dstu3.model.Person.PersonLinkComponent t : src.getLink()) tgt.addLink(convertPersonLinkComponent(t)); diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Practitioner10_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Practitioner10_30.java index 4a44a6916..354fe85c8 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Practitioner10_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Practitioner10_30.java @@ -1,7 +1,9 @@ package org.hl7.fhir.convertors.conv10_30; import org.hl7.fhir.convertors.VersionConvertor_10_30; +import org.hl7.fhir.dstu3.model.BooleanType; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Practitioner10_30 { @@ -13,8 +15,8 @@ public class Practitioner10_30 { if (src.hasIdentifier()) { for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t)); } - if (src.hasActive()) { - tgt.setActive(src.getActive()); + if (src.hasActiveElement()) { + tgt.setActiveElement((BooleanType) VersionConvertor_10_30.convertType(src.getActiveElement())); } if (src.hasName()) tgt.addName(VersionConvertor_10_30.convertHumanName(src.getName())); @@ -27,9 +29,8 @@ public class Practitioner10_30 { if (src.hasGender()) { tgt.setGender(VersionConvertor_10_30.convertAdministrativeGender(src.getGender())); } - if (src.hasBirthDate()) { - tgt.setBirthDate(src.getBirthDate()); - } + if (src.hasBirthDateElement()) + tgt.setBirthDateElement((org.hl7.fhir.dstu3.model.DateType) VersionConvertor_10_30.convertType(src.getBirthDateElement())); if (src.hasPhoto()) { for (org.hl7.fhir.dstu2.model.Attachment t : src.getPhoto()) tgt.addPhoto(VersionConvertor_10_30.convertAttachment(t)); } @@ -50,8 +51,8 @@ public class Practitioner10_30 { if (src.hasIdentifier()) { for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t)); } - if (src.hasActive()) { - tgt.setActive(src.getActive()); + if (src.hasActiveElement()) { + tgt.setActiveElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_30.convertType(src.getActiveElement())); } if (src.hasName()) { for (org.hl7.fhir.dstu3.model.HumanName t : src.getName()) tgt.setName(VersionConvertor_10_30.convertHumanName(t)); @@ -65,9 +66,8 @@ public class Practitioner10_30 { if (src.hasGender()) { tgt.setGender(VersionConvertor_10_30.convertAdministrativeGender(src.getGender())); } - if (src.hasBirthDate()) { - tgt.setBirthDate(src.getBirthDate()); - } + if (src.hasBirthDateElement()) + tgt.setBirthDateElement((org.hl7.fhir.dstu2.model.DateType) VersionConvertor_10_30.convertType(src.getBirthDateElement())); if (src.hasPhoto()) { for (org.hl7.fhir.dstu3.model.Attachment t : src.getPhoto()) tgt.addPhoto(VersionConvertor_10_30.convertAttachment(t)); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Procedure10_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Procedure10_30.java index d542bcea2..f16c6bd05 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Procedure10_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Procedure10_30.java @@ -1,7 +1,9 @@ package org.hl7.fhir.convertors.conv10_30; import org.hl7.fhir.convertors.VersionConvertor_10_30; +import org.hl7.fhir.dstu2.model.BooleanType; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Procedure10_30 { @@ -25,8 +27,8 @@ public class Procedure10_30 { if (src.hasCode()) { tgt.setCode(VersionConvertor_10_30.convertCodeableConcept(src.getCode())); } - if (src.hasNotDone()) { - tgt.setNotPerformed(src.getNotDone()); + if (src.hasNotDoneElement()) { + tgt.setNotPerformedElement((BooleanType) VersionConvertor_10_30.convertType(src.getNotDoneElement())); } if (src.hasNotDoneReason()) { tgt.addReasonNotPerformed(VersionConvertor_10_30.convertCodeableConcept(src.getNotDoneReason())); @@ -90,8 +92,8 @@ public class Procedure10_30 { if (src.hasCode()) { tgt.setCode(VersionConvertor_10_30.convertCodeableConcept(src.getCode())); } - if (src.hasNotPerformed()) { - tgt.setNotDone(src.getNotPerformed()); + if (src.hasNotPerformedElement()) { + tgt.setNotDoneElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_10_30.convertType(src.getNotPerformedElement())); } if (src.hasReasonNotPerformed()) tgt.setNotDoneReason(VersionConvertor_10_30.convertCodeableConcept(src.getReasonNotPerformed().get(0))); diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/ProcedureRequest10_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/ProcedureRequest10_30.java index 610c383f4..8a2c79369 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/ProcedureRequest10_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/ProcedureRequest10_30.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_30; import org.hl7.fhir.convertors.VersionConvertor_10_30; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class ProcedureRequest10_30 { diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Provenance10_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Provenance10_30.java index 1e8a2ecc2..450a68fd0 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Provenance10_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Provenance10_30.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_30; import org.hl7.fhir.convertors.VersionConvertor_10_30; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Provenance10_30 { @@ -16,9 +17,8 @@ public class Provenance10_30 { if (src.hasPeriod()) { tgt.setPeriod(VersionConvertor_10_30.convertPeriod(src.getPeriod())); } - if (src.hasRecorded()) { - tgt.setRecorded(src.getRecorded()); - } + if (src.hasRecordedElement()) + tgt.setRecordedElement((org.hl7.fhir.dstu2.model.InstantType) VersionConvertor_10_30.convertType(src.getRecordedElement())); if (src.hasReason()) { for (org.hl7.fhir.dstu3.model.Coding t : src.getReason()) tgt.addReason().addCoding(VersionConvertor_10_30.convertCoding(t)); } @@ -54,9 +54,8 @@ public class Provenance10_30 { if (src.hasPeriod()) { tgt.setPeriod(VersionConvertor_10_30.convertPeriod(src.getPeriod())); } - if (src.hasRecorded()) { - tgt.setRecorded(src.getRecorded()); - } + if (src.hasRecordedElement()) + tgt.setRecordedElement((org.hl7.fhir.dstu3.model.InstantType) VersionConvertor_10_30.convertType(src.getRecordedElement())); if (src.hasReason()) { for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getReason()) for (org.hl7.fhir.dstu2.model.Coding tc : t.getCoding()) tgt.addReason(VersionConvertor_10_30.convertCoding(tc)); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Questionnaire10_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Questionnaire10_30.java index 7d9b80a67..023502bde 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Questionnaire10_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Questionnaire10_30.java @@ -1,8 +1,11 @@ package org.hl7.fhir.convertors.conv10_30; import org.hl7.fhir.convertors.VersionConvertor_10_30; +import org.hl7.fhir.dstu2.model.BooleanType; +import org.hl7.fhir.dstu2.model.StringType; import org.hl7.fhir.dstu3.model.ContactDetail; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Questionnaire10_30 { @@ -14,23 +17,21 @@ public class Questionnaire10_30 { if (src.hasIdentifier()) { for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t)); } - if (src.hasVersion()) { - tgt.setVersion(src.getVersion()); - } + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getVersionElement())); if (src.hasStatus()) { tgt.setStatus(convertQuestionnaireStatus(src.getStatus())); } - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) { - tgt.setPublisher(src.getPublisher()); - } + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_30.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getPublisherElement())); if (src.hasContact()) { for (ContactDetail t : src.getContact()) for (org.hl7.fhir.dstu3.model.ContactPoint t1 : t.getTelecom()) tgt.addTelecom(VersionConvertor_10_30.convertContactPoint(t1)); } org.hl7.fhir.dstu2.model.Questionnaire.GroupComponent root = tgt.getGroup(); - if (src.hasTitle()) { - root.setTitle(src.getTitle()); + if (src.hasTitleElement()) { + root.setTitleElement((StringType) VersionConvertor_10_30.convertType(src.getTitleElement())); } for (org.hl7.fhir.dstu3.model.Coding t : src.getCode()) { root.addConcept(VersionConvertor_10_30.convertCoding(t)); @@ -53,12 +54,12 @@ public class Questionnaire10_30 { for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t)); tgt.setVersion(src.getVersion()); tgt.setStatus(convertQuestionnaireStatus(src.getStatus())); - if (src.hasDate()) - tgt.setDate(src.getDate()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_10_30.convertType(src.getDateElement())); tgt.setPublisher(src.getPublisher()); for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getTelecom()) tgt.addContact(convertQuestionnaireContactComponent(t)); org.hl7.fhir.dstu2.model.Questionnaire.GroupComponent root = src.getGroup(); - tgt.setTitle(root.getTitle()); + tgt.setTitleElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(root.getTitleElement())); for (org.hl7.fhir.dstu2.model.Coding t : root.getConcept()) tgt.addCode(VersionConvertor_10_30.convertCoding(t)); for (org.hl7.fhir.dstu2.model.CodeType t : src.getSubjectType()) tgt.addSubjectType(t.getValue()); tgt.addItem(convertQuestionnaireGroupComponent(root)); @@ -79,20 +80,18 @@ public class Questionnaire10_30 { return null; org.hl7.fhir.dstu2.model.Questionnaire.GroupComponent tgt = new org.hl7.fhir.dstu2.model.Questionnaire.GroupComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasLinkId()) { - tgt.setLinkId(src.getLinkId()); - } + if (src.hasLinkIdElement()) + tgt.setLinkIdElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getLinkIdElement())); if (src.hasCode()) { for (org.hl7.fhir.dstu3.model.Coding t : src.getCode()) tgt.addConcept(VersionConvertor_10_30.convertCoding(t)); } - if (src.hasText()) { - tgt.setText(src.getText()); + if (src.hasTextElement()) + tgt.setTextElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getTextElement())); + if (src.hasRequiredElement()) { + tgt.setRequiredElement((BooleanType) VersionConvertor_10_30.convertType(src.getRequiredElement())); } - if (src.hasRequired()) { - tgt.setRequired(src.getRequired()); - } - if (src.hasRepeats()) { - tgt.setRepeats(src.getRepeats()); + if (src.hasRepeatsElement()) { + tgt.setRepeatsElement((BooleanType) VersionConvertor_10_30.convertType(src.getRepeatsElement())); } for (org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemComponent t : src.getItem()) if (t.getType() == org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemType.GROUP) tgt.addGroup(convertQuestionnaireGroupComponent(t)); @@ -106,21 +105,19 @@ public class Questionnaire10_30 { return null; org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemComponent tgt = new org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasLinkId()) { - tgt.setLinkId(src.getLinkId()); - } + if (src.hasLinkIdElement()) + tgt.setLinkIdElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getLinkIdElement())); if (src.hasConcept()) { for (org.hl7.fhir.dstu2.model.Coding t : src.getConcept()) tgt.addCode(VersionConvertor_10_30.convertCoding(t)); } - if (src.hasText()) { - tgt.setText(src.getText()); - } + if (src.hasTextElement()) + tgt.setTextElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getTextElement())); tgt.setType(org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemType.GROUP); - if (src.hasRequired()) { - tgt.setRequired(src.getRequired()); + if (src.hasRequiredElement()) { + tgt.setRequiredElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_10_30.convertType(src.getRequiredElement())); } - if (src.hasRepeats()) { - tgt.setRepeats(src.getRepeats()); + if (src.hasRepeatsElement()) { + tgt.setRepeatsElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_10_30.convertType(src.getRepeatsElement())); } if (src.hasGroup()) { for (org.hl7.fhir.dstu2.model.Questionnaire.GroupComponent t : src.getGroup()) tgt.addItem(convertQuestionnaireGroupComponent(t)); @@ -173,23 +170,21 @@ public class Questionnaire10_30 { return null; org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemComponent tgt = new org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasLinkId()) { - tgt.setLinkId(src.getLinkId()); - } + if (src.hasLinkIdElement()) + tgt.setLinkIdElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getLinkIdElement())); if (src.hasConcept()) { for (org.hl7.fhir.dstu2.model.Coding t : src.getConcept()) tgt.addCode(VersionConvertor_10_30.convertCoding(t)); } - if (src.hasText()) { - tgt.setText(src.getText()); - } + if (src.hasTextElement()) + tgt.setTextElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getTextElement())); if (src.hasType()) { tgt.setType(convertQuestionnaireQuestionType(src.getType())); } - if (src.hasRequired()) { - tgt.setRequired(src.getRequired()); + if (src.hasRequiredElement()) { + tgt.setRequiredElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_10_30.convertType(src.getRequiredElement())); } - if (src.hasRepeats()) { - tgt.setRepeats(src.getRepeats()); + if (src.hasRepeatsElement()) { + tgt.setRepeatsElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_10_30.convertType(src.getRepeatsElement())); } if (src.hasOptions()) { tgt.setOptions(VersionConvertor_10_30.convertReference(src.getOptions())); @@ -208,23 +203,21 @@ public class Questionnaire10_30 { return null; org.hl7.fhir.dstu2.model.Questionnaire.QuestionComponent tgt = new org.hl7.fhir.dstu2.model.Questionnaire.QuestionComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasLinkId()) { - tgt.setLinkId(src.getLinkId()); - } + if (src.hasLinkIdElement()) + tgt.setLinkIdElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getLinkIdElement())); if (src.hasCode()) { for (org.hl7.fhir.dstu3.model.Coding t : src.getCode()) tgt.addConcept(VersionConvertor_10_30.convertCoding(t)); } - if (src.hasText()) { - tgt.setText(src.getText()); - } + if (src.hasTextElement()) + tgt.setTextElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getTextElement())); if (src.hasType()) { tgt.setType(convertQuestionnaireItemType(src.getType())); } - if (src.hasRequired()) { - tgt.setRequired(src.getRequired()); + if (src.hasRequiredElement()) { + tgt.setRequiredElement((BooleanType) VersionConvertor_10_30.convertType(src.getRequiredElement())); } - if (src.hasRepeats()) { - tgt.setRepeats(src.getRepeats()); + if (src.hasRepeatsElement()) { + tgt.setRepeatsElement((BooleanType) VersionConvertor_10_30.convertType(src.getRepeatsElement())); } if (src.hasOptions()) { tgt.setOptions(VersionConvertor_10_30.convertReference(src.getOptions())); diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/QuestionnaireResponse10_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/QuestionnaireResponse10_30.java index abc3b2acf..97efc1de5 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/QuestionnaireResponse10_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/QuestionnaireResponse10_30.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_30; import org.hl7.fhir.convertors.VersionConvertor_10_30; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class QuestionnaireResponse10_30 { @@ -10,12 +11,10 @@ public class QuestionnaireResponse10_30 { return null; org.hl7.fhir.dstu2.model.QuestionnaireResponse.GroupComponent tgt = new org.hl7.fhir.dstu2.model.QuestionnaireResponse.GroupComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasLinkId()) { - tgt.setLinkId(src.getLinkId()); - } - if (src.hasText()) { - tgt.setText(src.getText()); - } + if (src.hasLinkIdElement()) + tgt.setLinkIdElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getLinkIdElement())); + if (src.hasTextElement()) + tgt.setTextElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getTextElement())); if (src.hasSubject()) { tgt.setSubject(VersionConvertor_10_30.convertReference(src.getSubject())); } @@ -31,12 +30,10 @@ public class QuestionnaireResponse10_30 { return null; org.hl7.fhir.dstu2.model.QuestionnaireResponse.QuestionComponent tgt = new org.hl7.fhir.dstu2.model.QuestionnaireResponse.QuestionComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasLinkId()) { - tgt.setLinkId(src.getLinkId()); - } - if (src.hasText()) { - tgt.setText(src.getText()); - } + if (src.hasLinkIdElement()) + tgt.setLinkIdElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getLinkIdElement())); + if (src.hasTextElement()) + tgt.setTextElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getTextElement())); if (src.hasAnswer()) { for (org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent t : src.getAnswer()) tgt.addAnswer(convertQuestionnaireResponseItemAnswerComponent(t)); } @@ -63,9 +60,8 @@ public class QuestionnaireResponse10_30 { if (src.hasAuthor()) { tgt.setAuthor(VersionConvertor_10_30.convertReference(src.getAuthor())); } - if (src.hasAuthored()) { - tgt.setAuthored(src.getAuthored()); - } + if (src.hasAuthoredElement()) + tgt.setAuthoredElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_30.convertType(src.getAuthoredElement())); if (src.hasSource()) { tgt.setSource(VersionConvertor_10_30.convertReference(src.getSource())); } @@ -100,9 +96,8 @@ public class QuestionnaireResponse10_30 { if (src.hasAuthor()) { tgt.setAuthor(VersionConvertor_10_30.convertReference(src.getAuthor())); } - if (src.hasAuthored()) { - tgt.setAuthored(src.getAuthored()); - } + if (src.hasAuthoredElement()) + tgt.setAuthoredElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_10_30.convertType(src.getAuthoredElement())); if (src.hasSource()) { tgt.setSource(VersionConvertor_10_30.convertReference(src.getSource())); } @@ -119,12 +114,10 @@ public class QuestionnaireResponse10_30 { return null; org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseItemComponent tgt = new org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseItemComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasLinkId()) { - tgt.setLinkId(src.getLinkId()); - } - if (src.hasText()) { - tgt.setText(src.getText()); - } + if (src.hasLinkIdElement()) + tgt.setLinkIdElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getLinkIdElement())); + if (src.hasTextElement()) + tgt.setTextElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getTextElement())); if (src.hasSubject()) { tgt.setSubject(VersionConvertor_10_30.convertReference(src.getSubject())); } @@ -170,12 +163,10 @@ public class QuestionnaireResponse10_30 { return null; org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseItemComponent tgt = new org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseItemComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasLinkId()) { - tgt.setLinkId(src.getLinkId()); - } - if (src.hasText()) { - tgt.setText(src.getText()); - } + if (src.hasLinkIdElement()) + tgt.setLinkIdElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getLinkIdElement())); + if (src.hasTextElement()) + tgt.setTextElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getTextElement())); if (src.hasAnswer()) { for (org.hl7.fhir.dstu2.model.QuestionnaireResponse.QuestionAnswerComponent t : src.getAnswer()) tgt.addAnswer(convertQuestionnaireResponseItemAnswerComponent(t)); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/ReferralRequest10_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/ReferralRequest10_30.java index ccf9ef230..cf69b8224 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/ReferralRequest10_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/ReferralRequest10_30.java @@ -4,6 +4,7 @@ import org.hl7.fhir.convertors.VersionConvertor_10_30; import org.hl7.fhir.dstu2.model.CodeableConcept; import org.hl7.fhir.dstu3.model.ReferralRequest.ReferralPriority; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class ReferralRequest10_30 { @@ -77,9 +78,8 @@ public class ReferralRequest10_30 { if (src.hasReasonCode()) { for (org.hl7.fhir.dstu3.model.CodeableConcept cc : src.getReasonCode()) tgt.setReason(VersionConvertor_10_30.convertCodeableConcept(cc)); } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getDescriptionElement())); if (src.hasServiceRequested()) { for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getServiceRequested()) tgt.addServiceRequested(VersionConvertor_10_30.convertCodeableConcept(t)); } @@ -124,9 +124,8 @@ public class ReferralRequest10_30 { if (src.hasReason()) { tgt.addReasonCode(VersionConvertor_10_30.convertCodeableConcept(src.getReason())); } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getDescriptionElement())); if (src.hasServiceRequested()) { for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getServiceRequested()) tgt.addServiceRequested(VersionConvertor_10_30.convertCodeableConcept(t)); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/RelatedPerson10_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/RelatedPerson10_30.java index 5c1a5111b..ded4f545b 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/RelatedPerson10_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/RelatedPerson10_30.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_30; import org.hl7.fhir.convertors.VersionConvertor_10_30; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class RelatedPerson10_30 { @@ -28,9 +29,8 @@ public class RelatedPerson10_30 { if (src.hasGender()) { tgt.setGender(VersionConvertor_10_30.convertAdministrativeGender(src.getGender())); } - if (src.hasBirthDate()) { - tgt.setBirthDate(src.getBirthDate()); - } + if (src.hasBirthDateElement()) + tgt.setBirthDateElement((org.hl7.fhir.dstu3.model.DateType) VersionConvertor_10_30.convertType(src.getBirthDateElement())); if (src.hasAddress()) { for (org.hl7.fhir.dstu2.model.Address t : src.getAddress()) tgt.addAddress(VersionConvertor_10_30.convertAddress(t)); } @@ -65,9 +65,8 @@ public class RelatedPerson10_30 { if (src.hasGender()) { tgt.setGender(VersionConvertor_10_30.convertAdministrativeGender(src.getGender())); } - if (src.hasBirthDate()) { - tgt.setBirthDate(src.getBirthDate()); - } + if (src.hasBirthDateElement()) + tgt.setBirthDateElement((org.hl7.fhir.dstu2.model.DateType) VersionConvertor_10_30.convertType(src.getBirthDateElement())); if (src.hasAddress()) { for (org.hl7.fhir.dstu3.model.Address t : src.getAddress()) tgt.addAddress(VersionConvertor_10_30.convertAddress(t)); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/RiskAssessment10_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/RiskAssessment10_30.java index e39099f20..625cec9c9 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/RiskAssessment10_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/RiskAssessment10_30.java @@ -1,7 +1,9 @@ package org.hl7.fhir.convertors.conv10_30; import org.hl7.fhir.convertors.VersionConvertor_10_30; +import org.hl7.fhir.dstu3.model.DecimalType; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class RiskAssessment10_30 { @@ -34,9 +36,8 @@ public class RiskAssessment10_30 { if (src.hasPrediction()) { for (org.hl7.fhir.dstu3.model.RiskAssessment.RiskAssessmentPredictionComponent t : src.getPrediction()) tgt.addPrediction(convertRiskAssessmentPredictionComponent(t)); } - if (src.hasMitigation()) { - tgt.setMitigation(src.getMitigation()); - } + if (src.hasMitigationElement()) + tgt.setMitigationElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getMitigationElement())); return tgt; } @@ -69,9 +70,8 @@ public class RiskAssessment10_30 { if (src.hasPrediction()) { for (org.hl7.fhir.dstu2.model.RiskAssessment.RiskAssessmentPredictionComponent t : src.getPrediction()) tgt.addPrediction(convertRiskAssessmentPredictionComponent(t)); } - if (src.hasMitigation()) { - tgt.setMitigation(src.getMitigation()); - } + if (src.hasMitigationElement()) + tgt.setMitigationElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getMitigationElement())); return tgt; } @@ -86,15 +86,14 @@ public class RiskAssessment10_30 { if (src.hasProbability()) { tgt.setProbability(VersionConvertor_10_30.convertType(src.getProbability())); } - if (src.hasRelativeRisk()) { - tgt.setRelativeRisk(src.getRelativeRisk()); + if (src.hasRelativeRiskElement()) { + tgt.setRelativeRiskElement((DecimalType) VersionConvertor_10_30.convertType(src.getRelativeRiskElement())); } if (src.hasWhen()) { tgt.setWhen(VersionConvertor_10_30.convertType(src.getWhen())); } - if (src.hasRationale()) { - tgt.setRationale(src.getRationale()); - } + if (src.hasRationaleElement()) + tgt.setRationaleElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getRationaleElement())); return tgt; } @@ -109,15 +108,14 @@ public class RiskAssessment10_30 { if (src.hasProbability()) { tgt.setProbability(VersionConvertor_10_30.convertType(src.getProbability())); } - if (src.hasRelativeRisk()) { - tgt.setRelativeRisk(src.getRelativeRisk()); + if (src.hasRelativeRiskElement()) { + tgt.setRelativeRiskElement((org.hl7.fhir.dstu2.model.DecimalType) VersionConvertor_10_30.convertType(src.getRelativeRiskElement())); } if (src.hasWhen()) { tgt.setWhen(VersionConvertor_10_30.convertType(src.getWhen())); } - if (src.hasRationale()) { - tgt.setRationale(src.getRationale()); - } + if (src.hasRationaleElement()) + tgt.setRationaleElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getRationaleElement())); return tgt; } } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Schedule10_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Schedule10_30.java index e4e773f10..9d857c534 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Schedule10_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Schedule10_30.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_30; import org.hl7.fhir.convertors.VersionConvertor_10_30; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Schedule10_30 { @@ -22,9 +23,8 @@ public class Schedule10_30 { if (src.hasPlanningHorizon()) { tgt.setPlanningHorizon(VersionConvertor_10_30.convertPeriod(src.getPlanningHorizon())); } - if (src.hasComment()) { - tgt.setComment(src.getComment()); - } + if (src.hasCommentElement()) + tgt.setCommentElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getCommentElement())); return tgt; } @@ -45,9 +45,8 @@ public class Schedule10_30 { if (src.hasPlanningHorizon()) { tgt.setPlanningHorizon(VersionConvertor_10_30.convertPeriod(src.getPlanningHorizon())); } - if (src.hasComment()) { - tgt.setComment(src.getComment()); - } + if (src.hasCommentElement()) + tgt.setCommentElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getCommentElement())); return tgt; } } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/SearchParameter10_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/SearchParameter10_30.java index 657a49a7a..ac4b52910 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/SearchParameter10_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/SearchParameter10_30.java @@ -1,8 +1,12 @@ package org.hl7.fhir.convertors.conv10_30; import org.hl7.fhir.convertors.VersionConvertor_10_30; +import org.hl7.fhir.dstu2.model.BooleanType; +import org.hl7.fhir.dstu2.model.StringType; import org.hl7.fhir.dstu2.utils.ToolingExtensions; +import org.hl7.fhir.dstu3.model.MarkdownType; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class SearchParameter10_30 { @@ -11,46 +15,40 @@ public class SearchParameter10_30 { return null; org.hl7.fhir.dstu2.model.SearchParameter tgt = new org.hl7.fhir.dstu2.model.SearchParameter(); VersionConvertor_10_30.copyDomainResource(src, tgt); - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_30.convertType(src.getUrlElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_10_30.convertConformanceResourceStatus(src.getStatus())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) { - tgt.setPublisher(src.getPublisher()); - } + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((BooleanType) VersionConvertor_10_30.convertType(src.getExperimentalElement())); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_30.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) tgt.addContact(convertSearchParameterContactComponent(t)); } - if (src.hasPurpose()) { - tgt.setRequirements(src.getPurpose()); - } - if (src.hasCode()) { - tgt.setCode(src.getCode()); + if (src.hasPurposeElement()) { + tgt.setRequirementsElement((StringType) VersionConvertor_10_30.convertType(src.getPurposeElement())); } + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu2.model.CodeType) VersionConvertor_10_30.convertType(src.getCodeElement())); if (src.hasBase()) { for (org.hl7.fhir.dstu3.model.CodeType t : src.getBase()) tgt.setBase(t.asStringValue()); } if (src.hasType()) { tgt.setType(VersionConvertor_10_30.convertSearchParamType(src.getType())); } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getDescriptionElement())); if (src.hasExpression()) { org.hl7.fhir.dstu2.utils.ToolingExtensions.setStringExtension(tgt, ToolingExtensions.EXT_EXPRESSION, src.getExpression()); } - if (src.hasXpath()) { - tgt.setXpath(src.getXpath()); - } + if (src.hasXpathElement()) + tgt.setXpathElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getXpathElement())); if (src.hasXpathUsage()) { tgt.setXpathUsage(convertXPathUsageType(src.getXpathUsage())); } @@ -65,44 +63,37 @@ public class SearchParameter10_30 { return null; org.hl7.fhir.dstu3.model.SearchParameter tgt = new org.hl7.fhir.dstu3.model.SearchParameter(); VersionConvertor_10_30.copyDomainResource(src, tgt); - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_10_30.convertType(src.getUrlElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_10_30.convertConformanceResourceStatus(src.getStatus())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) { - tgt.setPublisher(src.getPublisher()); - } + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_10_30.convertType(src.getExperimentalElement())); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_10_30.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu2.model.SearchParameter.SearchParameterContactComponent t : src.getContact()) tgt.addContact(convertSearchParameterContactComponent(t)); } - if (src.hasRequirements()) { - tgt.setPurpose(src.getRequirements()); - } - if (src.hasCode()) { - tgt.setCode(src.getCode()); - } - if (src.hasBase()) { - tgt.addBase(src.getBase()); + if (src.hasRequirementsElement()) { + tgt.setPurposeElement((MarkdownType) VersionConvertor_10_30.convertType(src.getRequirementsElement())); } + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_10_30.convertType(src.getCodeElement())); + if (src.hasBaseElement()) + tgt.setBase(Collections.singletonList((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_10_30.convertType(src.getBaseElement()))); if (src.hasType()) { tgt.setType(VersionConvertor_10_30.convertSearchParamType(src.getType())); } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_10_30.convertType(src.getDescriptionElement())); tgt.setExpression(ToolingExtensions.readStringExtension(src, ToolingExtensions.EXT_EXPRESSION)); - if (src.hasXpath()) { - tgt.setXpath(src.getXpath()); - } + if (src.hasXpathElement()) + tgt.setXpathElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getXpathElement())); if (src.hasXpathUsage()) { tgt.setXpathUsage(convertXPathUsageType(src.getXpathUsage())); } @@ -117,9 +108,8 @@ public class SearchParameter10_30 { return null; org.hl7.fhir.dstu2.model.SearchParameter.SearchParameterContactComponent tgt = new org.hl7.fhir.dstu2.model.SearchParameter.SearchParameterContactComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu3.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_30.convertContactPoint(t)); } @@ -131,9 +121,8 @@ public class SearchParameter10_30 { return null; org.hl7.fhir.dstu3.model.ContactDetail tgt = new org.hl7.fhir.dstu3.model.ContactDetail(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_30.convertContactPoint(t)); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Slot10_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Slot10_30.java index e78870166..07c6aa4f7 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Slot10_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Slot10_30.java @@ -1,7 +1,9 @@ package org.hl7.fhir.convertors.conv10_30; import org.hl7.fhir.convertors.VersionConvertor_10_30; +import org.hl7.fhir.dstu3.model.BooleanType; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Slot10_30 { @@ -18,18 +20,15 @@ public class Slot10_30 { if (src.hasSchedule()) { tgt.setSchedule(VersionConvertor_10_30.convertReference(src.getSchedule())); } - if (src.hasStart()) { - tgt.setStart(src.getStart()); - } - if (src.hasEnd()) { - tgt.setEnd(src.getEnd()); - } - if (src.hasOverbooked()) { - tgt.setOverbooked(src.getOverbooked()); - } - if (src.hasComment()) { - tgt.setComment(src.getComment()); + if (src.hasStartElement()) + tgt.setStartElement((org.hl7.fhir.dstu3.model.InstantType) VersionConvertor_10_30.convertType(src.getStartElement())); + if (src.hasEndElement()) + tgt.setEndElement((org.hl7.fhir.dstu3.model.InstantType) VersionConvertor_10_30.convertType(src.getEndElement())); + if (src.hasOverbookedElement()) { + tgt.setOverbookedElement((BooleanType) VersionConvertor_10_30.convertType(src.getOverbookedElement())); } + if (src.hasCommentElement()) + tgt.setCommentElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getCommentElement())); return tgt; } @@ -47,18 +46,15 @@ public class Slot10_30 { if (src.hasSchedule()) { tgt.setSchedule(VersionConvertor_10_30.convertReference(src.getSchedule())); } - if (src.hasStart()) { - tgt.setStart(src.getStart()); - } - if (src.hasEnd()) { - tgt.setEnd(src.getEnd()); - } - if (src.hasOverbooked()) { - tgt.setOverbooked(src.getOverbooked()); - } - if (src.hasComment()) { - tgt.setComment(src.getComment()); + if (src.hasStartElement()) + tgt.setStartElement((org.hl7.fhir.dstu2.model.InstantType) VersionConvertor_10_30.convertType(src.getStartElement())); + if (src.hasEndElement()) + tgt.setEndElement((org.hl7.fhir.dstu2.model.InstantType) VersionConvertor_10_30.convertType(src.getEndElement())); + if (src.hasOverbookedElement()) { + tgt.setOverbookedElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_30.convertType(src.getOverbookedElement())); } + if (src.hasCommentElement()) + tgt.setCommentElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getCommentElement())); return tgt; } } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Specimen10_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Specimen10_30.java index 98bac12fe..6c13ca50f 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Specimen10_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Specimen10_30.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_30; import org.hl7.fhir.convertors.VersionConvertor_10_30; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Specimen10_30 { @@ -22,8 +23,8 @@ public class Specimen10_30 { tgt.setType(VersionConvertor_10_30.convertCodeableConcept(src.getType())); if (src.hasSubject()) tgt.setSubject(VersionConvertor_10_30.convertReference(src.getSubject())); - if (src.hasReceivedTime()) - tgt.setReceivedTime(src.getReceivedTime()); + if (src.hasReceivedTimeElement()) + tgt.setReceivedTimeElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_30.convertType(src.getReceivedTimeElement())); if (src.hasParent()) { for (org.hl7.fhir.dstu3.model.Reference t : src.getParent()) tgt.addParent(VersionConvertor_10_30.convertReference(t)); } @@ -64,8 +65,8 @@ public class Specimen10_30 { if (src.hasIdentifier()) { for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t)); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getDescriptionElement())); if (src.hasType()) tgt.setType(VersionConvertor_10_30.convertCodeableConcept(src.getType())); if (src.hasCapacity()) @@ -82,8 +83,8 @@ public class Specimen10_30 { return null; org.hl7.fhir.dstu2.model.Specimen.SpecimenTreatmentComponent tgt = new org.hl7.fhir.dstu2.model.Specimen.SpecimenTreatmentComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getDescriptionElement())); if (src.hasProcedure()) tgt.setProcedure(VersionConvertor_10_30.convertCodeableConcept(src.getProcedure())); if (src.hasAdditive()) { diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/StructureDefinition10_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/StructureDefinition10_30.java index 2bcad832b..c3f2ad464 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/StructureDefinition10_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/StructureDefinition10_30.java @@ -1,12 +1,17 @@ package org.hl7.fhir.convertors.conv10_30; import org.hl7.fhir.convertors.VersionConvertor_10_30; +import org.hl7.fhir.dstu2.model.BooleanType; +import org.hl7.fhir.dstu2.model.StringType; +import org.hl7.fhir.dstu2.model.UriType; +import org.hl7.fhir.dstu3.model.MarkdownType; import org.hl7.fhir.dstu3.model.StructureDefinition.StructureDefinitionKind; import org.hl7.fhir.dstu3.model.StructureDefinition.TypeDerivationRule; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.utilities.Utilities; import java.util.ArrayList; import java.util.List; +import java.util.Collections; public class StructureDefinition10_30 { @@ -45,62 +50,55 @@ public class StructureDefinition10_30 { return null; org.hl7.fhir.dstu2.model.StructureDefinition tgt = new org.hl7.fhir.dstu2.model.StructureDefinition(); VersionConvertor_10_30.copyDomainResource(src, tgt); - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_30.convertType(src.getUrlElement())); if (src.hasIdentifier()) { for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t)); } - if (src.hasVersion()) { - tgt.setVersion(src.getVersion()); - } - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasTitle()) { - tgt.setDisplay(src.getTitle()); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getNameElement())); + if (src.hasTitleElement()) { + tgt.setDisplayElement((StringType) VersionConvertor_10_30.convertType(src.getTitleElement())); } if (src.hasStatus()) { tgt.setStatus(VersionConvertor_10_30.convertConformanceResourceStatus(src.getStatus())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasPublisher()) { - tgt.setPublisher(src.getPublisher()); - } + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((BooleanType) VersionConvertor_10_30.convertType(src.getExperimentalElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) tgt.addContact(convertStructureDefinitionContactComponent(t)); } - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_30.convertType(src.getDateElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getDescriptionElement())); for (org.hl7.fhir.dstu3.model.UsageContext t : src.getUseContext()) if (t.hasValueCodeableConcept()) tgt.addUseContext(VersionConvertor_10_30.convertCodeableConcept(t.getValueCodeableConcept())); if (src.hasJurisdiction()) { for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getJurisdiction()) tgt.addUseContext(VersionConvertor_10_30.convertCodeableConcept(t)); } - if (src.hasPurpose()) { - tgt.setRequirements(src.getPurpose()); - } - if (src.hasCopyright()) { - tgt.setCopyright(src.getCopyright()); + if (src.hasPurposeElement()) { + tgt.setRequirementsElement((StringType) VersionConvertor_10_30.convertType(src.getPurposeElement())); } + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getCopyrightElement())); if (src.hasKeyword()) { for (org.hl7.fhir.dstu3.model.Coding t : src.getKeyword()) tgt.addCode(VersionConvertor_10_30.convertCoding(t)); } - if (src.hasFhirVersion()) { - tgt.setFhirVersion(src.getFhirVersion()); - } + if (src.hasFhirVersionElement()) + tgt.setFhirVersionElement((org.hl7.fhir.dstu2.model.IdType) VersionConvertor_10_30.convertType(src.getFhirVersionElement())); if (src.hasMapping()) { for (org.hl7.fhir.dstu3.model.StructureDefinition.StructureDefinitionMappingComponent t : src.getMapping()) tgt.addMapping(convertStructureDefinitionMappingComponent(t)); } if (src.hasKind()) { tgt.setKind(convertStructureDefinitionKind(src.getKind())); } - if (src.hasAbstract()) { - tgt.setAbstract(src.getAbstract()); + if (src.hasAbstractElement()) { + tgt.setAbstractElement((BooleanType) VersionConvertor_10_30.convertType(src.getAbstractElement())); } if (src.hasContextType()) { tgt.setContextType(convertExtensionContext(src.getContextType())); @@ -111,8 +109,8 @@ public class StructureDefinition10_30 { if (src.hasType()) { tgt.setConstrainedType(src.getType()); } - if (src.hasBaseDefinition()) { - tgt.setBase(src.getBaseDefinition()); + if (src.hasBaseDefinitionElement()) { + tgt.setBaseElement((UriType) VersionConvertor_10_30.convertType(src.getBaseDefinitionElement())); } if (src.hasSnapshot()) { tgt.setSnapshot(convertStructureDefinitionSnapshotComponent(src.getSnapshot())); @@ -134,61 +132,54 @@ public class StructureDefinition10_30 { return null; org.hl7.fhir.dstu3.model.StructureDefinition tgt = new org.hl7.fhir.dstu3.model.StructureDefinition(); VersionConvertor_10_30.copyDomainResource(src, tgt); - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_10_30.convertType(src.getUrlElement())); if (src.hasIdentifier()) { for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t)); } - if (src.hasVersion()) { - tgt.setVersion(src.getVersion()); - } - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasDisplay()) { - tgt.setTitle(src.getDisplay()); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getNameElement())); + if (src.hasDisplayElement()) { + tgt.setTitleElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getDisplayElement())); } if (src.hasStatus()) { tgt.setStatus(VersionConvertor_10_30.convertConformanceResourceStatus(src.getStatus())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasPublisher()) { - tgt.setPublisher(src.getPublisher()); - } + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_10_30.convertType(src.getExperimentalElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu2.model.StructureDefinition.StructureDefinitionContactComponent t : src.getContact()) tgt.addContact(convertStructureDefinitionContactComponent(t)); } - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_10_30.convertType(src.getDateElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_10_30.convertType(src.getDescriptionElement())); for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getUseContext()) if (VersionConvertor_10_30.isJurisdiction(t)) tgt.addJurisdiction(VersionConvertor_10_30.convertCodeableConcept(t)); else tgt.addUseContext(VersionConvertor_10_30.convertCodeableConceptToUsageContext(t)); - if (src.hasRequirements()) { - tgt.setPurpose(src.getRequirements()); - } - if (src.hasCopyright()) { - tgt.setCopyright(src.getCopyright()); + if (src.hasRequirementsElement()) { + tgt.setPurposeElement((MarkdownType) VersionConvertor_10_30.convertType(src.getRequirementsElement())); } + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_10_30.convertType(src.getCopyrightElement())); if (src.hasCode()) { for (org.hl7.fhir.dstu2.model.Coding t : src.getCode()) tgt.addKeyword(VersionConvertor_10_30.convertCoding(t)); } - if (src.hasFhirVersion()) { - tgt.setFhirVersion(src.getFhirVersion()); - } + if (src.hasFhirVersionElement()) + tgt.setFhirVersionElement((org.hl7.fhir.dstu3.model.IdType) VersionConvertor_10_30.convertType(src.getFhirVersionElement())); if (src.hasMapping()) { for (org.hl7.fhir.dstu2.model.StructureDefinition.StructureDefinitionMappingComponent t : src.getMapping()) tgt.addMapping(convertStructureDefinitionMappingComponent(t)); } if (src.hasKind()) { tgt.setKind(convertStructureDefinitionKind(src.getKind(), tgt.getId())); } - if (src.hasAbstract()) { - tgt.setAbstract(src.getAbstract()); + if (src.hasAbstractElement()) { + tgt.setAbstractElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_10_30.convertType(src.getAbstractElement())); } if (src.hasContextType()) { tgt.setContextType(convertExtensionContext(src.getContextType())); @@ -231,9 +222,8 @@ public class StructureDefinition10_30 { return null; org.hl7.fhir.dstu2.model.StructureDefinition.StructureDefinitionContactComponent tgt = new org.hl7.fhir.dstu2.model.StructureDefinition.StructureDefinitionContactComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu3.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_30.convertContactPoint(t)); } @@ -245,9 +235,8 @@ public class StructureDefinition10_30 { return null; org.hl7.fhir.dstu3.model.ContactDetail tgt = new org.hl7.fhir.dstu3.model.ContactDetail(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_30.convertContactPoint(t)); } @@ -319,17 +308,14 @@ public class StructureDefinition10_30 { return null; org.hl7.fhir.dstu2.model.StructureDefinition.StructureDefinitionMappingComponent tgt = new org.hl7.fhir.dstu2.model.StructureDefinition.StructureDefinitionMappingComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasIdentity()) { - tgt.setIdentity(src.getIdentity()); - } - if (src.hasUri()) { - tgt.setUri(src.getUri()); - } - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasComment()) { - tgt.setComments(src.getComment()); + if (src.hasIdentityElement()) + tgt.setIdentityElement((org.hl7.fhir.dstu2.model.IdType) VersionConvertor_10_30.convertType(src.getIdentityElement())); + if (src.hasUriElement()) + tgt.setUriElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_30.convertType(src.getUriElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getNameElement())); + if (src.hasCommentElement()) { + tgt.setCommentsElement((StringType) VersionConvertor_10_30.convertType(src.getCommentElement())); } return tgt; } @@ -339,17 +325,14 @@ public class StructureDefinition10_30 { return null; org.hl7.fhir.dstu3.model.StructureDefinition.StructureDefinitionMappingComponent tgt = new org.hl7.fhir.dstu3.model.StructureDefinition.StructureDefinitionMappingComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasIdentity()) { - tgt.setIdentity(src.getIdentity()); - } - if (src.hasUri()) { - tgt.setUri(src.getUri()); - } - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasComments()) { - tgt.setComment(src.getComments()); + if (src.hasIdentityElement()) + tgt.setIdentityElement((org.hl7.fhir.dstu3.model.IdType) VersionConvertor_10_30.convertType(src.getIdentityElement())); + if (src.hasUriElement()) + tgt.setUriElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_10_30.convertType(src.getUriElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getNameElement())); + if (src.hasCommentsElement()) { + tgt.setCommentElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getCommentsElement())); } return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Subscription10_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Subscription10_30.java index ada80c4cf..b751a5f8c 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Subscription10_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Subscription10_30.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_30; import org.hl7.fhir.convertors.VersionConvertor_10_30; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Subscription10_30 { @@ -10,27 +11,23 @@ public class Subscription10_30 { return null; org.hl7.fhir.dstu3.model.Subscription tgt = new org.hl7.fhir.dstu3.model.Subscription(); VersionConvertor_10_30.copyDomainResource(src, tgt); - if (src.hasCriteria()) { - tgt.setCriteria(src.getCriteria()); - } + if (src.hasCriteriaElement()) + tgt.setCriteriaElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getCriteriaElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getContact()) tgt.addContact(VersionConvertor_10_30.convertContactPoint(t)); } - if (src.hasReason()) { - tgt.setReason(src.getReason()); - } + if (src.hasReasonElement()) + tgt.setReasonElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getReasonElement())); if (src.hasStatus()) { tgt.setStatus(convertSubscriptionStatus(src.getStatus())); } - if (src.hasError()) { - tgt.setError(src.getError()); - } + if (src.hasErrorElement()) + tgt.setErrorElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getErrorElement())); if (src.hasChannel()) { tgt.setChannel(convertSubscriptionChannelComponent(src.getChannel())); } - if (src.hasEnd()) { - tgt.setEnd(src.getEnd()); - } + if (src.hasEndElement()) + tgt.setEndElement((org.hl7.fhir.dstu3.model.InstantType) VersionConvertor_10_30.convertType(src.getEndElement())); if (src.hasTag()) { for (org.hl7.fhir.dstu2.model.Coding t : src.getTag()) tgt.addTag(VersionConvertor_10_30.convertCoding(t)); } @@ -42,27 +39,23 @@ public class Subscription10_30 { return null; org.hl7.fhir.dstu2.model.Subscription tgt = new org.hl7.fhir.dstu2.model.Subscription(); VersionConvertor_10_30.copyDomainResource(src, tgt); - if (src.hasCriteria()) { - tgt.setCriteria(src.getCriteria()); - } + if (src.hasCriteriaElement()) + tgt.setCriteriaElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getCriteriaElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu3.model.ContactPoint t : src.getContact()) tgt.addContact(VersionConvertor_10_30.convertContactPoint(t)); } - if (src.hasReason()) { - tgt.setReason(src.getReason()); - } + if (src.hasReasonElement()) + tgt.setReasonElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getReasonElement())); if (src.hasStatus()) { tgt.setStatus(convertSubscriptionStatus(src.getStatus())); } - if (src.hasError()) { - tgt.setError(src.getError()); - } + if (src.hasErrorElement()) + tgt.setErrorElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getErrorElement())); if (src.hasChannel()) { tgt.setChannel(convertSubscriptionChannelComponent(src.getChannel())); } - if (src.hasEnd()) { - tgt.setEnd(src.getEnd()); - } + if (src.hasEndElement()) + tgt.setEndElement((org.hl7.fhir.dstu2.model.InstantType) VersionConvertor_10_30.convertType(src.getEndElement())); if (src.hasTag()) { for (org.hl7.fhir.dstu3.model.Coding t : src.getTag()) tgt.addTag(VersionConvertor_10_30.convertCoding(t)); } @@ -77,12 +70,10 @@ public class Subscription10_30 { if (src.hasType()) { tgt.setType(convertSubscriptionChannelType(src.getType())); } - if (src.hasEndpoint()) { - tgt.setEndpoint(src.getEndpoint()); - } - if (src.hasPayload()) { - tgt.setPayload(src.getPayload()); - } + if (src.hasEndpointElement()) + tgt.setEndpointElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_30.convertType(src.getEndpointElement())); + if (src.hasPayloadElement()) + tgt.setPayloadElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getPayloadElement())); if (src.hasHeader()) tgt.setHeaderElement(VersionConvertor_10_30.convertString(src.getHeader().get(0))); return tgt; @@ -96,15 +87,12 @@ public class Subscription10_30 { if (src.hasType()) { tgt.setType(convertSubscriptionChannelType(src.getType())); } - if (src.hasEndpoint()) { - tgt.setEndpoint(src.getEndpoint()); - } - if (src.hasPayload()) { - tgt.setPayload(src.getPayload()); - } - if (src.hasHeader()) { - tgt.addHeader(src.getHeader()); - } + if (src.hasEndpointElement()) + tgt.setEndpointElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_10_30.convertType(src.getEndpointElement())); + if (src.hasPayloadElement()) + tgt.setPayloadElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getPayloadElement())); + if (src.hasHeaderElement()) + tgt.setHeader(Collections.singletonList((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getHeaderElement()))); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Substance10_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Substance10_30.java index 7a4d195c7..ebc3a493a 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Substance10_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/Substance10_30.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_30; import org.hl7.fhir.convertors.VersionConvertor_10_30; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Substance10_30 { @@ -19,9 +20,8 @@ public class Substance10_30 { if (src.hasCode()) { tgt.setCode(VersionConvertor_10_30.convertCodeableConcept(src.getCode())); } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getDescriptionElement())); if (src.hasInstance()) { for (org.hl7.fhir.dstu3.model.Substance.SubstanceInstanceComponent t : src.getInstance()) tgt.addInstance(convertSubstanceInstanceComponent(t)); } @@ -45,9 +45,8 @@ public class Substance10_30 { if (src.hasCode()) { tgt.setCode(VersionConvertor_10_30.convertCodeableConcept(src.getCode())); } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getDescriptionElement())); if (src.hasInstance()) { for (org.hl7.fhir.dstu2.model.Substance.SubstanceInstanceComponent t : src.getInstance()) tgt.addInstance(convertSubstanceInstanceComponent(t)); } @@ -90,9 +89,8 @@ public class Substance10_30 { if (src.hasIdentifier()) { tgt.setIdentifier(VersionConvertor_10_30.convertIdentifier(src.getIdentifier())); } - if (src.hasExpiry()) { - tgt.setExpiry(src.getExpiry()); - } + if (src.hasExpiryElement()) + tgt.setExpiryElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_10_30.convertType(src.getExpiryElement())); if (src.hasQuantity()) { tgt.setQuantity(VersionConvertor_10_30.convertSimpleQuantity(src.getQuantity())); } @@ -107,9 +105,8 @@ public class Substance10_30 { if (src.hasIdentifier()) { tgt.setIdentifier(VersionConvertor_10_30.convertIdentifier(src.getIdentifier())); } - if (src.hasExpiry()) { - tgt.setExpiry(src.getExpiry()); - } + if (src.hasExpiryElement()) + tgt.setExpiryElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_30.convertType(src.getExpiryElement())); if (src.hasQuantity()) { tgt.setQuantity(VersionConvertor_10_30.convertSimpleQuantity(src.getQuantity())); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/SupplyDelivery10_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/SupplyDelivery10_30.java index d3832c0f9..d42ef2d3d 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/SupplyDelivery10_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/SupplyDelivery10_30.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_30; import org.hl7.fhir.convertors.VersionConvertor_10_30; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class SupplyDelivery10_30 { diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/SupplyRequest10_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/SupplyRequest10_30.java index 01c88f3e1..20dd8a6db 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/SupplyRequest10_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/SupplyRequest10_30.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_30; import org.hl7.fhir.convertors.VersionConvertor_10_30; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class SupplyRequest10_30 { diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/TestScript10_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/TestScript10_30.java index 50e200bd3..22a892f92 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/TestScript10_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/TestScript10_30.java @@ -1,7 +1,13 @@ package org.hl7.fhir.convertors.conv10_30; import org.hl7.fhir.convertors.VersionConvertor_10_30; +import org.hl7.fhir.dstu2.model.BooleanType; +import org.hl7.fhir.dstu2.model.IdType; +import org.hl7.fhir.dstu2.model.IntegerType; +import org.hl7.fhir.dstu2.model.StringType; +import org.hl7.fhir.dstu3.model.MarkdownType; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class TestScript10_30 { @@ -186,57 +192,45 @@ public class TestScript10_30 { return null; org.hl7.fhir.dstu3.model.TestScript.SetupActionAssertComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.SetupActionAssertComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasLabel()) { - tgt.setLabel(src.getLabel()); - } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasLabelElement()) + tgt.setLabelElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getLabelElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getDescriptionElement())); if (src.hasDirection()) { tgt.setDirection(convertAssertionDirectionType(src.getDirection())); } - if (src.hasCompareToSourceId()) { - tgt.setCompareToSourceId(src.getCompareToSourceId()); - } - if (src.hasCompareToSourcePath()) { - tgt.setCompareToSourcePath(src.getCompareToSourcePath()); - } + if (src.hasCompareToSourceIdElement()) + tgt.setCompareToSourceIdElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getCompareToSourceIdElement())); + if (src.hasCompareToSourcePathElement()) + tgt.setCompareToSourcePathElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getCompareToSourcePathElement())); if (src.hasContentType()) { tgt.setContentType(convertContentType(src.getContentType())); } - if (src.hasHeaderField()) { - tgt.setHeaderField(src.getHeaderField()); - } - if (src.hasMinimumId()) { - tgt.setMinimumId(src.getMinimumId()); - } + if (src.hasHeaderFieldElement()) + tgt.setHeaderFieldElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getHeaderFieldElement())); + if (src.hasMinimumIdElement()) + tgt.setMinimumIdElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getMinimumIdElement())); if (src.hasNavigationLinks()) { tgt.setNavigationLinks(src.getNavigationLinks()); } if (src.hasOperator()) { tgt.setOperator(convertAssertionOperatorType(src.getOperator())); } - if (src.hasPath()) { - tgt.setPath(src.getPath()); - } - if (src.hasResource()) { - tgt.setResource(src.getResource()); - } + if (src.hasPathElement()) + tgt.setPathElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getPathElement())); + if (src.hasResourceElement()) + tgt.setResourceElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_10_30.convertType(src.getResourceElement())); if (src.hasResponse()) { tgt.setResponse(convertAssertionResponseTypes(src.getResponse())); } - if (src.hasResponseCode()) { - tgt.setResponseCode(src.getResponseCode()); - } - if (src.hasSourceId()) { - tgt.setSourceId(src.getSourceId()); - } - if (src.hasValidateProfileId()) { - tgt.setValidateProfileId(src.getValidateProfileId()); - } - if (src.hasValue()) { - tgt.setValue(src.getValue()); - } + if (src.hasResponseCodeElement()) + tgt.setResponseCodeElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getResponseCodeElement())); + if (src.hasSourceIdElement()) + tgt.setSourceIdElement((org.hl7.fhir.dstu3.model.IdType) VersionConvertor_10_30.convertType(src.getSourceIdElement())); + if (src.hasValidateProfileIdElement()) + tgt.setValidateProfileIdElement((org.hl7.fhir.dstu3.model.IdType) VersionConvertor_10_30.convertType(src.getValidateProfileIdElement())); + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getValueElement())); if (src.hasWarningOnly()) { tgt.setWarningOnly(src.getWarningOnly()); } @@ -248,57 +242,45 @@ public class TestScript10_30 { return null; org.hl7.fhir.dstu2.model.TestScript.TestScriptSetupActionAssertComponent tgt = new org.hl7.fhir.dstu2.model.TestScript.TestScriptSetupActionAssertComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasLabel()) { - tgt.setLabel(src.getLabel()); - } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasLabelElement()) + tgt.setLabelElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getLabelElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getDescriptionElement())); if (src.hasDirection()) { tgt.setDirection(convertAssertionDirectionType(src.getDirection())); } - if (src.hasCompareToSourceId()) { - tgt.setCompareToSourceId(src.getCompareToSourceId()); - } - if (src.hasCompareToSourcePath()) { - tgt.setCompareToSourcePath(src.getCompareToSourcePath()); - } + if (src.hasCompareToSourceIdElement()) + tgt.setCompareToSourceIdElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getCompareToSourceIdElement())); + if (src.hasCompareToSourcePathElement()) + tgt.setCompareToSourcePathElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getCompareToSourcePathElement())); if (src.hasContentType()) { tgt.setContentType(convertContentType(src.getContentType())); } - if (src.hasHeaderField()) { - tgt.setHeaderField(src.getHeaderField()); - } - if (src.hasMinimumId()) { - tgt.setMinimumId(src.getMinimumId()); - } + if (src.hasHeaderFieldElement()) + tgt.setHeaderFieldElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getHeaderFieldElement())); + if (src.hasMinimumIdElement()) + tgt.setMinimumIdElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getMinimumIdElement())); if (src.hasNavigationLinks()) { tgt.setNavigationLinks(src.getNavigationLinks()); } if (src.hasOperator()) { tgt.setOperator(convertAssertionOperatorType(src.getOperator())); } - if (src.hasPath()) { - tgt.setPath(src.getPath()); - } - if (src.hasResource()) { - tgt.setResource(src.getResource()); - } + if (src.hasPathElement()) + tgt.setPathElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getPathElement())); + if (src.hasResourceElement()) + tgt.setResourceElement((org.hl7.fhir.dstu2.model.CodeType) VersionConvertor_10_30.convertType(src.getResourceElement())); if (src.hasResponse()) { tgt.setResponse(convertAssertionResponseTypes(src.getResponse())); } - if (src.hasResponseCode()) { - tgt.setResponseCode(src.getResponseCode()); - } - if (src.hasSourceId()) { - tgt.setSourceId(src.getSourceId()); - } - if (src.hasValidateProfileId()) { - tgt.setValidateProfileId(src.getValidateProfileId()); - } - if (src.hasValue()) { - tgt.setValue(src.getValue()); - } + if (src.hasResponseCodeElement()) + tgt.setResponseCodeElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getResponseCodeElement())); + if (src.hasSourceIdElement()) + tgt.setSourceIdElement((org.hl7.fhir.dstu2.model.IdType) VersionConvertor_10_30.convertType(src.getSourceIdElement())); + if (src.hasValidateProfileIdElement()) + tgt.setValidateProfileIdElement((org.hl7.fhir.dstu2.model.IdType) VersionConvertor_10_30.convertType(src.getValidateProfileIdElement())); + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getValueElement())); if (src.hasWarningOnly()) { tgt.setWarningOnly(src.getWarningOnly()); } @@ -341,45 +323,38 @@ public class TestScript10_30 { if (src.hasType()) { tgt.setType(VersionConvertor_10_30.convertCoding(src.getType())); } - if (src.hasResource()) { - tgt.setResource(src.getResource()); - } - if (src.hasLabel()) { - tgt.setLabel(src.getLabel()); - } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasResourceElement()) + tgt.setResourceElement((org.hl7.fhir.dstu2.model.CodeType) VersionConvertor_10_30.convertType(src.getResourceElement())); + if (src.hasLabelElement()) + tgt.setLabelElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getLabelElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getDescriptionElement())); if (src.hasAccept()) { tgt.setAccept(convertContentType(src.getAccept())); } if (src.hasContentType()) { tgt.setContentType(convertContentType(src.getContentType())); } - if (src.hasDestination()) { - tgt.setDestination(src.getDestination()); + if (src.hasDestinationElement()) { + tgt.setDestinationElement((IntegerType) VersionConvertor_10_30.convertType(src.getDestinationElement())); } - if (src.hasEncodeRequestUrl()) { - tgt.setEncodeRequestUrl(src.getEncodeRequestUrl()); - } - if (src.hasParams()) { - tgt.setParams(src.getParams()); + if (src.hasEncodeRequestUrlElement()) { + tgt.setEncodeRequestUrlElement((BooleanType) VersionConvertor_10_30.convertType(src.getEncodeRequestUrlElement())); } + if (src.hasParamsElement()) + tgt.setParamsElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getParamsElement())); if (src.hasRequestHeader()) { for (org.hl7.fhir.dstu3.model.TestScript.SetupActionOperationRequestHeaderComponent t : src.getRequestHeader()) tgt.addRequestHeader(convertSetupActionOperationRequestHeaderComponent(t)); } - if (src.hasResponseId()) { - tgt.setResponseId(src.getResponseId()); - } - if (src.hasSourceId()) { - tgt.setSourceId(src.getSourceId()); - } - if (src.hasTargetId()) { - tgt.setTargetId(src.getTargetId()); - } - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); + if (src.hasResponseIdElement()) + tgt.setResponseIdElement((org.hl7.fhir.dstu2.model.IdType) VersionConvertor_10_30.convertType(src.getResponseIdElement())); + if (src.hasSourceIdElement()) + tgt.setSourceIdElement((org.hl7.fhir.dstu2.model.IdType) VersionConvertor_10_30.convertType(src.getSourceIdElement())); + if (src.hasTargetIdElement()) { + tgt.setTargetIdElement((IdType) VersionConvertor_10_30.convertType(src.getTargetIdElement())); } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getUrlElement())); return tgt; } @@ -391,45 +366,38 @@ public class TestScript10_30 { if (src.hasType()) { tgt.setType(VersionConvertor_10_30.convertCoding(src.getType())); } - if (src.hasResource()) { - tgt.setResource(src.getResource()); - } - if (src.hasLabel()) { - tgt.setLabel(src.getLabel()); - } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasResourceElement()) + tgt.setResourceElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_10_30.convertType(src.getResourceElement())); + if (src.hasLabelElement()) + tgt.setLabelElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getLabelElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getDescriptionElement())); if (src.hasAccept()) { tgt.setAccept(convertContentType(src.getAccept())); } if (src.hasContentType()) { tgt.setContentType(convertContentType(src.getContentType())); } - if (src.hasDestination()) { - tgt.setDestination(src.getDestination()); + if (src.hasDestinationElement()) { + tgt.setDestinationElement((org.hl7.fhir.dstu3.model.IntegerType) VersionConvertor_10_30.convertType(src.getDestinationElement())); } - if (src.hasEncodeRequestUrl()) { - tgt.setEncodeRequestUrl(src.getEncodeRequestUrl()); - } - if (src.hasParams()) { - tgt.setParams(src.getParams()); + if (src.hasEncodeRequestUrlElement()) { + tgt.setEncodeRequestUrlElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_10_30.convertType(src.getEncodeRequestUrlElement())); } + if (src.hasParamsElement()) + tgt.setParamsElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getParamsElement())); if (src.hasRequestHeader()) { for (org.hl7.fhir.dstu2.model.TestScript.TestScriptSetupActionOperationRequestHeaderComponent t : src.getRequestHeader()) tgt.addRequestHeader(convertSetupActionOperationRequestHeaderComponent(t)); } - if (src.hasResponseId()) { - tgt.setResponseId(src.getResponseId()); - } - if (src.hasSourceId()) { - tgt.setSourceId(src.getSourceId()); - } - if (src.hasTargetId()) { - tgt.setTargetId(src.getTargetId()); - } - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); + if (src.hasResponseIdElement()) + tgt.setResponseIdElement((org.hl7.fhir.dstu3.model.IdType) VersionConvertor_10_30.convertType(src.getResponseIdElement())); + if (src.hasSourceIdElement()) + tgt.setSourceIdElement((org.hl7.fhir.dstu3.model.IdType) VersionConvertor_10_30.convertType(src.getSourceIdElement())); + if (src.hasTargetIdElement()) { + tgt.setTargetIdElement((org.hl7.fhir.dstu3.model.IdType) VersionConvertor_10_30.convertType(src.getTargetIdElement())); } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getUrlElement())); return tgt; } @@ -438,12 +406,10 @@ public class TestScript10_30 { return null; org.hl7.fhir.dstu3.model.TestScript.SetupActionOperationRequestHeaderComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.SetupActionOperationRequestHeaderComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasField()) { - tgt.setField(src.getField()); - } - if (src.hasValue()) { - tgt.setValue(src.getValue()); - } + if (src.hasFieldElement()) + tgt.setFieldElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getFieldElement())); + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getValueElement())); return tgt; } @@ -452,12 +418,10 @@ public class TestScript10_30 { return null; org.hl7.fhir.dstu2.model.TestScript.TestScriptSetupActionOperationRequestHeaderComponent tgt = new org.hl7.fhir.dstu2.model.TestScript.TestScriptSetupActionOperationRequestHeaderComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasField()) { - tgt.setField(src.getField()); - } - if (src.hasValue()) { - tgt.setValue(src.getValue()); - } + if (src.hasFieldElement()) + tgt.setFieldElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getFieldElement())); + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getValueElement())); return tgt; } @@ -516,34 +480,29 @@ public class TestScript10_30 { return null; org.hl7.fhir.dstu2.model.TestScript tgt = new org.hl7.fhir.dstu2.model.TestScript(); VersionConvertor_10_30.copyDomainResource(src, tgt); - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } - if (src.hasVersion()) { - tgt.setVersion(src.getVersion()); - } - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_30.convertType(src.getUrlElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_10_30.convertConformanceResourceStatus(src.getStatus())); } if (src.hasIdentifier()) { tgt.setIdentifier(VersionConvertor_10_30.convertIdentifier(src.getIdentifier())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasPublisher()) { - tgt.setPublisher(src.getPublisher()); - } + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((BooleanType) VersionConvertor_10_30.convertType(src.getExperimentalElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) tgt.addContact(convertTestScriptContactComponent(t)); } - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_30.convertType(src.getDateElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getDescriptionElement())); for (org.hl7.fhir.dstu3.model.UsageContext t : src.getUseContext()) if (t.hasValueCodeableConcept()) tgt.addUseContext(VersionConvertor_10_30.convertCodeableConcept(t.getValueCodeableConcept())); if (src.hasJurisdiction()) { @@ -552,9 +511,8 @@ public class TestScript10_30 { if (src.hasPurpose()) { tgt.setRequirements(src.getPurpose()); } - if (src.hasCopyright()) { - tgt.setCopyright(src.getCopyright()); - } + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getCopyrightElement())); if (src.hasMetadata()) { tgt.setMetadata(convertTestScriptMetadataComponent(src.getMetadata())); } @@ -584,34 +542,29 @@ public class TestScript10_30 { return null; org.hl7.fhir.dstu3.model.TestScript tgt = new org.hl7.fhir.dstu3.model.TestScript(); VersionConvertor_10_30.copyDomainResource(src, tgt); - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } - if (src.hasVersion()) { - tgt.setVersion(src.getVersion()); - } - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_10_30.convertType(src.getUrlElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_10_30.convertConformanceResourceStatus(src.getStatus())); } if (src.hasIdentifier()) { tgt.setIdentifier(VersionConvertor_10_30.convertIdentifier(src.getIdentifier())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasPublisher()) { - tgt.setPublisher(src.getPublisher()); - } + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_10_30.convertType(src.getExperimentalElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu2.model.TestScript.TestScriptContactComponent t : src.getContact()) tgt.addContact(convertTestScriptContactComponent(t)); } - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_10_30.convertType(src.getDateElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_10_30.convertType(src.getDescriptionElement())); for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getUseContext()) if (VersionConvertor_10_30.isJurisdiction(t)) tgt.addJurisdiction(VersionConvertor_10_30.convertCodeableConcept(t)); else @@ -619,9 +572,8 @@ public class TestScript10_30 { if (src.hasRequirements()) { tgt.setPurpose(src.getRequirements()); } - if (src.hasCopyright()) { - tgt.setCopyright(src.getCopyright()); - } + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_10_30.convertType(src.getCopyrightElement())); if (src.hasMetadata()) { tgt.setMetadata(convertTestScriptMetadataComponent(src.getMetadata())); } @@ -651,9 +603,8 @@ public class TestScript10_30 { return null; org.hl7.fhir.dstu3.model.ContactDetail tgt = new org.hl7.fhir.dstu3.model.ContactDetail(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_30.convertContactPoint(t)); } @@ -665,9 +616,8 @@ public class TestScript10_30 { return null; org.hl7.fhir.dstu2.model.TestScript.TestScriptContactComponent tgt = new org.hl7.fhir.dstu2.model.TestScript.TestScriptContactComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu3.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_30.convertContactPoint(t)); } @@ -679,11 +629,11 @@ public class TestScript10_30 { return null; org.hl7.fhir.dstu3.model.TestScript.TestScriptFixtureComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.TestScriptFixtureComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasAutocreate()) { - tgt.setAutocreate(src.getAutocreate()); + if (src.hasAutocreateElement()) { + tgt.setAutocreateElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_10_30.convertType(src.getAutocreateElement())); } - if (src.hasAutodelete()) { - tgt.setAutodelete(src.getAutodelete()); + if (src.hasAutodeleteElement()) { + tgt.setAutodeleteElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_10_30.convertType(src.getAutodeleteElement())); } if (src.hasResource()) { tgt.setResource(VersionConvertor_10_30.convertReference(src.getResource())); @@ -696,11 +646,11 @@ public class TestScript10_30 { return null; org.hl7.fhir.dstu2.model.TestScript.TestScriptFixtureComponent tgt = new org.hl7.fhir.dstu2.model.TestScript.TestScriptFixtureComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasAutocreate()) { - tgt.setAutocreate(src.getAutocreate()); + if (src.hasAutocreateElement()) { + tgt.setAutocreateElement((BooleanType) VersionConvertor_10_30.convertType(src.getAutocreateElement())); } - if (src.hasAutodelete()) { - tgt.setAutodelete(src.getAutodelete()); + if (src.hasAutodeleteElement()) { + tgt.setAutodeleteElement((BooleanType) VersionConvertor_10_30.convertType(src.getAutodeleteElement())); } if (src.hasResource()) { tgt.setResource(VersionConvertor_10_30.convertReference(src.getResource())); @@ -713,17 +663,16 @@ public class TestScript10_30 { return null; org.hl7.fhir.dstu2.model.TestScript.TestScriptMetadataCapabilityComponent tgt = new org.hl7.fhir.dstu2.model.TestScript.TestScriptMetadataCapabilityComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasRequired()) { - tgt.setRequired(src.getRequired()); + if (src.hasRequiredElement()) { + tgt.setRequiredElement((BooleanType) VersionConvertor_10_30.convertType(src.getRequiredElement())); } - if (src.hasValidated()) { - tgt.setValidated(src.getValidated()); + if (src.hasValidatedElement()) { + tgt.setValidatedElement((BooleanType) VersionConvertor_10_30.convertType(src.getValidatedElement())); } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } - if (src.hasDestination()) { - tgt.setDestination(src.getDestination()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getDescriptionElement())); + if (src.hasDestinationElement()) { + tgt.setDestinationElement((IntegerType) VersionConvertor_10_30.convertType(src.getDestinationElement())); } if (src.hasLink()) { for (org.hl7.fhir.dstu3.model.UriType t : src.getLink()) tgt.addLink(t.getValue()); @@ -739,17 +688,16 @@ public class TestScript10_30 { return null; org.hl7.fhir.dstu3.model.TestScript.TestScriptMetadataCapabilityComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.TestScriptMetadataCapabilityComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasRequired()) { - tgt.setRequired(src.getRequired()); + if (src.hasRequiredElement()) { + tgt.setRequiredElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_10_30.convertType(src.getRequiredElement())); } - if (src.hasValidated()) { - tgt.setValidated(src.getValidated()); + if (src.hasValidatedElement()) { + tgt.setValidatedElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_10_30.convertType(src.getValidatedElement())); } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } - if (src.hasDestination()) { - tgt.setDestination(src.getDestination()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getDescriptionElement())); + if (src.hasDestinationElement()) { + tgt.setDestinationElement((org.hl7.fhir.dstu3.model.IntegerType) VersionConvertor_10_30.convertType(src.getDestinationElement())); } if (src.hasLink()) { for (org.hl7.fhir.dstu2.model.UriType t : src.getLink()) tgt.addLink(t.getValue()); @@ -793,12 +741,10 @@ public class TestScript10_30 { return null; org.hl7.fhir.dstu3.model.TestScript.TestScriptMetadataLinkComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.TestScriptMetadataLinkComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_10_30.convertType(src.getUrlElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getDescriptionElement())); return tgt; } @@ -807,12 +753,10 @@ public class TestScript10_30 { return null; org.hl7.fhir.dstu2.model.TestScript.TestScriptMetadataLinkComponent tgt = new org.hl7.fhir.dstu2.model.TestScript.TestScriptMetadataLinkComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_30.convertType(src.getUrlElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getDescriptionElement())); return tgt; } @@ -865,12 +809,10 @@ public class TestScript10_30 { return null; org.hl7.fhir.dstu3.model.TestScript.TestScriptTestComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.TestScriptTestComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getNameElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getDescriptionElement())); if (src.hasAction()) { for (org.hl7.fhir.dstu2.model.TestScript.TestScriptTestActionComponent t : src.getAction()) tgt.addAction(convertTestActionComponent(t)); } @@ -882,12 +824,10 @@ public class TestScript10_30 { return null; org.hl7.fhir.dstu2.model.TestScript.TestScriptTestComponent tgt = new org.hl7.fhir.dstu2.model.TestScript.TestScriptTestComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getNameElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getDescriptionElement())); if (src.hasAction()) { for (org.hl7.fhir.dstu3.model.TestScript.TestActionComponent t : src.getAction()) tgt.addAction(convertTestActionComponent(t)); } @@ -899,18 +839,14 @@ public class TestScript10_30 { return null; org.hl7.fhir.dstu3.model.TestScript.TestScriptVariableComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.TestScriptVariableComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasHeaderField()) { - tgt.setHeaderField(src.getHeaderField()); - } - if (src.hasPath()) { - tgt.setPath(src.getPath()); - } - if (src.hasSourceId()) { - tgt.setSourceId(src.getSourceId()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getNameElement())); + if (src.hasHeaderFieldElement()) + tgt.setHeaderFieldElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getHeaderFieldElement())); + if (src.hasPathElement()) + tgt.setPathElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getPathElement())); + if (src.hasSourceIdElement()) + tgt.setSourceIdElement((org.hl7.fhir.dstu3.model.IdType) VersionConvertor_10_30.convertType(src.getSourceIdElement())); return tgt; } @@ -919,18 +855,14 @@ public class TestScript10_30 { return null; org.hl7.fhir.dstu2.model.TestScript.TestScriptVariableComponent tgt = new org.hl7.fhir.dstu2.model.TestScript.TestScriptVariableComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasHeaderField()) { - tgt.setHeaderField(src.getHeaderField()); - } - if (src.hasPath()) { - tgt.setPath(src.getPath()); - } - if (src.hasSourceId()) { - tgt.setSourceId(src.getSourceId()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getNameElement())); + if (src.hasHeaderFieldElement()) + tgt.setHeaderFieldElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getHeaderFieldElement())); + if (src.hasPathElement()) + tgt.setPathElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getPathElement())); + if (src.hasSourceIdElement()) + tgt.setSourceIdElement((org.hl7.fhir.dstu2.model.IdType) VersionConvertor_10_30.convertType(src.getSourceIdElement())); return tgt; } } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/ValueSet10_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/ValueSet10_30.java index 46d783b98..62c36a6a5 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/ValueSet10_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/ValueSet10_30.java @@ -2,12 +2,13 @@ package org.hl7.fhir.convertors.conv10_30; import org.hl7.fhir.convertors.VersionConvertorAdvisor30; import org.hl7.fhir.convertors.VersionConvertor_10_30; -import org.hl7.fhir.dstu3.model.CodeSystem; +import org.hl7.fhir.dstu3.model.*; import org.hl7.fhir.dstu3.model.CodeSystem.CodeSystemContentMode; import org.hl7.fhir.dstu3.model.CodeSystem.ConceptDefinitionComponent; import org.hl7.fhir.dstu3.terminologies.CodeSystemUtilities; import org.hl7.fhir.exceptions.FHIRException; import java.util.List; +import java.util.Collections; public class ValueSet10_30 { @@ -16,12 +17,10 @@ public class ValueSet10_30 { return null; org.hl7.fhir.dstu2.model.ValueSet.ConceptReferenceComponent tgt = new org.hl7.fhir.dstu2.model.ValueSet.ConceptReferenceComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasCode()) { - tgt.setCode(src.getCode()); - } - if (src.hasDisplay()) { - tgt.setDisplay(src.getDisplay()); - } + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu2.model.CodeType) VersionConvertor_10_30.convertType(src.getCodeElement())); + if (src.hasDisplayElement()) + tgt.setDisplayElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getDisplayElement())); if (src.hasDesignation()) { for (org.hl7.fhir.dstu3.model.ValueSet.ConceptReferenceDesignationComponent t : src.getDesignation()) tgt.addDesignation(convertConceptReferenceDesignationComponent(t)); } @@ -33,12 +32,10 @@ public class ValueSet10_30 { return null; org.hl7.fhir.dstu3.model.ValueSet.ConceptReferenceComponent tgt = new org.hl7.fhir.dstu3.model.ValueSet.ConceptReferenceComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasCode()) { - tgt.setCode(src.getCode()); - } - if (src.hasDisplay()) { - tgt.setDisplay(src.getDisplay()); - } + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_10_30.convertType(src.getCodeElement())); + if (src.hasDisplayElement()) + tgt.setDisplayElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getDisplayElement())); if (src.hasDesignation()) { for (org.hl7.fhir.dstu2.model.ValueSet.ConceptDefinitionDesignationComponent t : src.getDesignation()) tgt.addDesignation(convertConceptReferenceDesignationComponent(t)); } @@ -50,15 +47,13 @@ public class ValueSet10_30 { return null; org.hl7.fhir.dstu3.model.ValueSet.ConceptReferenceDesignationComponent tgt = new org.hl7.fhir.dstu3.model.ValueSet.ConceptReferenceDesignationComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasLanguage()) { - tgt.setLanguage(src.getLanguage()); - } + if (src.hasLanguageElement()) + tgt.setLanguageElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_10_30.convertType(src.getLanguageElement())); if (src.hasUse()) { tgt.setUse(VersionConvertor_10_30.convertCoding(src.getUse())); } - if (src.hasValue()) { - tgt.setValue(src.getValue()); - } + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getValueElement())); return tgt; } @@ -67,15 +62,13 @@ public class ValueSet10_30 { return null; org.hl7.fhir.dstu2.model.ValueSet.ConceptDefinitionDesignationComponent tgt = new org.hl7.fhir.dstu2.model.ValueSet.ConceptDefinitionDesignationComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasLanguage()) { - tgt.setLanguage(src.getLanguage()); - } + if (src.hasLanguageElement()) + tgt.setLanguageElement((org.hl7.fhir.dstu2.model.CodeType) VersionConvertor_10_30.convertType(src.getLanguageElement())); if (src.hasUse()) { tgt.setUse(VersionConvertor_10_30.convertCoding(src.getUse())); } - if (src.hasValue()) { - tgt.setValue(src.getValue()); - } + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getValueElement())); return tgt; } @@ -84,12 +77,10 @@ public class ValueSet10_30 { return null; org.hl7.fhir.dstu2.model.ValueSet.ConceptSetComponent tgt = new org.hl7.fhir.dstu2.model.ValueSet.ConceptSetComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasSystem()) { - tgt.setSystem(src.getSystem()); - } - if (src.hasVersion()) { - tgt.setVersion(src.getVersion()); - } + if (src.hasSystemElement()) + tgt.setSystemElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_30.convertType(src.getSystemElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getVersionElement())); if (src.hasConcept()) { for (org.hl7.fhir.dstu3.model.ValueSet.ConceptReferenceComponent t : src.getConcept()) tgt.addConcept(convertConceptReferenceComponent(t)); } @@ -104,12 +95,10 @@ public class ValueSet10_30 { return null; org.hl7.fhir.dstu3.model.ValueSet.ConceptSetComponent tgt = new org.hl7.fhir.dstu3.model.ValueSet.ConceptSetComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasSystem()) { - tgt.setSystem(src.getSystem()); - } - if (src.hasVersion()) { - tgt.setVersion(src.getVersion()); - } + if (src.hasSystemElement()) + tgt.setSystemElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_10_30.convertType(src.getSystemElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getVersionElement())); if (src.hasConcept()) { for (org.hl7.fhir.dstu2.model.ValueSet.ConceptReferenceComponent t : src.getConcept()) tgt.addConcept(convertConceptReferenceComponent(t)); } @@ -124,15 +113,13 @@ public class ValueSet10_30 { return null; org.hl7.fhir.dstu3.model.ValueSet.ConceptSetFilterComponent tgt = new org.hl7.fhir.dstu3.model.ValueSet.ConceptSetFilterComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasProperty()) { - tgt.setProperty(src.getProperty()); - } + if (src.hasPropertyElement()) + tgt.setPropertyElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_10_30.convertType(src.getPropertyElement())); if (src.hasOp()) { tgt.setOp(convertFilterOperator(src.getOp())); } - if (src.hasValue()) { - tgt.setValue(src.getValue()); - } + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_10_30.convertType(src.getValueElement())); return tgt; } @@ -141,15 +128,13 @@ public class ValueSet10_30 { return null; org.hl7.fhir.dstu2.model.ValueSet.ConceptSetFilterComponent tgt = new org.hl7.fhir.dstu2.model.ValueSet.ConceptSetFilterComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasProperty()) { - tgt.setProperty(src.getProperty()); - } + if (src.hasPropertyElement()) + tgt.setPropertyElement((org.hl7.fhir.dstu2.model.CodeType) VersionConvertor_10_30.convertType(src.getPropertyElement())); if (src.hasOp()) { tgt.setOp(convertFilterOperator(src.getOp())); } - if (src.hasValue()) { - tgt.setValue(src.getValue()); - } + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.dstu2.model.CodeType) VersionConvertor_10_30.convertType(src.getValueElement())); return tgt; } @@ -200,47 +185,41 @@ public class ValueSet10_30 { return null; org.hl7.fhir.dstu3.model.ValueSet tgt = new org.hl7.fhir.dstu3.model.ValueSet(); VersionConvertor_10_30.copyDomainResource(src, tgt); - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_10_30.convertType(src.getUrlElement())); if (src.hasIdentifier()) { tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(src.getIdentifier())); } - if (src.hasVersion()) { - tgt.setVersion(src.getVersion()); - } - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_10_30.convertConformanceResourceStatus(src.getStatus())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasPublisher()) { - tgt.setPublisher(src.getPublisher()); - } + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((BooleanType) VersionConvertor_10_30.convertType(src.getExperimentalElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu2.model.ValueSet.ValueSetContactComponent t : src.getContact()) tgt.addContact(convertValueSetContactComponent(t)); } - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_10_30.convertType(src.getDateElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_10_30.convertType(src.getDescriptionElement())); for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getUseContext()) if (VersionConvertor_10_30.isJurisdiction(t)) tgt.addJurisdiction(VersionConvertor_10_30.convertCodeableConcept(t)); else tgt.addUseContext(VersionConvertor_10_30.convertCodeableConceptToUsageContext(t)); - if (src.hasImmutable()) { - tgt.setImmutable(src.getImmutable()); + if (src.hasImmutableElement()) { + tgt.setImmutableElement((BooleanType) VersionConvertor_10_30.convertType(src.getImmutableElement())); } - if (src.hasRequirements()) { - tgt.setPurpose(src.getRequirements()); - } - if (src.hasCopyright()) { - tgt.setCopyright(src.getCopyright()); + if (src.hasRequirementsElement()) { + tgt.setPurposeElement((MarkdownType) VersionConvertor_10_30.convertType(src.getRequirementsElement())); } + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_10_30.convertType(src.getCopyrightElement())); if (src.hasExtensible()) { tgt.setExtensible(src.getExtensible()); } @@ -248,8 +227,8 @@ public class ValueSet10_30 { if (src.hasCompose()) { tgt.setCompose(convertValueSetComposeComponent(src.getCompose())); } - if (src.hasLockedDate()) { - tgt.getCompose().setLockedDate(src.getLockedDate()); + if (src.hasLockedDateElement()) { + tgt.getCompose().setLockedDateElement((DateType) VersionConvertor_10_30.convertType(src.getLockedDateElement())); } } if (src.hasCodeSystem() && advisor != null) { @@ -270,18 +249,18 @@ public class ValueSet10_30 { if (src.hasStatus()) { tgtcs.setStatus(VersionConvertor_10_30.convertConformanceResourceStatus(src.getStatus())); } - if (src.hasExperimental()) - tgtcs.setExperimental(src.getExperimental()); - if (src.hasPublisher()) { - tgtcs.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgtcs.setExperimentalElement((BooleanType) VersionConvertor_10_30.convertType(src.getExperimentalElement())); + if (src.hasPublisherElement()) { + tgtcs.setPublisherElement((StringType) VersionConvertor_10_30.convertType(src.getPublisherElement())); } if (src.hasContact()) { for (org.hl7.fhir.dstu2.model.ValueSet.ValueSetContactComponent t : src.getContact()) tgtcs.addContact(convertValueSetContactComponent(t)); } - if (src.hasDate()) - tgtcs.setDate(src.getDate()); - if (src.hasDescription()) { - tgtcs.setDescription(src.getDescription()); + if (src.hasDateElement()) + tgtcs.setDateElement((DateTimeType) VersionConvertor_10_30.convertType(src.getDateElement())); + if (src.hasDescriptionElement()) { + tgtcs.setDescriptionElement((MarkdownType) VersionConvertor_10_30.convertType(src.getDescriptionElement())); } for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getUseContext()) if (VersionConvertor_10_30.isJurisdiction(t)) tgtcs.addJurisdiction(VersionConvertor_10_30.convertCodeableConcept(t)); @@ -290,8 +269,8 @@ public class ValueSet10_30 { if (src.hasRequirements()) { tgtcs.setPurpose(src.getRequirements()); } - if (src.hasCopyright()) { - tgtcs.setCopyright(src.getCopyright()); + if (src.hasCopyrightElement()) { + tgtcs.setCopyrightElement((MarkdownType) VersionConvertor_10_30.convertType(src.getCopyrightElement())); } tgtcs.setContent(CodeSystemContentMode.COMPLETE); if (src.hasCodeSystem()) { @@ -317,31 +296,31 @@ public class ValueSet10_30 { VersionConvertor_10_30.copyDomainResource(src, tgt); tgt.setUrl(src.getUrl()); for (org.hl7.fhir.dstu3.model.Identifier i : src.getIdentifier()) tgt.setIdentifier(VersionConvertor_10_30.convertIdentifier(i)); - tgt.setVersion(src.getVersion()); - tgt.setName(src.getName()); + tgt.setVersionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getVersionElement())); + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getNameElement())); tgt.setStatus(VersionConvertor_10_30.convertConformanceResourceStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_30.convertType(src.getExperimentalElement())); + tgt.setPublisherElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getPublisherElement())); for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) tgt.addContact(convertValueSetContactComponent(t)); - if (src.hasDate()) - tgt.setDate(src.getDate()); - tgt.setLockedDate(src.getCompose().getLockedDate()); - tgt.setDescription(src.getDescription()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_30.convertType(src.getDateElement())); + tgt.setLockedDateElement((org.hl7.fhir.dstu2.model.DateType) VersionConvertor_10_30.convertType(src.getCompose().getLockedDateElement())); + tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getDescriptionElement())); for (org.hl7.fhir.dstu3.model.UsageContext t : src.getUseContext()) if (t.hasValueCodeableConcept()) tgt.addUseContext(VersionConvertor_10_30.convertCodeableConcept(t.getValueCodeableConcept())); for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getJurisdiction()) tgt.addUseContext(VersionConvertor_10_30.convertCodeableConcept(t)); - tgt.setImmutable(src.getImmutable()); - tgt.setRequirements(src.getPurpose()); - tgt.setCopyright(src.getCopyright()); - tgt.setExtensible(src.getExtensible()); + tgt.setImmutableElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_30.convertType(src.getImmutableElement())); + tgt.setRequirementsElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getPurposeElement())); + tgt.setCopyrightElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getCopyrightElement())); + tgt.setExtensibleElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_30.convertType(src.getExtensibleElement())); org.hl7.fhir.dstu3.model.CodeSystem srcCS = (CodeSystem) src.getUserData("r2-cs"); if (srcCS == null) srcCS = advisor.getCodeSystem(src); if (srcCS != null) { - tgt.getCodeSystem().setSystem(srcCS.getUrl()); - tgt.getCodeSystem().setVersion(srcCS.getVersion()); - tgt.getCodeSystem().setCaseSensitive(srcCS.getCaseSensitive()); + tgt.getCodeSystem().setSystemElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_30.convertType(srcCS.getUrlElement())); + tgt.getCodeSystem().setVersionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(srcCS.getVersionElement())); + tgt.getCodeSystem().setCaseSensitiveElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_30.convertType(srcCS.getCaseSensitiveElement())); for (org.hl7.fhir.dstu3.model.CodeSystem.ConceptDefinitionComponent cs : srcCS.getConcept()) processConcept(tgt.getCodeSystem().getConcept(), cs, srcCS); } tgt.setCompose(convertValueSetComposeComponent(src.getCompose(), srcCS == null ? null : srcCS.getUrl())); @@ -395,9 +374,8 @@ public class ValueSet10_30 { return null; org.hl7.fhir.dstu2.model.ValueSet.ValueSetContactComponent tgt = new org.hl7.fhir.dstu2.model.ValueSet.ValueSetContactComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu3.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_30.convertContactPoint(t)); } @@ -409,9 +387,8 @@ public class ValueSet10_30 { return null; org.hl7.fhir.dstu3.model.ContactDetail tgt = new org.hl7.fhir.dstu3.model.ContactDetail(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_30.convertContactPoint(t)); } @@ -423,17 +400,15 @@ public class ValueSet10_30 { return null; org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionComponent tgt = new org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasIdentifier()) { - tgt.setIdentifier(src.getIdentifier()); + if (src.hasIdentifierElement()) + tgt.setIdentifierElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_10_30.convertType(src.getIdentifierElement())); + if (src.hasTimestampElement()) + tgt.setTimestampElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_10_30.convertType(src.getTimestampElement())); + if (src.hasTotalElement()) { + tgt.setTotalElement((IntegerType) VersionConvertor_10_30.convertType(src.getTotalElement())); } - if (src.hasTimestamp()) { - tgt.setTimestamp(src.getTimestamp()); - } - if (src.hasTotal()) { - tgt.setTotal(src.getTotal()); - } - if (src.hasOffset()) { - tgt.setOffset(src.getOffset()); + if (src.hasOffsetElement()) { + tgt.setOffsetElement((IntegerType) VersionConvertor_10_30.convertType(src.getOffsetElement())); } if (src.hasParameter()) { for (org.hl7.fhir.dstu2.model.ValueSet.ValueSetExpansionParameterComponent t : src.getParameter()) tgt.addParameter(convertValueSetExpansionParameterComponent(t)); @@ -449,17 +424,15 @@ public class ValueSet10_30 { return null; org.hl7.fhir.dstu2.model.ValueSet.ValueSetExpansionComponent tgt = new org.hl7.fhir.dstu2.model.ValueSet.ValueSetExpansionComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasIdentifier()) { - tgt.setIdentifier(src.getIdentifier()); + if (src.hasIdentifierElement()) + tgt.setIdentifierElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_30.convertType(src.getIdentifierElement())); + if (src.hasTimestampElement()) + tgt.setTimestampElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_30.convertType(src.getTimestampElement())); + if (src.hasTotalElement()) { + tgt.setTotalElement((org.hl7.fhir.dstu2.model.IntegerType) VersionConvertor_10_30.convertType(src.getTotalElement())); } - if (src.hasTimestamp()) { - tgt.setTimestamp(src.getTimestamp()); - } - if (src.hasTotal()) { - tgt.setTotal(src.getTotal()); - } - if (src.hasOffset()) { - tgt.setOffset(src.getOffset()); + if (src.hasOffsetElement()) { + tgt.setOffsetElement((org.hl7.fhir.dstu2.model.IntegerType) VersionConvertor_10_30.convertType(src.getOffsetElement())); } if (src.hasParameter()) { for (org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionParameterComponent t : src.getParameter()) tgt.addParameter(convertValueSetExpansionParameterComponent(t)); @@ -475,21 +448,17 @@ public class ValueSet10_30 { return null; org.hl7.fhir.dstu2.model.ValueSet.ValueSetExpansionContainsComponent tgt = new org.hl7.fhir.dstu2.model.ValueSet.ValueSetExpansionContainsComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasSystem()) { - tgt.setSystem(src.getSystem()); - } - if (src.hasAbstract()) { - tgt.setAbstract(src.getAbstract()); - } - if (src.hasVersion()) { - tgt.setVersion(src.getVersion()); - } - if (src.hasCode()) { - tgt.setCode(src.getCode()); - } - if (src.hasDisplay()) { - tgt.setDisplay(src.getDisplay()); + if (src.hasSystemElement()) + tgt.setSystemElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_30.convertType(src.getSystemElement())); + if (src.hasAbstractElement()) { + tgt.setAbstractElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_30.convertType(src.getAbstractElement())); } + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getVersionElement())); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu2.model.CodeType) VersionConvertor_10_30.convertType(src.getCodeElement())); + if (src.hasDisplayElement()) + tgt.setDisplayElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getDisplayElement())); if (src.hasContains()) { for (org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionContainsComponent t : src.getContains()) tgt.addContains(convertValueSetExpansionContainsComponent(t)); } @@ -501,21 +470,17 @@ public class ValueSet10_30 { return null; org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionContainsComponent tgt = new org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionContainsComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasSystem()) { - tgt.setSystem(src.getSystem()); - } - if (src.hasAbstract()) { - tgt.setAbstract(src.getAbstract()); - } - if (src.hasVersion()) { - tgt.setVersion(src.getVersion()); - } - if (src.hasCode()) { - tgt.setCode(src.getCode()); - } - if (src.hasDisplay()) { - tgt.setDisplay(src.getDisplay()); + if (src.hasSystemElement()) + tgt.setSystemElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_10_30.convertType(src.getSystemElement())); + if (src.hasAbstractElement()) { + tgt.setAbstractElement((BooleanType) VersionConvertor_10_30.convertType(src.getAbstractElement())); } + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getVersionElement())); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_10_30.convertType(src.getCodeElement())); + if (src.hasDisplayElement()) + tgt.setDisplayElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getDisplayElement())); if (src.hasContains()) { for (org.hl7.fhir.dstu2.model.ValueSet.ValueSetExpansionContainsComponent t : src.getContains()) tgt.addContains(convertValueSetExpansionContainsComponent(t)); } @@ -527,9 +492,8 @@ public class ValueSet10_30 { return null; org.hl7.fhir.dstu2.model.ValueSet.ValueSetExpansionParameterComponent tgt = new org.hl7.fhir.dstu2.model.ValueSet.ValueSetExpansionParameterComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(src.getNameElement())); if (src.hasValue()) { tgt.setValue(VersionConvertor_10_30.convertType(src.getValue())); } @@ -541,9 +505,8 @@ public class ValueSet10_30 { return null; org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionParameterComponent tgt = new org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionParameterComponent(); VersionConvertor_10_30.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getNameElement())); if (src.hasValue()) { tgt.setValue(VersionConvertor_10_30.convertType(src.getValue())); } @@ -553,16 +516,16 @@ public class ValueSet10_30 { static public void processConcept(List concepts, org.hl7.fhir.dstu2.model.ValueSet.ConceptDefinitionComponent cs, CodeSystem tgtcs) throws FHIRException { org.hl7.fhir.dstu3.model.CodeSystem.ConceptDefinitionComponent ct = new org.hl7.fhir.dstu3.model.CodeSystem.ConceptDefinitionComponent(); concepts.add(ct); - ct.setCode(cs.getCode()); - ct.setDisplay(cs.getDisplay()); - ct.setDefinition(cs.getDefinition()); + ct.setCodeElement((CodeType) VersionConvertor_10_30.convertType(cs.getCodeElement())); + ct.setDisplayElement((StringType) VersionConvertor_10_30.convertType(cs.getDisplayElement())); + ct.setDefinitionElement((StringType) VersionConvertor_10_30.convertType(cs.getDefinitionElement())); if (cs.getAbstract()) CodeSystemUtilities.setNotSelectable(tgtcs, ct); for (org.hl7.fhir.dstu2.model.ValueSet.ConceptDefinitionDesignationComponent csd : cs.getDesignation()) { org.hl7.fhir.dstu3.model.CodeSystem.ConceptDefinitionDesignationComponent cst = new org.hl7.fhir.dstu3.model.CodeSystem.ConceptDefinitionDesignationComponent(); - cst.setLanguage(csd.getLanguage()); + cst.setLanguageElement((CodeType) VersionConvertor_10_30.convertType(csd.getLanguageElement())); cst.setUse(VersionConvertor_10_30.convertCoding(csd.getUse())); - cst.setValue(csd.getValue()); + cst.setValueElement((StringType) VersionConvertor_10_30.convertType(csd.getValueElement())); } for (org.hl7.fhir.dstu2.model.ValueSet.ConceptDefinitionComponent csc : cs.getConcept()) processConcept(ct.getConcept(), csc, tgtcs); } @@ -570,16 +533,16 @@ public class ValueSet10_30 { static public void processConcept(List concepts, ConceptDefinitionComponent cs, CodeSystem srcCS) throws FHIRException { org.hl7.fhir.dstu2.model.ValueSet.ConceptDefinitionComponent ct = new org.hl7.fhir.dstu2.model.ValueSet.ConceptDefinitionComponent(); concepts.add(ct); - ct.setCode(cs.getCode()); - ct.setDisplay(cs.getDisplay()); - ct.setDefinition(cs.getDefinition()); + ct.setCodeElement((org.hl7.fhir.dstu2.model.CodeType) VersionConvertor_10_30.convertType(cs.getCodeElement())); + ct.setDisplayElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(cs.getDisplayElement())); + ct.setDefinitionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(cs.getDefinitionElement())); if (CodeSystemUtilities.isNotSelectable(srcCS, cs)) ct.setAbstract(true); for (org.hl7.fhir.dstu3.model.CodeSystem.ConceptDefinitionDesignationComponent csd : cs.getDesignation()) { org.hl7.fhir.dstu2.model.ValueSet.ConceptDefinitionDesignationComponent cst = new org.hl7.fhir.dstu2.model.ValueSet.ConceptDefinitionDesignationComponent(); - cst.setLanguage(csd.getLanguage()); + cst.setLanguageElement((org.hl7.fhir.dstu2.model.CodeType) VersionConvertor_10_30.convertType(csd.getLanguageElement())); cst.setUse(VersionConvertor_10_30.convertCoding(csd.getUse())); - cst.setValue(csd.getValue()); + cst.setValueElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_30.convertType(csd.getValueElement())); } for (ConceptDefinitionComponent csc : cs.getConcept()) processConcept(ct.getConcept(), csc, srcCS); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/parser/Parser.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/parser/Parser.java index e667fbbd7..103728fbe 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/parser/Parser.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/parser/Parser.java @@ -4,13 +4,14 @@ import com.github.javaparser.StaticJavaParser; import com.github.javaparser.ast.*; import com.github.javaparser.ast.body.*; import com.github.javaparser.ast.comments.Comment; -import com.github.javaparser.ast.expr.*; +import com.github.javaparser.ast.expr.Expression; +import com.github.javaparser.ast.expr.MethodCallExpr; +import com.github.javaparser.ast.expr.NameExpr; import com.github.javaparser.ast.nodeTypes.NodeWithIdentifier; import com.github.javaparser.ast.nodeTypes.NodeWithName; import com.github.javaparser.ast.nodeTypes.NodeWithSimpleName; import com.github.javaparser.ast.nodeTypes.modifiers.NodeWithStaticModifier; import com.github.javaparser.ast.stmt.*; -import com.github.javaparser.ast.type.ClassOrInterfaceType; import com.github.javaparser.ast.type.Type; import com.github.javaparser.ast.type.VarType; import com.github.javaparser.ast.visitor.ModifierVisitor; @@ -24,8 +25,6 @@ import com.github.javaparser.symbolsolver.resolution.typesolvers.CombinedTypeSol import com.github.javaparser.symbolsolver.resolution.typesolvers.JarTypeSolver; import com.github.javaparser.symbolsolver.resolution.typesolvers.JavaParserTypeSolver; import com.github.javaparser.symbolsolver.resolution.typesolvers.ReflectionTypeSolver; -import jdk.nashorn.internal.runtime.options.Option; -import org.checkerframework.checker.nullness.Opt; import org.hl7.fhir.dstu3.model.Enumeration; import org.hl7.fhir.dstu3.model.MedicationAdministration; @@ -53,29 +52,21 @@ public class Parser { "Markdown", "Oid", "PositiveInt", "String", "Time", "UnsignedInt", "Uri", "Url", "Uuid", "XhtmlNode"); - private static final String ONE_TO_ONE = "tgt.set%1$sElement((%3$s%4$s) VersionConvertor_%2$s.convertType(src.get%1$sElement()));"; - private static final String ONE_TO_MANY = "tgt.set%1$s(Collections.singletonList((%3$s%4$s) VersionConvertor_%2$s.convertType(src.get%1$sElement())));"; - private static final String MANY_TO_ONE = "tgt.set%1$sElement((%3$s%4$s) VersionConvertor_%2$s.convertType(src.get%1$s().get(0)));"; - private static final String MANY_TO_MANY = "tgt.set%1$s(src.get%1$s().stream()\n" + - ".map(toConvert -> (%3$s%4$s) VersionConvertor_%2$s.convertType(toConvert))\n" + - ".collect(Collectors.toList())\n" + - ");"; - - private static org.hl7.fhir.r5.model.Enumeration - convertMedicationAdministrationStatus(org.hl7.fhir.dstu3.model.Enumeration src) { - if (src == null) - return null; - org.hl7.fhir.r5.model.Enumeration tgt - = new org.hl7.fhir.r5.model.Enumeration(); - copyElement(src, tgt); - tgt.setValue(org.hl7.fhir.r5.model.MedicationAdministration.MedicationAdministrationStatusCodes.fromCode(src.getValueAsString())); - return tgt; - } - - private static void copyElement(Enumeration src, - org.hl7.fhir.r5.model.Enumeration tgt) { - - } +// private static org.hl7.fhir.r5.model.Enumeration +// convertMedicationAdministrationStatus(org.hl7.fhir.dstu3.model.Enumeration src) { +// if (src == null) +// return null; +// org.hl7.fhir.r5.model.Enumeration tgt +// = new org.hl7.fhir.r5.model.Enumeration(); +// copyElement(src, tgt); +// tgt.setValue(org.hl7.fhir.r5.model.MedicationAdministration.MedicationAdministrationStatusCodes.fromCode(src.getValueAsString())); +// return tgt; +// } +// +// private static void copyElement(java.util.Enumeration src, +// org.hl7.fhir.r5.model.Enumeration tgt) { +// +// } /** @@ -101,20 +92,22 @@ public class Parser { // VERSION_FILES.forEach(version -> { - String version = "10_30"; - List filenames = listAllJavaFilesInDirectory(new File("").getAbsolutePath() + "/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv" + version + "/"); - Collections.sort(filenames); - filenames.forEach(name -> { - try { - modifyElementNotField("/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv" + version + "/", name, ".java", listOfPrimitiveTypes, version); - } catch (FileNotFoundException e) { - e.printStackTrace(); - } - }); + String version = "10_30"; + List filenames = listAllJavaFilesInDirectory(new File("").getAbsolutePath() + "/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv" + version + "/"); + System.out.println("Checking the following files:"); + Collections.sort(filenames); + filenames.forEach(System.out::println); + filenames.forEach(name -> { + try { + modifyElementNotField("/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv" + version + "/", name, ".java", listOfPrimitiveTypes, version); + } catch (FileNotFoundException e) { + e.printStackTrace(); + } + }); // }); // try { -// modifyElementNotField("/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/", "Account40_50", ".java", listOfPrimitiveTypes, "10_30"); +// modifyElementNotField("/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/", "Subscription10_30", ".java", listOfPrimitiveTypes, "10_30"); // modifyElementNotField("/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/", "AuditEvent10_30", ".java", listOfPrimitiveTypes, "10_30"); // modifyElementNotField("/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/", "Binary10_30", ".java", listOfPrimitiveTypes, "10_30"); // modifyElementNotField("/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/", "Bundle10_30", ".java", listOfPrimitiveTypes, "10_30"); @@ -130,92 +123,89 @@ public class Parser { System.out.println("File :: " + filename); String projectDirectory = new File("").getAbsolutePath(); + String srcFilePathWithExtension = projectDirectory + srcdirectory + filename + extension; long start = System.currentTimeMillis(); CompilationUnit compilationUnit = getCompilationUnit(projectDirectory + srcdirectory + filename + extension); ClassOrInterfaceDeclaration classOrInterfaceDeclaration = initializeTypeSovlerAndParser(compilationUnit, projectDirectory, srcdirectory, filename); - MethodDeclaration declaration; + Set visited = new HashSet<>(); - Optional declarationOption = classOrInterfaceDeclaration.getMethods().stream() + HashMap ifStatementToConditions = new HashMap<>(); + HashMap> keyWordToIfStatement = new HashMap<>(); + + final HashMap generatedBlockStmt = new HashMap<>(); + + MethodDeclaration declaration = classOrInterfaceDeclaration.getMethods().stream() .filter(md -> md.getNameAsString().equals("convert" + extractName(filename))) - .findFirst(); - if (!declarationOption.isPresent()) { - return; - } else { - declaration = declarationOption.get(); // Can't find - } + .findFirst().get(); String lowerVersionTypeAbsPath = getLowerVersionAbsPathFromImportStatement(declaration.getTypeAsString(), declaration.getParameter(0).getTypeAsString(), version); String higherVersionTypeAbsPath = getHigherVersionAbsPath(declaration.getTypeAsString(), declaration.getParameter(0).getTypeAsString(), version); CompilationUnit lowerCU = StaticJavaParser.parse(new File(lowerVersionTypeAbsPath)); CompilationUnit higherCU = StaticJavaParser.parse(new File(higherVersionTypeAbsPath)); + System.out.println(); List methods = classOrInterfaceDeclaration.getMethods(); - for (MethodDeclaration md : methods) { + methods.forEach(md -> { - String type = resolveInnerType(md.getType()).asString(); - String param = resolveInnerType(md.getParameter(0).getType()).asString(); - if (type == "void") continue; - try { - type = !type.contains(".") ? resolveInnerType(md.getType()).resolve().asReferenceType().getQualifiedName() : type; - } catch (Exception e) { - System.out.println(); - } - - param = !param.contains(".") ? resolveInnerType(md.getParameter(0).getType()).resolve().asReferenceType().getQualifiedName() : param; - - String absFilePathOfClassMethodIsConvertingTo = importStatementToAbsolutePath(type); - String absFilePathOfClassMethodIsConvertingFrom = importStatementToAbsolutePath(param); - String classNameMethodIsConvertingTo = absFilePathOfClassMethodIsConvertingTo.substring(absFilePathOfClassMethodIsConvertingTo.lastIndexOf('/') + 1, absFilePathOfClassMethodIsConvertingTo.lastIndexOf('.')); - String classNameMethodIsConvertingFrom = absFilePathOfClassMethodIsConvertingFrom.substring(absFilePathOfClassMethodIsConvertingFrom.lastIndexOf('/') + 1, absFilePathOfClassMethodIsConvertingFrom.lastIndexOf('.')); + String toType = importStatementToAbsolutePath(md.getType().asString()); + String fromType = importStatementToAbsolutePath(md.getParameter(0).getType().asString()); ClassOrInterfaceDeclaration toTypeClass = null; ClassOrInterfaceDeclaration fromTypeClass = null; - String highBackupModelDirectoryToSearch = higherVersionTypeAbsPath.substring(0, higherVersionTypeAbsPath.lastIndexOf('/') + 1); - String lowBackupModelDirectoryToSearch = lowerVersionTypeAbsPath.substring(0, lowerVersionTypeAbsPath.lastIndexOf('/') + 1); + String lowerVersionAbsPath = getLowerVersionAbsPathFromAbsPath(toType, fromType, version); + String toString = toType.substring(toType.lastIndexOf('/') + 1, toType.lastIndexOf('.')); - Node declaration1 = null; - Node declaration2 = null; - boolean isEnum = false; + String fromString = fromType.substring(fromType.lastIndexOf('/') + 1, fromType.lastIndexOf('.')); + if (toType.equals(lowerVersionAbsPath)) { + try { + if (toString.equals(extractName(filename))) { + toTypeClass = lowerCU.getClassByName(toString).get(); + fromTypeClass = higherCU.getClassByName(fromString).get(); + } else { + Node declaration1 = getDeclaration(lowerCU, filename, toString); + if (declaration1 instanceof ClassOrInterfaceDeclaration) { + toTypeClass = (ClassOrInterfaceDeclaration) declaration1; + } else if (declaration1 instanceof EnumDeclaration) { + System.out.println("Filename " + filename + " target String " + toString + ", is an EnumDeclaration"); + } - try { - if (getVersionStringFromPath(lowerVersionTypeAbsPath).equals(getVersionStringFromPath(absFilePathOfClassMethodIsConvertingTo))) { - declaration1 = getDeclaration(lowerCU, classNameMethodIsConvertingTo, lowBackupModelDirectoryToSearch); - } else { - declaration1 = getDeclaration(higherCU, classNameMethodIsConvertingTo, highBackupModelDirectoryToSearch); + Node declaration2 = getDeclaration(higherCU, filename, fromString); + if (declaration2 instanceof ClassOrInterfaceDeclaration) { + fromTypeClass = (ClassOrInterfaceDeclaration) declaration2; + } else if (declaration2 instanceof EnumDeclaration) { + System.out.println("Filename " + filename + " target String " + toString + ", is an EnumDeclaration"); + } + } + } catch (Exception e) { + System.out.println(); } - - if (getVersionStringFromPath(lowerVersionTypeAbsPath).equals(getVersionStringFromPath(absFilePathOfClassMethodIsConvertingFrom))) { - declaration2 = getDeclaration(lowerCU, classNameMethodIsConvertingFrom, lowBackupModelDirectoryToSearch); - } else { - declaration2 = getDeclaration(higherCU, classNameMethodIsConvertingFrom, highBackupModelDirectoryToSearch); + } else { + try { + if (toString.equals(extractName(filename))) { + toTypeClass = higherCU.getClassByName(toString).get(); + fromTypeClass = lowerCU.getClassByName(fromString).get(); + } else { + Node declaration1 = getDeclaration(higherCU, filename, toString); + if (declaration1 instanceof ClassOrInterfaceDeclaration) { + toTypeClass = (ClassOrInterfaceDeclaration) declaration1; + } else if (declaration1 instanceof EnumDeclaration) { + System.out.println("Filename " + filename + " target String " + toString + ", is an EnumDeclaration"); + } + Node declaration2 = getDeclaration(lowerCU, filename, fromString); + if (declaration2 instanceof ClassOrInterfaceDeclaration) { + fromTypeClass = (ClassOrInterfaceDeclaration) declaration2; + } else if (declaration2 instanceof EnumDeclaration) { + System.out.println("Filename " + filename + " target String " + toString + ", is an EnumDeclaration"); + } + } + } catch (Exception e) { + System.out.println(); } - } catch (FileNotFoundException e) { - System.out.println(e.getMessage()); - } - - if (declaration1 instanceof ClassOrInterfaceDeclaration) { - toTypeClass = (ClassOrInterfaceDeclaration) declaration1; - } else if (declaration1 instanceof EnumDeclaration) { - isEnum = true; - System.out.println("Filename " + filename + " target String " + classNameMethodIsConvertingTo + ", is an EnumDeclaration"); - } - if (declaration2 instanceof ClassOrInterfaceDeclaration) { - fromTypeClass = (ClassOrInterfaceDeclaration) declaration2; - } else if (declaration2 instanceof EnumDeclaration) { - isEnum = true; - System.out.println("Filename " + filename + " target String " + classNameMethodIsConvertingTo + ", is an EnumDeclaration"); - } - - if ((toTypeClass == null || fromTypeClass == null) && !isEnum) { - System.out.println(); - } else if (!isEnum) { - System.out.println("FROM " + fromTypeClass.getNameAsString()); - System.out.println("TO " + toTypeClass.getNameAsString()); } if (toTypeClass != null && fromTypeClass != null) { @@ -223,193 +213,193 @@ public class Parser { ClassOrInterfaceDeclaration finalToTypeClass = toTypeClass; md.accept(new ModifierVisitor() { @Override - public Visitable visit(IfStmt ifStmt, Void arg) { - super.visit(ifStmt, arg); - processIfStatement(ifStmt); + public Visitable visit(MethodCallExpr n, Void arg) { + super.visit(n, arg); + if (n.getNameAsString().contains("get") && !visited.contains(n.getNameAsString())) { + visited.add(n.getNameAsString()); + Optional first = finalFromTypeClass.getMethods().stream() + .filter(md -> md.getNameAsString().equals(n.getNameAsString())) + .findFirst(); - return ifStmt; + if (first.isPresent()) { + + Node topLevelMethodExpr = getTopLevelMethodExpr(n); + Node topLevelIfStatement = getTopLevelIfStatement(n); + + String type = first.get().getType().toString(); + + String baseString = n.getNameAsString().replace("get", ""); + + if (listOfPrimitiveTypes.contains(type)) { + ElementParserEntry e = new ElementParserEntry(); + // do get + Optional firstGetElementMethod = finalFromTypeClass.getMethods().stream() + .filter(methodDeclaration -> methodDeclaration.getNameAsString().equals("get" + baseString + ELEMENT)) + .findFirst(); + if (firstGetElementMethod.isPresent()) { + e.setGetType(firstGetElementMethod.get().getType().toString()); + } else { + finalFromTypeClass.getMethods().stream() + .filter(methodDeclaration -> methodDeclaration.getNameAsString().equals("get" + baseString)) + .findFirst().ifPresent(md -> e.setGetType(md.getType().toString())); + } + + // do set and add + Optional firstSetElementMethod = finalToTypeClass.getMethods().stream() + .filter(methodDeclaration -> methodDeclaration.getNameAsString().equals("set" + baseString + ELEMENT)) + .findFirst(); + if (firstSetElementMethod.isPresent()) { + e.setSetType(firstSetElementMethod.get().getParameter(0).getType().toString()); + } else { + finalToTypeClass.getMethods().stream() + .filter(methodDeclaration -> methodDeclaration.getNameAsString().equals("set" + baseString)) + .findFirst().ifPresent(md -> e.setSetType(md.getParameter(0).getType().toString())); + } + + Optional firstAddElementMethod = finalToTypeClass.getMethods().stream() + .filter(methodDeclaration -> methodDeclaration.getNameAsString().equals("add" + baseString + ELEMENT)) + .findFirst(); + if (firstAddElementMethod.isPresent()) { + e.setAddType(firstAddElementMethod.get().getType().toString()); + } else { + finalToTypeClass.getMethods().stream() + .filter(methodDeclaration -> methodDeclaration.getNameAsString().equals("add" + baseString + ELEMENT)) + .findFirst().ifPresent(md -> e.setAddType(md.getType().toString())); + } + + // do check + if (topLevelIfStatement != null && (((IfStmt) topLevelIfStatement).getCondition() instanceof MethodCallExpr)) { + String nameAsString = ((MethodCallExpr) ((IfStmt) topLevelIfStatement).getCondition()).getNameAsString(); + String finalNameAsString = nameAsString; + finalFromTypeClass.getMethods().stream() + .filter(methodDeclaration -> methodDeclaration.getNameAsString().equals(finalNameAsString)) + .findFirst().ifPresent(methodDeclaration -> { + e.setHasCheck(methodDeclaration.getType().toString()); + }); + } + + ifStatementToConditions.put((IfStmt) topLevelIfStatement, e); + if (!keyWordToIfStatement.containsKey(baseString)) { + keyWordToIfStatement.put(baseString, new ArrayList<>()); + } + keyWordToIfStatement.get(baseString).add((IfStmt) topLevelIfStatement); + } + } + } + + return n; } - }, null); + visited.clear(); } - //System.out.println("Execution time :: " + (System.currentTimeMillis() - start) / 1000); - - } - } - - public static void processIfStatement(IfStmt ifStmt) { - Expression condition = ifStmt.getCondition(); - Statement thenStmt = ifStmt.getThenStmt(); - //Handle multiple big if blocks - if ((thenStmt instanceof BlockStmt) && (thenStmt.getChildNodes().size() > 1)) { - thenStmt.getChildNodes().forEach(n -> { - if (n instanceof IfStmt) { - processIfStatement((IfStmt) n); - } else { - System.out.println(); - } - }); - } else if (thenStmt instanceof IfStmt) { - processIfStatement((IfStmt) thenStmt); - } else { - Expression expression = processGetStatement(thenStmt); - if (expression != null && !expression.toString().contains("get")) { - System.out.println(); - } else if (expression == null) { - System.out.println("Logger :: was not able to get a getStatement for if statement :: " + ifStmt.toString()); - } - } - } - - public static Expression processGetStatement(Node stmt) { - - if ((stmt instanceof ReturnStmt) || (stmt instanceof ThrowStmt) || (stmt instanceof TryStmt) - || (stmt instanceof NameExpr) || (stmt instanceof FieldAccessExpr) || (stmt instanceof BooleanLiteralExpr) - || (stmt instanceof ConditionalExpr) || (stmt instanceof StringLiteralExpr)) { - // ignore - } else if (stmt instanceof IfStmt) { - System.out.println(); - } else if (stmt instanceof ForEachStmt) { - return ((ForEachStmt) stmt).getIterable(); - } else if (stmt instanceof BlockStmt) { - if (stmt.getChildNodes().size() > 1) { - System.out.println(); - } else { - return processGetStatement(stmt.getChildNodes().get(0)); - } - } else if (stmt instanceof ExpressionStmt) { - return processGetStatement(((ExpressionStmt) stmt).getExpression()); - } else if (stmt instanceof MethodCallExpr) { - if (((MethodCallExpr) stmt).getArguments().size() > 0) { - return processGetStatement(((MethodCallExpr) stmt).getArgument(0)); - } else { - return containsOrReturnNull((Expression) stmt, "get"); - } - } else if (stmt instanceof AssignExpr) { - if (((AssignExpr) stmt).getOperator().equals(AssignExpr.Operator.ASSIGN)) { - return (processGetStatement(stmt.getChildNodes().get(1))); - } else { - System.out.println(); - } - } else if (stmt instanceof UnaryExpr) { - return containsOrReturnNull((Expression) stmt, "get"); - } else if (stmt instanceof BinaryExpr) { - if (((BinaryExpr) stmt).getLeft().toString().contains("get")) { - return processGetStatement(((BinaryExpr) stmt).getLeft()); - } else { - return processGetStatement(((BinaryExpr) stmt).getRight()); - } - } else if (stmt instanceof CastExpr) { - return processGetStatement(((CastExpr) stmt).getExpression()); - } else if (stmt instanceof Expression) { - System.out.println(); - } else { - System.out.println("You haven't caught this then statement case yet."); - System.exit(0); - } - - return null; - } - - public static Expression containsOrReturnNull(Expression e, String keyWord) { - if (e.toString().contains(keyWord)) { - return e; - } else { - return null; - } - } - - public static Type resolveInnerType(Type type) { - Type toReturn = type; - if (type.toString().contains("List") && !type.toString().contains("List_") - && !type.toString().contains("ListResource") && !type.toString().contains("ListMode")) { + String returnTypeDir = null; try { - toReturn = (Type) type.getChildNodes().get(1); + returnTypeDir = getDirectoryOfOppositeModel(md.getParameter(0).getTypeAsString(), version); } catch (Exception e) { System.out.println(); } - } - return toReturn; - } - public static String removeListToGetTypeString(String type) { - if (type.contains("List")) { - type = type.replaceAll("List", "").replaceAll("<", "").replaceAll(">", ""); - } - return type; - } + String condition = "src.has%1$sElement()"; + String statementWithSet = "tgt.set%1$sElement((%3$s%4$s) VersionConvertor_%2$s.convertType(src.get%1$sElement()));"; - public static boolean methodExistsInClass(ClassOrInterfaceDeclaration c, String methodName) { - Optional first = c.getMethods().stream() - .filter(md -> md.getNameAsString().equals(methodName)) - .findAny(); - return first.isPresent(); - } + String oneToOne = "tgt.set%1$sElement((%3$s%4$s) VersionConvertor_%2$s.convertType(src.get%1$sElement()));"; + String oneToMany = "tgt.set%1$s(Collections.singletonList((%3$s%4$s) VersionConvertor_%2$s.convertType(src.get%1$sElement())));"; + String manyToOne = "tgt.set%1$sElement((%3$s%4$s) VersionConvertor_%2$s.convertType(src.get%1$s().get(0)));"; + String manyToMany = "tgt.set%1$s(src.get%1$s().stream()\n" + + ".map(toConvert -> (%3$s%4$s) VersionConvertor_%2$s.convertType(toConvert))\n" + + ".collect(Collectors.toList())\n" + + ");"; - public static MethodDeclaration getMethod(ClassOrInterfaceDeclaration c, String methodName) { - if (!methodExistsInClass(c, methodName)) { - throw new IllegalStateException("Cannot get a method " + methodName + " in class " + c.getNameAsString() + " doesn't exist in class."); - } - return c.getMethods().stream() - .filter(md -> md.getNameAsString().equals(methodName)) - .findFirst().get(); - } + if (returnTypeDir != null) { + for (String s : keyWordToIfStatement.keySet()) { + for (IfStmt ifState : keyWordToIfStatement.get(s)) { + ElementParserEntry e = ifStatementToConditions.get(ifState); + String finalReturnTypeDir = returnTypeDir; + if (e.hasAdd || e.hasSet) { + md.accept(new ModifierVisitor() { + @Override + public Visitable visit(IfStmt n, Void arg) { + super.visit(n, arg); + if (n.equals(ifState)) { + String template = null; + if (e.getType.contains("List") && getToType(e).contains("List")) { + template = manyToMany; + } else if (e.getType.contains("List") && !getToType(e).contains("List")) { + template = manyToOne; + } else if (!e.getType.contains("List") && getToType(e).contains("List")) { + template = oneToMany; + } else { + template = oneToOne; + } - public static TypeDeclaration getDeclaration(CompilationUnit cu, String targetNodeString, String backupModelDirectory) throws FileNotFoundException { - if (targetNodeString.contains(".")) { - return null; - // not handling this - } + e.setType = e.setType.replaceAll("List", "").replaceAll("<", "").replaceAll(">", ""); + e.addType = e.setType.replaceAll("List", "").replaceAll("<", "").replaceAll(">", ""); - if (cu.getClassByName(targetNodeString).isPresent()) { - return (TypeDeclaration) cu.getClassByName(targetNodeString).get(); - } + Expression conditionExp = e.hasCheck ? StaticJavaParser.parseExpression(String.format(condition, s)) : n.getCondition(); + Statement thenStatement = null; + try { + thenStatement = StaticJavaParser.parseStatement(String.format(template, s, version, finalReturnTypeDir, e.hasSet ? e.setType : e.addType)); + n = new IfStmt(conditionExp, thenStatement, null); + } catch (Exception e1) { + System.out.println(); + } + } + return n; + } - TypeDeclaration td = getClassOrEnumNodeThatExistsWithin(cu, targetNodeString); - if (td == null) { - File target = new File(backupModelDirectory + targetNodeString + ".java"); - if (!target.exists()) { - target = new File(backupModelDirectory + "Enumerations" + ".java"); + private String getToType(ElementParserEntry e) { + if (e.hasSet) { + return e.setType; + } else { + return ""; + } + } + }, null); + } + } + } } - cu = StaticJavaParser.parse(target); - td = getClassOrEnumNodeThatExistsWithin(cu, targetNodeString); + }); + + deleteFile(srcFilePathWithExtension); + + try { + compilationUnit.addImport("java.util.Collections"); + writeStringToFile(compilationUnit.toString(), srcFilePathWithExtension); + } catch (IOException e) { + e.printStackTrace(); } - if (td == null) { - System.out.println("No target with name " + targetNodeString + " found"); - } - return td; + + System.out.println("Execution time :: " + (System.currentTimeMillis() - start) / 1000); + } - public static TypeDeclaration getClassOrEnumNodeThatExistsWithin(CompilationUnit cu, String targetName) { - List collect = cu.getChildNodes().stream() - .filter(node -> node instanceof TypeDeclaration) - .map(node -> (TypeDeclaration) node) - .collect(Collectors.toList()); - for (TypeDeclaration td : collect) { - TypeDeclaration search = getClassOrEnumNodeThatExistsWithin(td, targetName); - if (search != null) { - return search; + public static Node getDeclaration(CompilationUnit cu, String filename, String targetNodeString) { + Optional classByName = cu.getClassByName(extractName(filename)); + Optional first = null; + if (classByName.isPresent()) { + + first = classByName.get().getChildNodes().stream() + .filter(node -> node instanceof ClassOrInterfaceDeclaration) + .filter(node -> ((ClassOrInterfaceDeclaration) node).getNameAsString().equals(targetNodeString)) + .findFirst(); + + if (!first.isPresent()) { + first = classByName.get().getChildNodes().stream() + .filter(node -> node instanceof EnumDeclaration) + .filter(node -> ((EnumDeclaration) node).getNameAsString().equals(targetNodeString)) + .findFirst(); } } - return null; - } - public static TypeDeclaration getClassOrEnumNodeThatExistsWithin(TypeDeclaration c, String targetName) { - if (c.getNameAsString().equals(targetName)) return c; - List collect = c.getChildNodes().stream() - .filter(node -> node instanceof TypeDeclaration) - .map(node -> (TypeDeclaration) node) - .collect(Collectors.toList()); - for (TypeDeclaration td : collect) { - TypeDeclaration search = getClassOrEnumNodeThatExistsWithin(td, targetName); - if (search != null) { - return search; - } + if (first == null || !first.isPresent()) { + throw new IllegalStateException("No target with name " + targetNodeString + " found in file " + filename); + } else { + return first.get(); } - return null; } public static class ElementParserEntry { @@ -684,8 +674,7 @@ public class Parser { } - private static List getAdditionalClassDeclarations(ClassOrInterfaceDeclaration - classOrInterfaceDeclaration) { + private static List getAdditionalClassDeclarations(ClassOrInterfaceDeclaration classOrInterfaceDeclaration) { List collect = new ArrayList<>(); classOrInterfaceDeclaration.accept(new VoidVisitorAdapter() { @Override @@ -732,8 +721,7 @@ public class Parser { return classOrInterfaceDeclaration.get(); } - private static HashMap> generateMapOfTopLevelMethods(ClassOrInterfaceDeclaration - classOrInterfaceDeclaration) { + private static HashMap> generateMapOfTopLevelMethods(ClassOrInterfaceDeclaration classOrInterfaceDeclaration) { System.out.println("==================== Generating List of Parsable Types ====================\n"); HashMap> mapToReturn = new HashMap<>(); @@ -831,8 +819,7 @@ public class Parser { } } - public static void dealWithV2ExceptionCasesPreProcessing(CompilationUnit cu, ClassOrInterfaceDeclaration - classOrInterfaceDeclaration, String version) { + public static void dealWithV2ExceptionCasesPreProcessing(CompilationUnit cu, ClassOrInterfaceDeclaration classOrInterfaceDeclaration, String version) { String from = "2";//version.substring(0, version.indexOf('_')); String to = version.substring(version.indexOf('_') + 1, version.indexOf('_') + 2); @@ -846,8 +833,7 @@ public class Parser { } - public static void dealWithV2ExceptionCasesPostProcessing(ClassOrInterfaceDeclaration - classOrInterfaceDeclaration, String version) { + public static void dealWithV2ExceptionCasesPostProcessing(ClassOrInterfaceDeclaration classOrInterfaceDeclaration, String version) { String from = "2";//version.substring(0, version.indexOf('_')); String to = version.substring(version.indexOf('_') + 1, version.indexOf('_') + 2); @@ -921,8 +907,7 @@ public class Parser { } - public static MethodDeclaration getConvertResourceMethodForVersion(ClassOrInterfaceDeclaration - classOrInterfaceDeclaration, + public static MethodDeclaration getConvertResourceMethodForVersion(ClassOrInterfaceDeclaration classOrInterfaceDeclaration, String methodName, String modelType, String version) { @@ -1268,8 +1253,7 @@ public class Parser { * @param classOrInterfaceDeclaration * @return */ - protected static List getListOfParsableTypes(ClassOrInterfaceDeclaration - classOrInterfaceDeclaration) { + protected static List getListOfParsableTypes(ClassOrInterfaceDeclaration classOrInterfaceDeclaration) { List listOfClassMethods = getListOfClassMethods(KEYWORD_GOD_METHOD, classOrInterfaceDeclaration); List calledMethods = new ArrayList<>(); listOfClassMethods.forEach(md -> md.accept(new MethodCallVisitor(KEYWORD_CONVERT), calledMethods)); @@ -1284,8 +1268,7 @@ public class Parser { * @param method * @return List of all {@link MethodDeclaration} */ - public static List getAllCalledMethods(ClassOrInterfaceDeclaration - classOrInterfaceDeclaration, MethodDeclaration method) { + public static List getAllCalledMethods(ClassOrInterfaceDeclaration classOrInterfaceDeclaration, MethodDeclaration method) { List result = new ArrayList<>(); List methodCallExprs = new ArrayList<>(); @@ -1317,8 +1300,7 @@ public class Parser { * @param methodNames {@link List} of method names * @return {@link List } containing any of the keywords */ - protected static List getTopLevelMethods(ClassOrInterfaceDeclaration - classOrInterfaceDeclaration, List methodNames) { + protected static List getTopLevelMethods(ClassOrInterfaceDeclaration classOrInterfaceDeclaration, List methodNames) { List toReturn = new ArrayList<>(); methodNames.stream() .map(s -> getListOfClassMethods(s, classOrInterfaceDeclaration)) @@ -1480,8 +1462,7 @@ public class Parser { * @param classOrInterfaceDeclaration {@link ClassOrInterfaceDeclaration} * @return {@link List} of all {@link MethodDeclaration} */ - protected static List getListOfClassMethods(ClassOrInterfaceDeclaration - classOrInterfaceDeclaration) { + protected static List getListOfClassMethods(ClassOrInterfaceDeclaration classOrInterfaceDeclaration) { return getListOfClassMethods("", classOrInterfaceDeclaration); } @@ -1492,8 +1473,7 @@ public class Parser { * @param classOrInterfaceDeclaration {@link ClassOrInterfaceDeclaration} * @return {@link List} of all matching {@link MethodDeclaration} */ - protected static List getListOfClassMethods(String methodName, ClassOrInterfaceDeclaration - classOrInterfaceDeclaration) { + protected static List getListOfClassMethods(String methodName, ClassOrInterfaceDeclaration classOrInterfaceDeclaration) { List result = new ArrayList<>(); classOrInterfaceDeclaration.getMethods().stream() .filter(method -> method.getName().toString().equals(methodName)) @@ -1687,16 +1667,6 @@ public class Parser { public static final String MODEL_ABSOLUTE_PATH = "/org.hl7.fhir.%1$s/src/main/java/org/hl7/fhir/%1$s/model/%2$s.java"; public static final String MODEL_PATH_WITHOUT_IMPORT = "/org.hl7.fhir.%1$s/src/main/java/"; - public static String getVersionStringFromPath(String path) { - if (path.contains("dstu2")) return "dstu2"; - if (path.contains("dstu2016may")) return "dstu2016may"; - if (path.contains("dstu3")) return "dstu3"; - if (path.contains("r4")) return "r4"; - if (path.contains("r5")) return "r5"; - - return null; - } - public static String getVersionString(String version) { switch (version) { case ("10"): @@ -1791,15 +1761,13 @@ public class Parser { } } - public static String getLowerVersionAbsPathFromImportStatement(String type1ImportStatement, String - type2ImportStatement, String version) { + public static String getLowerVersionAbsPathFromImportStatement(String type1ImportStatement, String type2ImportStatement, String version) { String type1Path = importStatementToAbsolutePath(type1ImportStatement); String type2Path = importStatementToAbsolutePath(type2ImportStatement); return getLowerVersionAbsPathFromAbsPath(type1Path, type2Path, version); } - public static String getHigherVersionAbsPath(String type1ImportStatement, String type2ImportStatement, String - version) { + public static String getHigherVersionAbsPath(String type1ImportStatement, String type2ImportStatement, String version) { String type1Path = importStatementToAbsolutePath(type1ImportStatement); String type2Path = importStatementToAbsolutePath(type2ImportStatement); From 68979fee959f79a0ffb0ea9dce9e1ad6c807e501 Mon Sep 17 00:00:00 2001 From: markiantorno Date: Thu, 6 Feb 2020 17:24:52 -0500 Subject: [PATCH 05/12] conv10_40 files cleaned up --- .../conv10_40/Appointment10_40.java | 61 +- .../conv10_40/AppointmentResponse10_40.java | 31 +- .../convertors/conv10_40/AuditEvent10_40.java | 97 ++-- .../fhir/convertors/conv10_40/Basic10_40.java | 11 +- .../convertors/conv10_40/Binary10_40.java | 11 +- .../convertors/conv10_40/Bundle10_40.java | 134 ++--- .../convertors/conv10_40/CarePlan10_40.java | 31 +- .../conv10_40/Communication10_40.java | 21 +- .../conv10_40/CommunicationRequest10_40.java | 10 +- .../conv10_40/Composition10_40.java | 39 +- .../convertors/conv10_40/ConceptMap10_40.java | 120 ++-- .../convertors/conv10_40/Condition10_40.java | 12 +- .../conv10_40/Conformance10_40.java | 254 ++++----- .../conv10_40/DataElement10_40.java | 46 +- .../conv10_40/DetectedIssue10_40.java | 29 +- .../conv10_40/DeviceMetric10_40.java | 11 +- .../conv10_40/DeviceUseStatement10_40.java | 11 +- .../conv10_40/DiagnosticReport10_40.java | 31 +- .../conv10_40/DocumentReference10_40.java | 22 +- .../convertors/conv10_40/Encounter10_40.java | 1 + .../conv10_40/EnrollmentRequest10_40.java | 11 +- .../conv10_40/EnrollmentResponse10_40.java | 21 +- .../conv10_40/EpisodeOfCare10_40.java | 1 + .../conv10_40/FamilyMemberHistory10_40.java | 19 +- .../fhir/convertors/conv10_40/Flag10_40.java | 1 + .../fhir/convertors/conv10_40/Group10_40.java | 51 +- .../conv10_40/HealthcareService10_40.java | 81 ++- .../conv10_40/ImplementationGuide10_40.java | 156 +++-- .../fhir/convertors/conv10_40/List10_40.java | 37 +- .../convertors/conv10_40/Location10_40.java | 51 +- .../conv10_40/MedicationDispense10_40.java | 35 +- .../conv10_40/MedicationStatement10_40.java | 13 +- .../conv10_40/MessageHeader10_40.java | 71 +-- .../conv10_40/NamingSystem10_40.java | 89 ++- .../conv10_40/Observation10_40.java | 21 +- .../conv10_40/OperationDefinition10_40.java | 167 +++--- .../conv10_40/OperationOutcome10_40.java | 11 +- .../conv10_40/Organization10_40.java | 21 +- .../convertors/conv10_40/Parameters10_40.java | 11 +- .../convertors/conv10_40/Patient10_40.java | 31 +- .../convertors/conv10_40/Person10_40.java | 21 +- .../conv10_40/Practitioner10_40.java | 21 +- .../conv10_40/Questionnaire10_40.java | 99 ++-- .../conv10_40/QuestionnaireResponse10_40.java | 51 +- .../conv10_40/RiskAssessment10_40.java | 31 +- .../convertors/conv10_40/Schedule10_40.java | 11 +- .../conv10_40/SearchParameter10_40.java | 103 ++-- .../fhir/convertors/conv10_40/Slot10_40.java | 41 +- .../conv10_40/StructureDefinition10_40.java | 163 +++--- .../conv10_40/Subscription10_40.java | 66 +-- .../convertors/conv10_40/Substance10_40.java | 21 +- .../conv10_40/SupplyDelivery10_40.java | 1 + .../conv10_40/SupplyRequest10_40.java | 1 + .../convertors/conv10_40/TestScript10_40.java | 533 ++++++++---------- .../convertors/conv10_40/ValueSet10_40.java | 281 ++++----- .../hl7/fhir/convertors/parser/Parser.java | 30 +- 56 files changed, 1462 insertions(+), 1894 deletions(-) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Appointment10_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Appointment10_40.java index 2a84bf10a..ec7228a76 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Appointment10_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Appointment10_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Appointment10_40 { @@ -18,27 +19,21 @@ public class Appointment10_40 { } if (src.hasType()) tgt.addServiceType(VersionConvertor_10_40.convertCodeableConcept(src.getType())); - if (src.hasPriority()) { - tgt.setPriority(src.getPriority()); - } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } - if (src.hasStart()) { - tgt.setStart(src.getStart()); - } - if (src.hasEnd()) { - tgt.setEnd(src.getEnd()); - } - if (src.hasMinutesDuration()) { - tgt.setMinutesDuration(src.getMinutesDuration()); - } + if (src.hasPriorityElement()) + tgt.setPriorityElement((org.hl7.fhir.r4.model.UnsignedIntType) VersionConvertor_10_40.convertType(src.getPriorityElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getDescriptionElement())); + if (src.hasStartElement()) + tgt.setStartElement((org.hl7.fhir.r4.model.InstantType) VersionConvertor_10_40.convertType(src.getStartElement())); + if (src.hasEndElement()) + tgt.setEndElement((org.hl7.fhir.r4.model.InstantType) VersionConvertor_10_40.convertType(src.getEndElement())); + if (src.hasMinutesDurationElement()) + tgt.setMinutesDurationElement((org.hl7.fhir.r4.model.PositiveIntType) VersionConvertor_10_40.convertType(src.getMinutesDurationElement())); if (src.hasSlot()) { for (org.hl7.fhir.dstu2.model.Reference t : src.getSlot()) tgt.addSlot(VersionConvertor_10_40.convertReference(t)); } - if (src.hasComment()) { - tgt.setComment(src.getComment()); - } + if (src.hasCommentElement()) + tgt.setCommentElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getCommentElement())); if (src.hasParticipant()) { for (org.hl7.fhir.dstu2.model.Appointment.AppointmentParticipantComponent t : src.getParticipant()) tgt.addParticipant(convertAppointmentParticipantComponent(t)); } @@ -59,27 +54,21 @@ public class Appointment10_40 { if (src.hasServiceType()) { for (org.hl7.fhir.r4.model.CodeableConcept t : src.getServiceType()) tgt.setType(VersionConvertor_10_40.convertCodeableConcept(t)); } - if (src.hasPriority()) { - tgt.setPriority(src.getPriority()); - } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } - if (src.hasStart()) { - tgt.setStart(src.getStart()); - } - if (src.hasEnd()) { - tgt.setEnd(src.getEnd()); - } - if (src.hasMinutesDuration()) { - tgt.setMinutesDuration(src.getMinutesDuration()); - } + if (src.hasPriorityElement()) + tgt.setPriorityElement((org.hl7.fhir.dstu2.model.UnsignedIntType) VersionConvertor_10_40.convertType(src.getPriorityElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getDescriptionElement())); + if (src.hasStartElement()) + tgt.setStartElement((org.hl7.fhir.dstu2.model.InstantType) VersionConvertor_10_40.convertType(src.getStartElement())); + if (src.hasEndElement()) + tgt.setEndElement((org.hl7.fhir.dstu2.model.InstantType) VersionConvertor_10_40.convertType(src.getEndElement())); + if (src.hasMinutesDurationElement()) + tgt.setMinutesDurationElement((org.hl7.fhir.dstu2.model.PositiveIntType) VersionConvertor_10_40.convertType(src.getMinutesDurationElement())); if (src.hasSlot()) { for (org.hl7.fhir.r4.model.Reference t : src.getSlot()) tgt.addSlot(VersionConvertor_10_40.convertReference(t)); } - if (src.hasComment()) { - tgt.setComment(src.getComment()); - } + if (src.hasCommentElement()) + tgt.setCommentElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getCommentElement())); if (src.hasParticipant()) { for (org.hl7.fhir.r4.model.Appointment.AppointmentParticipantComponent t : src.getParticipant()) tgt.addParticipant(convertAppointmentParticipantComponent(t)); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/AppointmentResponse10_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/AppointmentResponse10_40.java index ca7369cf1..536fa257a 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/AppointmentResponse10_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/AppointmentResponse10_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class AppointmentResponse10_40 { @@ -16,12 +17,10 @@ public class AppointmentResponse10_40 { if (src.hasAppointment()) { tgt.setAppointment(VersionConvertor_10_40.convertReference(src.getAppointment())); } - if (src.hasStart()) { - tgt.setStart(src.getStart()); - } - if (src.hasEnd()) { - tgt.setEnd(src.getEnd()); - } + if (src.hasStartElement()) + tgt.setStartElement((org.hl7.fhir.r4.model.InstantType) VersionConvertor_10_40.convertType(src.getStartElement())); + if (src.hasEndElement()) + tgt.setEndElement((org.hl7.fhir.r4.model.InstantType) VersionConvertor_10_40.convertType(src.getEndElement())); if (src.hasParticipantType()) { for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getParticipantType()) tgt.addParticipantType(VersionConvertor_10_40.convertCodeableConcept(t)); } @@ -31,9 +30,8 @@ public class AppointmentResponse10_40 { if (src.hasParticipantStatus()) { tgt.setParticipantStatus(convertParticipantStatus(src.getParticipantStatus())); } - if (src.hasComment()) { - tgt.setComment(src.getComment()); - } + if (src.hasCommentElement()) + tgt.setCommentElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getCommentElement())); return tgt; } @@ -48,12 +46,10 @@ public class AppointmentResponse10_40 { if (src.hasAppointment()) { tgt.setAppointment(VersionConvertor_10_40.convertReference(src.getAppointment())); } - if (src.hasStart()) { - tgt.setStart(src.getStart()); - } - if (src.hasEnd()) { - tgt.setEnd(src.getEnd()); - } + if (src.hasStartElement()) + tgt.setStartElement((org.hl7.fhir.dstu2.model.InstantType) VersionConvertor_10_40.convertType(src.getStartElement())); + if (src.hasEndElement()) + tgt.setEndElement((org.hl7.fhir.dstu2.model.InstantType) VersionConvertor_10_40.convertType(src.getEndElement())); if (src.hasParticipantType()) { for (org.hl7.fhir.r4.model.CodeableConcept t : src.getParticipantType()) tgt.addParticipantType(VersionConvertor_10_40.convertCodeableConcept(t)); } @@ -63,9 +59,8 @@ public class AppointmentResponse10_40 { if (src.hasParticipantStatus()) { tgt.setParticipantStatus(convertParticipantStatus(src.getParticipantStatus())); } - if (src.hasComment()) { - tgt.setComment(src.getComment()); - } + if (src.hasCommentElement()) + tgt.setCommentElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getCommentElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/AuditEvent10_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/AuditEvent10_40.java index 0cab2fff0..a3316e82f 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/AuditEvent10_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/AuditEvent10_40.java @@ -1,7 +1,12 @@ package org.hl7.fhir.convertors.conv10_40; +import org.hl7.fhir.convertors.VersionConvertor_10_30; import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.exceptions.FHIRException; +import org.hl7.fhir.r4.model.InstantType; +import org.hl7.fhir.r4.model.StringType; + +import java.util.Collections; public class AuditEvent10_40 { @@ -21,13 +26,13 @@ public class AuditEvent10_40 { tgt.setAction(convertAuditEventAction(src.getEvent().getAction())); } if (src.hasEvent()) { - tgt.setRecorded(src.getEvent().getDateTime()); + tgt.setRecordedElement((InstantType) VersionConvertor_10_40.convertType(src.getEvent().getDateTimeElement())); } if (src.hasEvent()) { tgt.setOutcome(convertAuditEventOutcome(src.getEvent().getOutcome())); } if (src.hasEvent()) { - tgt.setOutcomeDesc(src.getEvent().getOutcomeDesc()); + tgt.setOutcomeDescElement((StringType) VersionConvertor_10_40.convertType(src.getEvent().getOutcomeDescElement())); } if (src.hasEvent()) { for (org.hl7.fhir.dstu2.model.Coding t : src.getEvent().getPurposeOfEvent()) tgt.addPurposeOfEvent().addCoding(VersionConvertor_10_40.convertCoding(t)); @@ -59,14 +64,14 @@ public class AuditEvent10_40 { if (src.hasAction()) { tgt.getEvent().setAction(convertAuditEventAction(src.getAction())); } - if (src.hasRecorded()) { - tgt.getEvent().setDateTime(src.getRecorded()); + if (src.hasRecordedElement()) { + tgt.getEvent().setDateTimeElement((org.hl7.fhir.dstu2.model.InstantType) VersionConvertor_10_40.convertType(src.getRecordedElement())); } if (src.hasOutcome()) { tgt.getEvent().setOutcome(convertAuditEventOutcome(src.getOutcome())); } - if (src.hasOutcomeDesc()) { - tgt.getEvent().setOutcomeDesc(src.getOutcomeDesc()); + if (src.hasOutcomeDescElement()) { + tgt.getEvent().setOutcomeDescElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getOutcomeDescElement())); } if (src.hasPurposeOfEvent()) { for (org.hl7.fhir.r4.model.CodeableConcept t : src.getPurposeOfEvent()) for (org.hl7.fhir.r4.model.Coding cc : t.getCoding()) tgt.getEvent().addPurposeOfEvent(VersionConvertor_10_40.convertCoding(cc)); @@ -134,15 +139,12 @@ public class AuditEvent10_40 { } if (src.hasUserId()) tgt.getWho().setIdentifier(VersionConvertor_10_40.convertIdentifier(src.getUserId())); - if (src.hasAltId()) { - tgt.setAltId(src.getAltId()); - } - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasRequestor()) { - tgt.setRequestor(src.getRequestor()); - } + if (src.hasAltIdElement()) + tgt.setAltIdElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getAltIdElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement())); + if (src.hasRequestorElement()) + tgt.setRequestorElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_10_40.convertType(src.getRequestorElement())); if (src.hasLocation()) { tgt.setLocation(VersionConvertor_10_40.convertReference(src.getLocation())); } @@ -175,15 +177,12 @@ public class AuditEvent10_40 { if (src.getWho().hasReference() || src.getWho().hasDisplay() || src.getWho().hasExtension() || src.getWho().hasId()) tgt.setReference(VersionConvertor_10_40.convertReference(src.getWho())); } - if (src.hasAltId()) { - tgt.setAltId(src.getAltId()); - } - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasRequestor()) { - tgt.setRequestor(src.getRequestor()); - } + if (src.hasAltIdElement()) + tgt.setAltIdElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getAltIdElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement())); + if (src.hasRequestorElement()) + tgt.setRequestorElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getRequestorElement())); if (src.hasLocation()) { tgt.setLocation(VersionConvertor_10_40.convertReference(src.getLocation())); } @@ -207,9 +206,8 @@ public class AuditEvent10_40 { return null; org.hl7.fhir.dstu2.model.AuditEvent.AuditEventParticipantNetworkComponent tgt = new org.hl7.fhir.dstu2.model.AuditEvent.AuditEventParticipantNetworkComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasAddress()) { - tgt.setAddress(src.getAddress()); - } + if (src.hasAddressElement()) + tgt.setAddressElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getAddressElement())); if (src.hasType()) { tgt.setType(convertAuditEventParticipantNetworkType(src.getType())); } @@ -221,9 +219,8 @@ public class AuditEvent10_40 { return null; org.hl7.fhir.r4.model.AuditEvent.AuditEventAgentNetworkComponent tgt = new org.hl7.fhir.r4.model.AuditEvent.AuditEventAgentNetworkComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasAddress()) { - tgt.setAddress(src.getAddress()); - } + if (src.hasAddressElement()) + tgt.setAddressElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getAddressElement())); if (src.hasType()) { tgt.setType(convertAuditEventParticipantNetworkType(src.getType())); } @@ -251,12 +248,10 @@ public class AuditEvent10_40 { if (src.hasSecurityLabel()) { for (org.hl7.fhir.dstu2.model.Coding t : src.getSecurityLabel()) tgt.addSecurityLabel(VersionConvertor_10_40.convertCoding(t)); } - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getDescriptionElement())); if (src.hasQuery()) { tgt.setQuery(src.getQuery()); } @@ -289,12 +284,10 @@ public class AuditEvent10_40 { if (src.hasSecurityLabel()) { for (org.hl7.fhir.r4.model.Coding t : src.getSecurityLabel()) tgt.addSecurityLabel(VersionConvertor_10_40.convertCoding(t)); } - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getDescriptionElement())); if (src.hasQuery()) { tgt.setQuery(src.getQuery()); } @@ -309,9 +302,8 @@ public class AuditEvent10_40 { return null; org.hl7.fhir.dstu2.model.AuditEvent.AuditEventObjectDetailComponent tgt = new org.hl7.fhir.dstu2.model.AuditEvent.AuditEventObjectDetailComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasType()) { - tgt.setType(src.getType()); - } + if (src.hasTypeElement()) + tgt.setTypeElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getTypeElement())); if (src.hasValueStringType()) tgt.setValue(src.getValueStringType().getValue().getBytes()); else if (src.hasValueBase64BinaryType()) @@ -324,9 +316,8 @@ public class AuditEvent10_40 { return null; org.hl7.fhir.r4.model.AuditEvent.AuditEventEntityDetailComponent tgt = new org.hl7.fhir.r4.model.AuditEvent.AuditEventEntityDetailComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasType()) { - tgt.setType(src.getType()); - } + if (src.hasTypeElement()) + tgt.setTypeElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getTypeElement())); if (src.hasValue()) tgt.setValue(new org.hl7.fhir.r4.model.Base64BinaryType(src.getValue())); return tgt; @@ -409,9 +400,8 @@ public class AuditEvent10_40 { return null; org.hl7.fhir.r4.model.AuditEvent.AuditEventSourceComponent tgt = new org.hl7.fhir.r4.model.AuditEvent.AuditEventSourceComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasSite()) { - tgt.setSite(src.getSite()); - } + if (src.hasSiteElement()) + tgt.setSiteElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getSiteElement())); if (src.hasIdentifier()) tgt.getObserver().setIdentifier(VersionConvertor_10_40.convertIdentifier(src.getIdentifier())); if (src.hasType()) { @@ -425,9 +415,8 @@ public class AuditEvent10_40 { return null; org.hl7.fhir.dstu2.model.AuditEvent.AuditEventSourceComponent tgt = new org.hl7.fhir.dstu2.model.AuditEvent.AuditEventSourceComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasSite()) { - tgt.setSite(src.getSite()); - } + if (src.hasSiteElement()) + tgt.setSiteElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getSiteElement())); if (src.hasObserver()) tgt.setIdentifier(VersionConvertor_10_40.convertIdentifier(src.getObserver().getIdentifier())); if (src.hasType()) { diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Basic10_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Basic10_40.java index ea884792b..9502b1eec 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Basic10_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Basic10_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Basic10_40 { @@ -19,9 +20,8 @@ public class Basic10_40 { if (src.hasSubject()) { tgt.setSubject(VersionConvertor_10_40.convertReference(src.getSubject())); } - if (src.hasCreated()) { - tgt.setCreated(src.getCreated()); - } + if (src.hasCreatedElement()) + tgt.setCreatedElement((org.hl7.fhir.r4.model.DateType) VersionConvertor_10_40.convertType(src.getCreatedElement())); if (src.hasAuthor()) { tgt.setAuthor(VersionConvertor_10_40.convertReference(src.getAuthor())); } @@ -42,9 +42,8 @@ public class Basic10_40 { if (src.hasSubject()) { tgt.setSubject(VersionConvertor_10_40.convertReference(src.getSubject())); } - if (src.hasCreated()) { - tgt.setCreated(src.getCreated()); - } + if (src.hasCreatedElement()) + tgt.setCreatedElement((org.hl7.fhir.dstu2.model.DateType) VersionConvertor_10_40.convertType(src.getCreatedElement())); if (src.hasAuthor()) { tgt.setAuthor(VersionConvertor_10_40.convertReference(src.getAuthor())); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Binary10_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Binary10_40.java index 96be11d7d..51f15d7bd 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Binary10_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Binary10_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Binary10_40 { @@ -10,9 +11,8 @@ public class Binary10_40 { return null; org.hl7.fhir.dstu2.model.Binary tgt = new org.hl7.fhir.dstu2.model.Binary(); VersionConvertor_10_40.copyResource(src, tgt); - if (src.hasContentType()) { - tgt.setContentType(src.getContentType()); - } + if (src.hasContentTypeElement()) + tgt.setContentTypeElement((org.hl7.fhir.dstu2.model.CodeType) VersionConvertor_10_40.convertType(src.getContentTypeElement())); tgt.setContent(src.getContent()); return tgt; } @@ -22,9 +22,8 @@ public class Binary10_40 { return null; org.hl7.fhir.r4.model.Binary tgt = new org.hl7.fhir.r4.model.Binary(); VersionConvertor_10_40.copyResource(src, tgt); - if (src.hasContentType()) { - tgt.setContentType(src.getContentType()); - } + if (src.hasContentTypeElement()) + tgt.setContentTypeElement((org.hl7.fhir.r4.model.CodeType) VersionConvertor_10_40.convertType(src.getContentTypeElement())); if (src.hasContent()) { tgt.setContent(src.getContent()); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Bundle10_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Bundle10_40.java index 436ce1764..9beb6d9b8 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Bundle10_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Bundle10_40.java @@ -3,6 +3,7 @@ package org.hl7.fhir.convertors.conv10_40; import org.hl7.fhir.convertors.VersionConvertorAdvisor40; import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Bundle10_40 { @@ -14,8 +15,8 @@ public class Bundle10_40 { if (src.hasType()) { tgt.setType(convertBundleType(src.getType())); } - if (src.hasTotal()) - tgt.setTotal(src.getTotal()); + if (src.hasTotalElement()) + tgt.setTotalElement((org.hl7.fhir.r4.model.UnsignedIntType) VersionConvertor_10_40.convertType(src.getTotalElement())); if (src.hasLink()) { for (org.hl7.fhir.dstu2.model.Bundle.BundleLinkComponent t : src.getLink()) tgt.addLink(convertBundleLinkComponent(t)); } @@ -36,8 +37,8 @@ public class Bundle10_40 { if (src.hasType()) { tgt.setType(convertBundleType(src.getType())); } - if (src.hasTotal()) - tgt.setTotal(src.getTotal()); + if (src.hasTotalElement()) + tgt.setTotalElement((org.hl7.fhir.dstu2.model.UnsignedIntType) VersionConvertor_10_40.convertType(src.getTotalElement())); if (src.hasLink()) { for (org.hl7.fhir.r4.model.Bundle.BundleLinkComponent t : src.getLink()) tgt.addLink(convertBundleLinkComponent(t)); } @@ -61,9 +62,8 @@ public class Bundle10_40 { if (src.hasLink()) { for (org.hl7.fhir.dstu2.model.Bundle.BundleLinkComponent t : src.getLink()) tgt.addLink(convertBundleLinkComponent(t)); } - if (src.hasFullUrl()) { - tgt.setFullUrl(src.getFullUrl()); - } + if (src.hasFullUrlElement()) + tgt.setFullUrlElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_10_40.convertType(src.getFullUrlElement())); if (src.hasResource()) { tgt.setResource(VersionConvertor_10_40.convertResource(src.getResource())); } @@ -113,21 +113,16 @@ public class Bundle10_40 { if (src.hasMethod()) { tgt.setMethod(convertHTTPVerb(src.getMethod())); } - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } - if (src.hasIfNoneMatch()) { - tgt.setIfNoneMatch(src.getIfNoneMatch()); - } - if (src.hasIfModifiedSince()) { - tgt.setIfModifiedSince(src.getIfModifiedSince()); - } - if (src.hasIfMatch()) { - tgt.setIfMatch(src.getIfMatch()); - } - if (src.hasIfNoneExist()) { - tgt.setIfNoneExist(src.getIfNoneExist()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_40.convertType(src.getUrlElement())); + if (src.hasIfNoneMatchElement()) + tgt.setIfNoneMatchElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getIfNoneMatchElement())); + if (src.hasIfModifiedSinceElement()) + tgt.setIfModifiedSinceElement((org.hl7.fhir.dstu2.model.InstantType) VersionConvertor_10_40.convertType(src.getIfModifiedSinceElement())); + if (src.hasIfMatchElement()) + tgt.setIfMatchElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getIfMatchElement())); + if (src.hasIfNoneExistElement()) + tgt.setIfNoneExistElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getIfNoneExistElement())); return tgt; } @@ -139,21 +134,16 @@ public class Bundle10_40 { if (src.hasMethod()) { tgt.setMethod(convertHTTPVerb(src.getMethod())); } - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } - if (src.hasIfNoneMatch()) { - tgt.setIfNoneMatch(src.getIfNoneMatch()); - } - if (src.hasIfModifiedSince()) { - tgt.setIfModifiedSince(src.getIfModifiedSince()); - } - if (src.hasIfMatch()) { - tgt.setIfMatch(src.getIfMatch()); - } - if (src.hasIfNoneExist()) { - tgt.setIfNoneExist(src.getIfNoneExist()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_10_40.convertType(src.getUrlElement())); + if (src.hasIfNoneMatchElement()) + tgt.setIfNoneMatchElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getIfNoneMatchElement())); + if (src.hasIfModifiedSinceElement()) + tgt.setIfModifiedSinceElement((org.hl7.fhir.r4.model.InstantType) VersionConvertor_10_40.convertType(src.getIfModifiedSinceElement())); + if (src.hasIfMatchElement()) + tgt.setIfMatchElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getIfMatchElement())); + if (src.hasIfNoneExistElement()) + tgt.setIfNoneExistElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getIfNoneExistElement())); return tgt; } @@ -162,18 +152,14 @@ public class Bundle10_40 { return null; org.hl7.fhir.dstu2.model.Bundle.BundleEntryResponseComponent tgt = new org.hl7.fhir.dstu2.model.Bundle.BundleEntryResponseComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasStatus()) { - tgt.setStatus(src.getStatus()); - } - if (src.hasLocation()) { - tgt.setLocation(src.getLocation()); - } - if (src.hasEtag()) { - tgt.setEtag(src.getEtag()); - } - if (src.hasLastModified()) { - tgt.setLastModified(src.getLastModified()); - } + if (src.hasStatusElement()) + tgt.setStatusElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getStatusElement())); + if (src.hasLocationElement()) + tgt.setLocationElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_40.convertType(src.getLocationElement())); + if (src.hasEtagElement()) + tgt.setEtagElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getEtagElement())); + if (src.hasLastModifiedElement()) + tgt.setLastModifiedElement((org.hl7.fhir.dstu2.model.InstantType) VersionConvertor_10_40.convertType(src.getLastModifiedElement())); return tgt; } @@ -182,18 +168,14 @@ public class Bundle10_40 { return null; org.hl7.fhir.r4.model.Bundle.BundleEntryResponseComponent tgt = new org.hl7.fhir.r4.model.Bundle.BundleEntryResponseComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasStatus()) { - tgt.setStatus(src.getStatus()); - } - if (src.hasLocation()) { - tgt.setLocation(src.getLocation()); - } - if (src.hasEtag()) { - tgt.setEtag(src.getEtag()); - } - if (src.hasLastModified()) { - tgt.setLastModified(src.getLastModified()); - } + if (src.hasStatusElement()) + tgt.setStatusElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getStatusElement())); + if (src.hasLocationElement()) + tgt.setLocationElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_10_40.convertType(src.getLocationElement())); + if (src.hasEtagElement()) + tgt.setEtagElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getEtagElement())); + if (src.hasLastModifiedElement()) + tgt.setLastModifiedElement((org.hl7.fhir.r4.model.InstantType) VersionConvertor_10_40.convertType(src.getLastModifiedElement())); return tgt; } @@ -205,9 +187,8 @@ public class Bundle10_40 { if (src.hasMode()) { tgt.setMode(convertSearchEntryMode(src.getMode())); } - if (src.hasScore()) { - tgt.setScore(src.getScore()); - } + if (src.hasScoreElement()) + tgt.setScoreElement((org.hl7.fhir.dstu2.model.DecimalType) VersionConvertor_10_40.convertType(src.getScoreElement())); return tgt; } @@ -219,9 +200,8 @@ public class Bundle10_40 { if (src.hasMode()) { tgt.setMode(convertSearchEntryMode(src.getMode())); } - if (src.hasScore()) { - tgt.setScore(src.getScore()); - } + if (src.hasScoreElement()) + tgt.setScoreElement((org.hl7.fhir.r4.model.DecimalType) VersionConvertor_10_40.convertType(src.getScoreElement())); return tgt; } @@ -230,12 +210,10 @@ public class Bundle10_40 { return null; org.hl7.fhir.r4.model.Bundle.BundleLinkComponent tgt = new org.hl7.fhir.r4.model.Bundle.BundleLinkComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasRelation()) { - tgt.setRelation(src.getRelation()); - } - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } + if (src.hasRelationElement()) + tgt.setRelationElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getRelationElement())); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_10_40.convertType(src.getUrlElement())); return tgt; } @@ -244,12 +222,10 @@ public class Bundle10_40 { return null; org.hl7.fhir.dstu2.model.Bundle.BundleLinkComponent tgt = new org.hl7.fhir.dstu2.model.Bundle.BundleLinkComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasRelation()) { - tgt.setRelation(src.getRelation()); - } - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } + if (src.hasRelationElement()) + tgt.setRelationElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getRelationElement())); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_40.convertType(src.getUrlElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/CarePlan10_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/CarePlan10_40.java index 7ff2ff587..1497646ad 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/CarePlan10_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/CarePlan10_40.java @@ -2,6 +2,9 @@ package org.hl7.fhir.convertors.conv10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.exceptions.FHIRException; +import org.hl7.fhir.r4.model.BooleanType; + +import java.util.Collections; public class CarePlan10_40 { @@ -32,9 +35,8 @@ public class CarePlan10_40 { if (src.hasCategory()) { for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getCategory()) tgt.addCategory(VersionConvertor_10_40.convertCodeableConcept(t)); } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getDescriptionElement())); if (src.hasAddresses()) { for (org.hl7.fhir.dstu2.model.Reference t : src.getAddresses()) tgt.addAddresses(VersionConvertor_10_40.convertReference(t)); } @@ -75,9 +77,8 @@ public class CarePlan10_40 { if (src.hasCategory()) { for (org.hl7.fhir.r4.model.CodeableConcept t : src.getCategory()) tgt.addCategory(VersionConvertor_10_40.convertCodeableConcept(t)); } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getDescriptionElement())); if (src.hasAddresses()) { for (org.hl7.fhir.r4.model.Reference t : src.getAddresses()) tgt.addAddresses(VersionConvertor_10_40.convertReference(t)); } @@ -144,8 +145,8 @@ public class CarePlan10_40 { if (src.hasStatus()) { tgt.setStatus(convertCarePlanActivityStatus(src.getStatus())); } - if (src.hasDoNotPerform()) { - tgt.setProhibited(src.getDoNotPerform()); + if (src.hasDoNotPerformElement()) { + tgt.setProhibitedElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getDoNotPerformElement())); } if (src.hasScheduled()) { tgt.setScheduled(VersionConvertor_10_40.convertType(src.getScheduled())); @@ -165,9 +166,8 @@ public class CarePlan10_40 { if (src.hasQuantity()) { tgt.setQuantity(VersionConvertor_10_40.convertSimpleQuantity(src.getQuantity())); } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getDescriptionElement())); return tgt; } @@ -191,8 +191,8 @@ public class CarePlan10_40 { if (src.hasStatus()) { tgt.setStatus(convertCarePlanActivityStatus(src.getStatus())); } - if (src.hasProhibited()) { - tgt.setDoNotPerform(src.getProhibited()); + if (src.hasProhibitedElement()) { + tgt.setDoNotPerformElement((BooleanType) VersionConvertor_10_40.convertType(src.getProhibitedElement())); } if (src.hasScheduled()) { tgt.setScheduled(VersionConvertor_10_40.convertType(src.getScheduled())); @@ -212,9 +212,8 @@ public class CarePlan10_40 { if (src.hasQuantity()) { tgt.setQuantity(VersionConvertor_10_40.convertSimpleQuantity(src.getQuantity())); } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getDescriptionElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Communication10_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Communication10_40.java index 1f40a23b9..93d299910 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Communication10_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Communication10_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Communication10_40 { @@ -34,12 +35,10 @@ public class Communication10_40 { if (src.hasEncounter()) { tgt.setEncounter(VersionConvertor_10_40.convertReference(src.getEncounter())); } - if (src.hasSent()) { - tgt.setSent(src.getSent()); - } - if (src.hasReceived()) { - tgt.setReceived(src.getReceived()); - } + if (src.hasSentElement()) + tgt.setSentElement((org.hl7.fhir.r4.model.DateTimeType) VersionConvertor_10_40.convertType(src.getSentElement())); + if (src.hasReceivedElement()) + tgt.setReceivedElement((org.hl7.fhir.r4.model.DateTimeType) VersionConvertor_10_40.convertType(src.getReceivedElement())); if (src.hasReason()) { for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getReason()) tgt.addReasonCode(VersionConvertor_10_40.convertCodeableConcept(t)); } @@ -78,12 +77,10 @@ public class Communication10_40 { if (src.hasEncounter()) { tgt.setEncounter(VersionConvertor_10_40.convertReference(src.getEncounter())); } - if (src.hasSent()) { - tgt.setSent(src.getSent()); - } - if (src.hasReceived()) { - tgt.setReceived(src.getReceived()); - } + if (src.hasSentElement()) + tgt.setSentElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_40.convertType(src.getSentElement())); + if (src.hasReceivedElement()) + tgt.setReceivedElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_40.convertType(src.getReceivedElement())); if (src.hasReasonCode()) { for (org.hl7.fhir.r4.model.CodeableConcept t : src.getReasonCode()) tgt.addReason(VersionConvertor_10_40.convertCodeableConcept(t)); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/CommunicationRequest10_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/CommunicationRequest10_40.java index f58e1d575..be2a6882e 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/CommunicationRequest10_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/CommunicationRequest10_40.java @@ -1,7 +1,9 @@ package org.hl7.fhir.convertors.conv10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40; +import org.hl7.fhir.dstu2.model.DateTimeType; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class CommunicationRequest10_40 { @@ -43,8 +45,8 @@ public class CommunicationRequest10_40 { if (src.hasReasonCode()) { for (org.hl7.fhir.r4.model.CodeableConcept t : src.getReasonCode()) tgt.addReason(VersionConvertor_10_40.convertCodeableConcept(t)); } - if (src.hasAuthoredOn()) { - tgt.setRequestedOn(src.getAuthoredOn()); + if (src.hasAuthoredOnElement()) { + tgt.setRequestedOnElement((DateTimeType) VersionConvertor_10_40.convertType(src.getAuthoredOnElement())); } if (src.hasSubject()) { tgt.setSubject(VersionConvertor_10_40.convertReference(src.getSubject())); @@ -93,8 +95,8 @@ public class CommunicationRequest10_40 { if (src.hasReason()) { for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getReason()) tgt.addReasonCode(VersionConvertor_10_40.convertCodeableConcept(t)); } - if (src.hasRequestedOn()) { - tgt.setAuthoredOn(src.getRequestedOn()); + if (src.hasRequestedOnElement()) { + tgt.setAuthoredOnElement((org.hl7.fhir.r4.model.DateTimeType) VersionConvertor_10_40.convertType(src.getRequestedOnElement())); } if (src.hasSubject()) { tgt.setSubject(VersionConvertor_10_40.convertReference(src.getSubject())); diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Composition10_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Composition10_40.java index 974287ee4..09daa8f24 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Composition10_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Composition10_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Composition10_40 { @@ -13,16 +14,15 @@ public class Composition10_40 { if (src.hasIdentifier()) { tgt.setIdentifier(VersionConvertor_10_40.convertIdentifier(src.getIdentifier())); } - if (src.hasDate()) - tgt.setDate(src.getDate()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_40.convertType(src.getDateElement())); if (src.hasType()) { tgt.setType(VersionConvertor_10_40.convertCodeableConcept(src.getType())); } if (src.hasCategory()) tgt.setClass_(VersionConvertor_10_40.convertCodeableConcept(src.getCategoryFirstRep())); - if (src.hasTitle()) { - tgt.setTitle(src.getTitle()); - } + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getTitleElement())); if (src.hasStatus()) { tgt.setStatus(convertCompositionStatus(src.getStatus())); } @@ -61,17 +61,16 @@ public class Composition10_40 { if (src.hasIdentifier()) { tgt.setIdentifier(VersionConvertor_10_40.convertIdentifier(src.getIdentifier())); } - if (src.hasDate()) - tgt.setDate(src.getDate()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.r4.model.DateTimeType) VersionConvertor_10_40.convertType(src.getDateElement())); if (src.hasType()) { tgt.setType(VersionConvertor_10_40.convertCodeableConcept(src.getType())); } if (src.hasClass_()) { tgt.addCategory(VersionConvertor_10_40.convertCodeableConcept(src.getClass_())); } - if (src.hasTitle()) { - tgt.setTitle(src.getTitle()); - } + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getTitleElement())); if (src.hasStatus()) { tgt.setStatus(convertCompositionStatus(src.getStatus())); } @@ -147,9 +146,8 @@ public class Composition10_40 { VersionConvertor_10_40.copyElement(src, tgt); if (src.hasMode()) tgt.addMode(convertCompositionAttestationMode(src.getMode())); - if (src.hasTime()) { - tgt.setTime(src.getTime()); - } + if (src.hasTimeElement()) + tgt.setTimeElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_40.convertType(src.getTimeElement())); if (src.hasParty()) { tgt.setParty(VersionConvertor_10_40.convertReference(src.getParty())); } @@ -163,9 +161,8 @@ public class Composition10_40 { VersionConvertor_10_40.copyElement(src, tgt); if (src.hasMode()) tgt.setMode(convertCompositionAttestationMode(src.getMode().get(0).getValue())); - if (src.hasTime()) { - tgt.setTime(src.getTime()); - } + if (src.hasTimeElement()) + tgt.setTimeElement((org.hl7.fhir.r4.model.DateTimeType) VersionConvertor_10_40.convertType(src.getTimeElement())); if (src.hasParty()) { tgt.setParty(VersionConvertor_10_40.convertReference(src.getParty())); } @@ -245,9 +242,8 @@ public class Composition10_40 { return null; org.hl7.fhir.r4.model.Composition.SectionComponent tgt = new org.hl7.fhir.r4.model.Composition.SectionComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasTitle()) { - tgt.setTitle(src.getTitle()); - } + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getTitleElement())); if (src.hasCode()) { tgt.setCode(VersionConvertor_10_40.convertCodeableConcept(src.getCode())); } @@ -281,9 +277,8 @@ public class Composition10_40 { return null; org.hl7.fhir.dstu2.model.Composition.SectionComponent tgt = new org.hl7.fhir.dstu2.model.Composition.SectionComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasTitle()) { - tgt.setTitle(src.getTitle()); - } + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getTitleElement())); if (src.hasCode()) { tgt.setCode(VersionConvertor_10_40.convertCodeableConcept(src.getCode())); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/ConceptMap10_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/ConceptMap10_40.java index 514539dc6..3d68819e1 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/ConceptMap10_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/ConceptMap10_40.java @@ -2,11 +2,12 @@ package org.hl7.fhir.convertors.conv10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.exceptions.FHIRException; -import org.hl7.fhir.r4.model.CanonicalType; -import org.hl7.fhir.r4.model.ConceptMap; +import org.hl7.fhir.r4.model.*; import org.hl7.fhir.r4.model.ConceptMap.ConceptMapGroupComponent; + import java.util.ArrayList; import java.util.List; +import java.util.Collections; public class ConceptMap10_40 { @@ -15,17 +16,17 @@ public class ConceptMap10_40 { return null; org.hl7.fhir.r4.model.ConceptMap tgt = new org.hl7.fhir.r4.model.ConceptMap(); VersionConvertor_10_40.copyDomainResource(src, tgt); - tgt.setUrl(src.getUrl()); + tgt.setUrlElement((UriType) VersionConvertor_10_40.convertType(src.getUrlElement())); tgt.setIdentifier(VersionConvertor_10_40.convertIdentifier(src.getIdentifier())); - tgt.setVersion(src.getVersion()); - tgt.setName(src.getName()); + tgt.setVersionElement((StringType) VersionConvertor_10_40.convertType(src.getVersionElement())); + tgt.setNameElement((StringType) VersionConvertor_10_40.convertType(src.getNameElement())); tgt.setStatus(VersionConvertor_10_40.convertConformanceResourceStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_10_40.convertType(src.getExperimentalElement())); + tgt.setPublisherElement((StringType) VersionConvertor_10_40.convertType(src.getPublisherElement())); for (org.hl7.fhir.dstu2.model.ConceptMap.ConceptMapContactComponent t : src.getContact()) tgt.addContact(convertConceptMapContactComponent(t)); - if (src.hasDate()) - tgt.setDate(src.getDate()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.r4.model.DateTimeType) VersionConvertor_10_40.convertType(src.getDateElement())); tgt.setDescription(src.getDescription()); for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getUseContext()) if (VersionConvertor_10_40.isJurisdiction(t)) tgt.addJurisdiction(VersionConvertor_10_40.convertCodeableConcept(t)); @@ -49,34 +50,29 @@ public class ConceptMap10_40 { return null; org.hl7.fhir.dstu2.model.ConceptMap tgt = new org.hl7.fhir.dstu2.model.ConceptMap(); VersionConvertor_10_40.copyDomainResource(src, tgt); - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_40.convertType(src.getUrlElement())); if (src.hasIdentifier()) { tgt.setIdentifier(VersionConvertor_10_40.convertIdentifier(src.getIdentifier())); } - if (src.hasVersion()) { - tgt.setVersion(src.getVersion()); - } - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_10_40.convertConformanceResourceStatus(src.getStatus())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasPublisher()) { - tgt.setPublisher(src.getPublisher()); - } + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getExperimentalElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact()) tgt.addContact(convertConceptMapContactComponent(t)); } - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_40.convertType(src.getDateElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getDescriptionElement())); for (org.hl7.fhir.r4.model.UsageContext t : src.getUseContext()) if (t.hasValueCodeableConcept()) tgt.addUseContext(VersionConvertor_10_40.convertCodeableConcept(t.getValueCodeableConcept())); if (src.hasJurisdiction()) { @@ -85,9 +81,8 @@ public class ConceptMap10_40 { if (src.hasPurpose()) { tgt.setRequirements(src.getPurpose()); } - if (src.hasCopyright()) { - tgt.setCopyright(src.getCopyright()); - } + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getCopyrightElement())); if (src.hasSource()) { tgt.setSource(VersionConvertor_10_40.convertType(src.getSource())); } @@ -105,9 +100,8 @@ public class ConceptMap10_40 { return null; org.hl7.fhir.dstu2.model.ConceptMap.ConceptMapContactComponent tgt = new org.hl7.fhir.dstu2.model.ConceptMap.ConceptMapContactComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.r4.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_40.convertContactPoint(t)); } @@ -119,9 +113,8 @@ public class ConceptMap10_40 { return null; org.hl7.fhir.r4.model.ContactDetail tgt = new org.hl7.fhir.r4.model.ContactDetail(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_40.convertContactPoint(t)); } @@ -187,14 +180,14 @@ public class ConceptMap10_40 { return null; org.hl7.fhir.r4.model.ConceptMap.OtherElementComponent tgt = new org.hl7.fhir.r4.model.ConceptMap.OtherElementComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasElement()) { - tgt.setProperty(src.getElement()); + if (src.hasElementElement()) { + tgt.setPropertyElement((UriType) VersionConvertor_10_40.convertType(src.getElementElement())); } - if (src.hasCodeSystem()) { - tgt.setSystem(src.getCodeSystem()); + if (src.hasCodeSystemElement()) { + tgt.setSystemElement((CanonicalType) VersionConvertor_10_40.convertType(src.getCodeSystemElement())); } - if (src.hasCode()) { - tgt.setValue(src.getCode()); + if (src.hasCodeElement()) { + tgt.setValueElement((StringType) VersionConvertor_10_40.convertType(src.getCodeElement())); } return tgt; } @@ -204,14 +197,14 @@ public class ConceptMap10_40 { return null; org.hl7.fhir.dstu2.model.ConceptMap.OtherElementComponent tgt = new org.hl7.fhir.dstu2.model.ConceptMap.OtherElementComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasProperty()) { - tgt.setElement(src.getProperty()); + if (src.hasPropertyElement()) { + tgt.setElementElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_40.convertType(src.getPropertyElement())); } - if (src.hasSystem()) { - tgt.setCodeSystem(src.getSystem()); + if (src.hasSystemElement()) { + tgt.setCodeSystemElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_40.convertType(src.getSystemElement())); } - if (src.hasValue()) { - tgt.setCode(src.getValue()); + if (src.hasValueElement()) { + tgt.setCodeElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getValueElement())); } return tgt; } @@ -223,8 +216,8 @@ public class ConceptMap10_40 { for (org.hl7.fhir.dstu2.model.ConceptMap.TargetElementComponent t : src.getTarget()) { org.hl7.fhir.r4.model.ConceptMap.SourceElementComponent tgt = new org.hl7.fhir.r4.model.ConceptMap.SourceElementComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasCode()) { - tgt.setCode(src.getCode()); + if (src.hasCodeElement()) { + tgt.setCodeElement((CodeType) VersionConvertor_10_40.convertType(src.getCodeElement())); } tgt.addTarget(convertTargetElementComponent(t)); if (src.hasCodeSystem()) { @@ -240,9 +233,8 @@ public class ConceptMap10_40 { org.hl7.fhir.dstu2.model.ConceptMap.SourceElementComponent tgt = new org.hl7.fhir.dstu2.model.ConceptMap.SourceElementComponent(); VersionConvertor_10_40.copyElement(src, tgt); tgt.setCodeSystem(g.getSource()); - if (src.hasCode()) { - tgt.setCode(src.getCode()); - } + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu2.model.CodeType) VersionConvertor_10_40.convertType(src.getCodeElement())); if (src.hasTarget()) { for (org.hl7.fhir.r4.model.ConceptMap.TargetElementComponent t : src.getTarget()) tgt.addTarget(convertTargetElementComponent(t, g)); } @@ -255,14 +247,13 @@ public class ConceptMap10_40 { org.hl7.fhir.dstu2.model.ConceptMap.TargetElementComponent tgt = new org.hl7.fhir.dstu2.model.ConceptMap.TargetElementComponent(); VersionConvertor_10_40.copyElement(src, tgt); tgt.setCodeSystem(g.getTarget()); - if (src.hasCode()) { - tgt.setCode(src.getCode()); - } + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu2.model.CodeType) VersionConvertor_10_40.convertType(src.getCodeElement())); if (src.hasEquivalence()) { tgt.setEquivalence(convertConceptMapEquivalence(src.getEquivalence())); } - if (src.hasComment()) { - tgt.setComments(src.getComment()); + if (src.hasCommentElement()) { + tgt.setCommentsElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getCommentElement())); } if (src.hasDependsOn()) { for (org.hl7.fhir.r4.model.ConceptMap.OtherElementComponent t : src.getDependsOn()) tgt.addDependsOn(convertOtherElementComponent(t)); @@ -278,14 +269,13 @@ public class ConceptMap10_40 { return null; org.hl7.fhir.r4.model.ConceptMap.TargetElementComponent tgt = new org.hl7.fhir.r4.model.ConceptMap.TargetElementComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasCode()) { - tgt.setCode(src.getCode()); - } + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.r4.model.CodeType) VersionConvertor_10_40.convertType(src.getCodeElement())); if (src.hasEquivalence()) { tgt.setEquivalence(convertConceptMapEquivalence(src.getEquivalence())); } - if (src.hasComments()) { - tgt.setComment(src.getComments()); + if (src.hasCommentsElement()) { + tgt.setCommentElement((StringType) VersionConvertor_10_40.convertType(src.getCommentsElement())); } if (src.hasDependsOn()) { for (org.hl7.fhir.dstu2.model.ConceptMap.OtherElementComponent t : src.getDependsOn()) tgt.addDependsOn(convertOtherElementComponent(t)); diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Condition10_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Condition10_40.java index b3691aed3..ba5dac2ea 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Condition10_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Condition10_40.java @@ -1,7 +1,11 @@ package org.hl7.fhir.convertors.conv10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40; +import org.hl7.fhir.dstu2.model.DateType; import org.hl7.fhir.exceptions.FHIRException; +import org.hl7.fhir.r4.model.DateTimeType; + +import java.util.Collections; public class Condition10_40 { @@ -22,8 +26,8 @@ public class Condition10_40 { if (src.hasAsserter()) { tgt.setAsserter(VersionConvertor_10_40.convertReference(src.getAsserter())); } - if (src.hasRecordedDate()) - tgt.setDateRecorded(src.getRecordedDate()); + if (src.hasRecordedDateElement()) + tgt.setDateRecordedElement((DateType) VersionConvertor_10_40.convertType(src.getRecordedDateElement())); if (src.hasCode()) { tgt.setCode(VersionConvertor_10_40.convertCodeableConcept(src.getCode())); } @@ -73,8 +77,8 @@ public class Condition10_40 { if (src.hasAsserter()) { tgt.setAsserter(VersionConvertor_10_40.convertReference(src.getAsserter())); } - if (src.hasDateRecorded()) - tgt.setRecordedDate(src.getDateRecorded()); + if (src.hasDateRecordedElement()) + tgt.setRecordedDateElement((DateTimeType) VersionConvertor_10_40.convertType(src.getDateRecordedElement())); if (src.hasCode()) { tgt.setCode(VersionConvertor_10_40.convertCodeableConcept(src.getCode())); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Conformance10_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Conformance10_40.java index 61358a884..98be787c2 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Conformance10_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Conformance10_40.java @@ -2,11 +2,17 @@ package org.hl7.fhir.convertors.conv10_40; import org.hl7.fhir.convertors.VersionConvertorConstants; import org.hl7.fhir.convertors.VersionConvertor_10_40; +import org.hl7.fhir.dstu2.model.StringType; +import org.hl7.fhir.dstu2.model.UnsignedIntType; +import org.hl7.fhir.dstu2.model.UriType; import org.hl7.fhir.exceptions.FHIRException; +import org.hl7.fhir.r4.model.*; import org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestComponent; import org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestResourceComponent; import org.hl7.fhir.r4.model.CapabilityStatement.SystemRestfulInteraction; +import java.util.Collections; + public class Conformance10_40 { public static org.hl7.fhir.dstu2.model.Conformance.ConditionalDeleteStatus convertConditionalDeleteStatus(org.hl7.fhir.r4.model.CapabilityStatement.ConditionalDeleteStatus src) throws FHIRException { @@ -44,37 +50,31 @@ public class Conformance10_40 { return null; org.hl7.fhir.dstu2.model.Conformance tgt = new org.hl7.fhir.dstu2.model.Conformance(); VersionConvertor_10_40.copyDomainResource(src, tgt, "http://hl7.org/fhir/3.0/StructureDefinition/extension-CapabilityStatement.acceptUnknown"); - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } - if (src.hasVersion()) { - tgt.setVersion(src.getVersion()); - } - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_40.convertType(src.getUrlElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_10_40.convertConformanceResourceStatus(src.getStatus())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) { - tgt.setPublisher(src.getPublisher()); - } + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getExperimentalElement())); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_40.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact()) tgt.addContact(convertConformanceContactComponent(t)); } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } - if (src.hasPurpose()) { - tgt.setRequirements(src.getPurpose()); - } - if (src.hasCopyright()) { - tgt.setCopyright(src.getCopyright()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getDescriptionElement())); + if (src.hasPurposeElement()) { + tgt.setRequirementsElement((StringType) VersionConvertor_10_40.convertType(src.getPurposeElement())); } + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getCopyrightElement())); if (src.hasKind()) { tgt.setKind(convertConformanceStatementKind(src.getKind())); } @@ -110,25 +110,21 @@ public class Conformance10_40 { return null; org.hl7.fhir.r4.model.CapabilityStatement tgt = new org.hl7.fhir.r4.model.CapabilityStatement(); VersionConvertor_10_40.copyDomainResource(src, tgt); - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } - if (src.hasVersion()) { - tgt.setVersion(src.getVersion()); - } - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_10_40.convertType(src.getUrlElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_10_40.convertConformanceResourceStatus(src.getStatus())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) { - tgt.setPublisher(src.getPublisher()); - } + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_10_40.convertType(src.getExperimentalElement())); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.r4.model.DateTimeType) VersionConvertor_10_40.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu2.model.Conformance.ConformanceContactComponent t : src.getContact()) tgt.addContact(convertConformanceContactComponent(t)); } @@ -175,9 +171,8 @@ public class Conformance10_40 { return null; org.hl7.fhir.dstu2.model.Conformance.ConformanceContactComponent tgt = new org.hl7.fhir.dstu2.model.Conformance.ConformanceContactComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.r4.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_40.convertContactPoint(t)); } @@ -189,9 +184,8 @@ public class Conformance10_40 { return null; org.hl7.fhir.r4.model.ContactDetail tgt = new org.hl7.fhir.r4.model.ContactDetail(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_40.convertContactPoint(t)); } @@ -206,8 +200,8 @@ public class Conformance10_40 { if (src.hasMode()) { tgt.setMode(convertDocumentMode(src.getMode())); } - if (src.hasDocumentation()) { - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) { + tgt.setDocumentationElement((MarkdownType) VersionConvertor_10_40.convertType(src.getDocumentationElement())); } if (src.hasProfile()) { tgt.setProfileElement(VersionConvertor_10_40.convertReferenceToCanonical(src.getProfile())); @@ -223,8 +217,8 @@ public class Conformance10_40 { if (src.hasMode()) { tgt.setMode(convertDocumentMode(src.getMode())); } - if (src.hasDocumentation()) { - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) { + tgt.setDocumentationElement((StringType) VersionConvertor_10_40.convertType(src.getDocumentationElement())); } if (src.hasProfileElement()) { tgt.setProfile(VersionConvertor_10_40.convertCanonicalToReference(src.getProfileElement())); @@ -237,9 +231,8 @@ public class Conformance10_40 { return null; org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementImplementationComponent tgt = new org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementImplementationComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getDescriptionElement())); if (src.hasUrl()) { tgt.setUrl(src.getUrl()); } @@ -251,12 +244,10 @@ public class Conformance10_40 { return null; org.hl7.fhir.dstu2.model.Conformance.ConformanceImplementationComponent tgt = new org.hl7.fhir.dstu2.model.Conformance.ConformanceImplementationComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getDescriptionElement())); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_40.convertType(src.getUrlElement())); return tgt; } @@ -268,11 +259,11 @@ public class Conformance10_40 { if (src.hasEndpoint()) { for (org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementMessagingEndpointComponent t : src.getEndpoint()) tgt.addEndpoint(convertConformanceMessagingEndpointComponent(t)); } - if (src.hasReliableCache()) { - tgt.setReliableCache(src.getReliableCache()); + if (src.hasReliableCacheElement()) { + tgt.setReliableCacheElement((UnsignedIntType) VersionConvertor_10_40.convertType(src.getReliableCacheElement())); } - if (src.hasDocumentation()) { - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) { + tgt.setDocumentationElement((StringType) VersionConvertor_10_40.convertType(src.getDocumentationElement())); } for (org.hl7.fhir.r4.model.Extension e : src.getExtensionsByUrl(VersionConvertorConstants.IG_CONFORMANCE_MESSAGE_EVENT)) { org.hl7.fhir.dstu2.model.Conformance.ConformanceMessagingEventComponent event = new org.hl7.fhir.dstu2.model.Conformance.ConformanceMessagingEventComponent(); @@ -304,11 +295,11 @@ public class Conformance10_40 { if (src.hasEndpoint()) { for (org.hl7.fhir.dstu2.model.Conformance.ConformanceMessagingEndpointComponent t : src.getEndpoint()) tgt.addEndpoint(convertConformanceMessagingEndpointComponent(t)); } - if (src.hasReliableCache()) { - tgt.setReliableCache(src.getReliableCache()); + if (src.hasReliableCacheElement()) { + tgt.setReliableCacheElement((org.hl7.fhir.r4.model.UnsignedIntType) VersionConvertor_10_40.convertType(src.getReliableCacheElement())); } - if (src.hasDocumentation()) { - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) { + tgt.setDocumentationElement((MarkdownType) VersionConvertor_10_40.convertType(src.getDocumentationElement())); } for (org.hl7.fhir.dstu2.model.Conformance.ConformanceMessagingEventComponent t : src.getEvent()) { org.hl7.fhir.r4.model.Extension e = new org.hl7.fhir.r4.model.Extension(VersionConvertorConstants.IG_CONFORMANCE_MESSAGE_EVENT); @@ -341,8 +332,8 @@ public class Conformance10_40 { if (src.hasProtocol()) { tgt.setProtocol(VersionConvertor_10_40.convertCoding(src.getProtocol())); } - if (src.hasAddress()) { - tgt.setAddress(src.getAddress()); + if (src.hasAddressElement()) { + tgt.setAddressElement((UrlType) VersionConvertor_10_40.convertType(src.getAddressElement())); } return tgt; } @@ -355,8 +346,8 @@ public class Conformance10_40 { if (src.hasProtocol()) { tgt.setProtocol(VersionConvertor_10_40.convertCoding(src.getProtocol())); } - if (src.hasAddress()) { - tgt.setAddress(src.getAddress()); + if (src.hasAddressElement()) { + tgt.setAddressElement((UriType) VersionConvertor_10_40.convertType(src.getAddressElement())); } return tgt; } @@ -369,8 +360,8 @@ public class Conformance10_40 { if (src.hasMode()) { tgt.setMode(convertRestfulConformanceMode(src.getMode())); } - if (src.hasDocumentation()) { - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) { + tgt.setDocumentationElement((MarkdownType) VersionConvertor_10_40.convertType(src.getDocumentationElement())); } if (src.hasSecurity()) { tgt.setSecurity(convertConformanceRestSecurityComponent(src.getSecurity())); @@ -403,8 +394,8 @@ public class Conformance10_40 { if (src.hasMode()) { tgt.setMode(convertRestfulConformanceMode(src.getMode())); } - if (src.hasDocumentation()) { - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) { + tgt.setDocumentationElement((StringType) VersionConvertor_10_40.convertType(src.getDocumentationElement())); } if (src.hasSecurity()) { tgt.setSecurity(convertConformanceRestSecurityComponent(src.getSecurity())); @@ -443,9 +434,8 @@ public class Conformance10_40 { return null; org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestResourceOperationComponent tgt = new org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestResourceOperationComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement())); if (src.hasDefinition()) { tgt.setDefinitionElement(VersionConvertor_10_40.convertReferenceToCanonical(src.getDefinition())); } @@ -457,9 +447,8 @@ public class Conformance10_40 { return null; org.hl7.fhir.dstu2.model.Conformance.ConformanceRestOperationComponent tgt = new org.hl7.fhir.dstu2.model.Conformance.ConformanceRestOperationComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement())); if (src.hasDefinitionElement()) { tgt.setDefinition(VersionConvertor_10_40.convertCanonicalToReference(src.getDefinitionElement())); } @@ -471,8 +460,8 @@ public class Conformance10_40 { return null; org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestResourceComponent tgt = new org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestResourceComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasType()) { - tgt.setType(src.getType()); + if (src.hasTypeElement()) { + tgt.setTypeElement((CodeType) VersionConvertor_10_40.convertType(src.getTypeElement())); } if (src.hasProfile()) { tgt.setProfileElement(VersionConvertor_10_40.convertReferenceToCanonical(src.getProfile())); @@ -483,17 +472,17 @@ public class Conformance10_40 { if (src.hasVersioning()) { tgt.setVersioning(convertResourceVersionPolicy(src.getVersioning())); } - if (src.hasReadHistory()) { - tgt.setReadHistory(src.getReadHistory()); + if (src.hasReadHistoryElement()) { + tgt.setReadHistoryElement((BooleanType) VersionConvertor_10_40.convertType(src.getReadHistoryElement())); } - if (src.hasUpdateCreate()) { - tgt.setUpdateCreate(src.getUpdateCreate()); + if (src.hasUpdateCreateElement()) { + tgt.setUpdateCreateElement((BooleanType) VersionConvertor_10_40.convertType(src.getUpdateCreateElement())); } - if (src.hasConditionalCreate()) { - tgt.setConditionalCreate(src.getConditionalCreate()); + if (src.hasConditionalCreateElement()) { + tgt.setConditionalCreateElement((BooleanType) VersionConvertor_10_40.convertType(src.getConditionalCreateElement())); } - if (src.hasConditionalUpdate()) { - tgt.setConditionalUpdate(src.getConditionalUpdate()); + if (src.hasConditionalUpdateElement()) { + tgt.setConditionalUpdateElement((BooleanType) VersionConvertor_10_40.convertType(src.getConditionalUpdateElement())); } if (src.hasConditionalDelete()) { tgt.setConditionalDelete(convertConditionalDeleteStatus(src.getConditionalDelete())); @@ -526,17 +515,17 @@ public class Conformance10_40 { if (src.hasVersioning()) { tgt.setVersioning(convertResourceVersionPolicy(src.getVersioning())); } - if (src.hasReadHistory()) { - tgt.setReadHistory(src.getReadHistory()); + if (src.hasReadHistoryElement()) { + tgt.setReadHistoryElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getReadHistoryElement())); } - if (src.hasUpdateCreate()) { - tgt.setUpdateCreate(src.getUpdateCreate()); + if (src.hasUpdateCreateElement()) { + tgt.setUpdateCreateElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getUpdateCreateElement())); } - if (src.hasConditionalCreate()) { - tgt.setConditionalCreate(src.getConditionalCreate()); + if (src.hasConditionalCreateElement()) { + tgt.setConditionalCreateElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getConditionalCreateElement())); } - if (src.hasConditionalUpdate()) { - tgt.setConditionalUpdate(src.getConditionalUpdate()); + if (src.hasConditionalUpdateElement()) { + tgt.setConditionalUpdateElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getConditionalUpdateElement())); } if (src.hasConditionalDelete()) { tgt.setConditionalDelete(convertConditionalDeleteStatus(src.getConditionalDelete())); @@ -558,17 +547,16 @@ public class Conformance10_40 { return null; org.hl7.fhir.dstu2.model.Conformance.ConformanceRestResourceSearchParamComponent tgt = new org.hl7.fhir.dstu2.model.Conformance.ConformanceRestResourceSearchParamComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasDefinition()) { - tgt.setDefinition(src.getDefinition()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement())); + if (src.hasDefinitionElement()) { + tgt.setDefinitionElement((UriType) VersionConvertor_10_40.convertType(src.getDefinitionElement())); } if (src.hasType()) { tgt.setType(VersionConvertor_10_40.convertSearchParamType(src.getType())); } - if (src.hasDocumentation()) { - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) { + tgt.setDocumentationElement((StringType) VersionConvertor_10_40.convertType(src.getDocumentationElement())); } return tgt; } @@ -578,17 +566,16 @@ public class Conformance10_40 { return null; org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent tgt = new org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasDefinition()) { - tgt.setDefinition(src.getDefinition()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement())); + if (src.hasDefinitionElement()) { + tgt.setDefinitionElement((CanonicalType) VersionConvertor_10_40.convertType(src.getDefinitionElement())); } if (src.hasType()) { tgt.setType(VersionConvertor_10_40.convertSearchParamType(src.getType())); } - if (src.hasDocumentation()) { - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) { + tgt.setDocumentationElement((MarkdownType) VersionConvertor_10_40.convertType(src.getDocumentationElement())); } return tgt; } @@ -598,15 +585,14 @@ public class Conformance10_40 { return null; org.hl7.fhir.dstu2.model.Conformance.ConformanceRestSecurityComponent tgt = new org.hl7.fhir.dstu2.model.Conformance.ConformanceRestSecurityComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasCors()) { - tgt.setCors(src.getCors()); + if (src.hasCorsElement()) { + tgt.setCorsElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getCorsElement())); } if (src.hasService()) { for (org.hl7.fhir.r4.model.CodeableConcept t : src.getService()) tgt.addService(VersionConvertor_10_40.convertCodeableConcept(t)); } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getDescriptionElement())); return tgt; } @@ -615,8 +601,8 @@ public class Conformance10_40 { return null; org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestSecurityComponent tgt = new org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestSecurityComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasCors()) { - tgt.setCors(src.getCors()); + if (src.hasCorsElement()) { + tgt.setCorsElement((BooleanType) VersionConvertor_10_40.convertType(src.getCorsElement())); } if (src.hasService()) { for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getService()) tgt.addService(VersionConvertor_10_40.convertCodeableConcept(t)); @@ -632,14 +618,12 @@ public class Conformance10_40 { return null; org.hl7.fhir.dstu2.model.Conformance.ConformanceSoftwareComponent tgt = new org.hl7.fhir.dstu2.model.Conformance.ConformanceSoftwareComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasVersion()) { - tgt.setVersion(src.getVersion()); - } - if (src.hasReleaseDate()) { - tgt.setReleaseDate(src.getReleaseDate()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getVersionElement())); + if (src.hasReleaseDateElement()) { + tgt.setReleaseDateElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_40.convertType(src.getReleaseDateElement())); } return tgt; } @@ -649,14 +633,12 @@ public class Conformance10_40 { return null; org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementSoftwareComponent tgt = new org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementSoftwareComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasVersion()) { - tgt.setVersion(src.getVersion()); - } - if (src.hasReleaseDate()) { - tgt.setReleaseDate(src.getReleaseDate()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getVersionElement())); + if (src.hasReleaseDateElement()) { + tgt.setReleaseDateElement((DateTimeType) VersionConvertor_10_40.convertType(src.getReleaseDateElement())); } return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/DataElement10_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/DataElement10_40.java index 38d477356..0e38b9da8 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/DataElement10_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/DataElement10_40.java @@ -2,10 +2,12 @@ package org.hl7.fhir.convertors.conv10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.exceptions.FHIRException; +import org.hl7.fhir.r4.model.*; import org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionKind; import org.hl7.fhir.r4.model.StructureDefinition.TypeDerivationRule; import java.util.ArrayList; import java.util.List; +import java.util.Collections; public class DataElement10_40 { @@ -19,21 +21,21 @@ public class DataElement10_40 { if (src.hasIdentifier()) { for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_40.convertIdentifier(t)); } - if (src.hasVersion()) { - tgt.setVersion(src.getVersion()); + if (src.hasVersionElement()) { + tgt.setVersionElement((StringType) VersionConvertor_10_40.convertType(src.getVersionElement())); } if (src.hasStatus()) { tgt.setStatus(VersionConvertor_10_40.convertConformanceResourceStatus(src.getStatus())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasPublisher()) { - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((BooleanType) VersionConvertor_10_40.convertType(src.getExperimentalElement())); + if (src.hasPublisherElement()) { + tgt.setPublisherElement((StringType) VersionConvertor_10_40.convertType(src.getPublisherElement())); } - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasName()) { - tgt.setName(src.getName()); + if (src.hasDateElement()) + tgt.setDateElement((DateTimeType) VersionConvertor_10_40.convertType(src.getDateElement())); + if (src.hasNameElement()) { + tgt.setNameElement((StringType) VersionConvertor_10_40.convertType(src.getNameElement())); } if (src.hasContact()) { for (org.hl7.fhir.dstu2.model.DataElement.DataElementContactComponent t : src.getContact()) tgt.addContact(convertDataElementContactComponent(t)); @@ -69,8 +71,8 @@ public class DataElement10_40 { return null; org.hl7.fhir.dstu2.model.DataElement.DataElementContactComponent tgt = new org.hl7.fhir.dstu2.model.DataElement.DataElementContactComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); + if (src.hasNameElement()) { + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement())); } if (src.hasTelecom()) { for (org.hl7.fhir.r4.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_40.convertContactPoint(t)); @@ -83,8 +85,8 @@ public class DataElement10_40 { return null; org.hl7.fhir.r4.model.ContactDetail tgt = new org.hl7.fhir.r4.model.ContactDetail(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); + if (src.hasNameElement()) { + tgt.setNameElement((StringType) VersionConvertor_10_40.convertType(src.getNameElement())); } if (src.hasTelecom()) { for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_40.convertContactPoint(t)); @@ -97,17 +99,17 @@ public class DataElement10_40 { return null; org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionMappingComponent tgt = new org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionMappingComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasIdentity()) { - tgt.setIdentity(src.getIdentity()); + if (src.hasIdentityElement()) { + tgt.setIdentityElement((IdType) VersionConvertor_10_40.convertType(src.getIdentityElement())); } - if (src.hasUri()) { - tgt.setUri(src.getUri()); + if (src.hasUriElement()) { + tgt.setUriElement((UriType) VersionConvertor_10_40.convertType(src.getUriElement())); } - if (src.hasName()) { - tgt.setName(src.getName()); + if (src.hasNameElement()) { + tgt.setNameElement((StringType) VersionConvertor_10_40.convertType(src.getNameElement())); } - if (src.hasComments()) { - tgt.setComment(src.getComments()); + if (src.hasCommentsElement()) { + tgt.setCommentElement((StringType) VersionConvertor_10_40.convertType(src.getCommentsElement())); } return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/DetectedIssue10_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/DetectedIssue10_40.java index a7816da8b..ec958665a 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/DetectedIssue10_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/DetectedIssue10_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class DetectedIssue10_40 { @@ -22,9 +23,8 @@ public class DetectedIssue10_40 { if (src.hasImplicated()) { for (org.hl7.fhir.r4.model.Reference t : src.getImplicated()) tgt.addImplicated(VersionConvertor_10_40.convertReference(t)); } - if (src.hasDetail()) { - tgt.setDetail(src.getDetail()); - } + if (src.hasDetailElement()) + tgt.setDetailElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getDetailElement())); if (src.hasIdentifiedDateTimeType()) tgt.setDateElement(VersionConvertor_10_40.convertDateTime(src.getIdentifiedDateTimeType())); if (src.hasAuthor()) { @@ -33,9 +33,8 @@ public class DetectedIssue10_40 { if (src.hasIdentifier()) { tgt.setIdentifier(VersionConvertor_10_40.convertIdentifier(src.getIdentifierFirstRep())); } - if (src.hasReference()) { - tgt.setReference(src.getReference()); - } + if (src.hasReferenceElement()) + tgt.setReferenceElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_40.convertType(src.getReferenceElement())); if (src.hasMitigation()) { for (org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueMitigationComponent t : src.getMitigation()) tgt.addMitigation(convertDetectedIssueMitigationComponent(t)); } @@ -59,9 +58,8 @@ public class DetectedIssue10_40 { if (src.hasImplicated()) { for (org.hl7.fhir.dstu2.model.Reference t : src.getImplicated()) tgt.addImplicated(VersionConvertor_10_40.convertReference(t)); } - if (src.hasDetail()) { - tgt.setDetail(src.getDetail()); - } + if (src.hasDetailElement()) + tgt.setDetailElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getDetailElement())); if (src.hasDate()) tgt.setIdentified(VersionConvertor_10_40.convertDateTime(src.getDateElement())); if (src.hasAuthor()) { @@ -70,9 +68,8 @@ public class DetectedIssue10_40 { if (src.hasIdentifier()) { tgt.addIdentifier(VersionConvertor_10_40.convertIdentifier(src.getIdentifier())); } - if (src.hasReference()) { - tgt.setReference(src.getReference()); - } + if (src.hasReferenceElement()) + tgt.setReferenceElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_10_40.convertType(src.getReferenceElement())); if (src.hasMitigation()) { for (org.hl7.fhir.dstu2.model.DetectedIssue.DetectedIssueMitigationComponent t : src.getMitigation()) tgt.addMitigation(convertDetectedIssueMitigationComponent(t)); } @@ -87,8 +84,8 @@ public class DetectedIssue10_40 { if (src.hasAction()) { tgt.setAction(VersionConvertor_10_40.convertCodeableConcept(src.getAction())); } - if (src.hasDate()) - tgt.setDate(src.getDate()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.r4.model.DateTimeType) VersionConvertor_10_40.convertType(src.getDateElement())); if (src.hasAuthor()) { tgt.setAuthor(VersionConvertor_10_40.convertReference(src.getAuthor())); } @@ -103,8 +100,8 @@ public class DetectedIssue10_40 { if (src.hasAction()) { tgt.setAction(VersionConvertor_10_40.convertCodeableConcept(src.getAction())); } - if (src.hasDate()) - tgt.setDate(src.getDate()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_40.convertType(src.getDateElement())); if (src.hasAuthor()) { tgt.setAuthor(VersionConvertor_10_40.convertReference(src.getAuthor())); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/DeviceMetric10_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/DeviceMetric10_40.java index 867f2fd14..318460f5f 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/DeviceMetric10_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/DeviceMetric10_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class DeviceMetric10_40 { @@ -92,9 +93,8 @@ public class DeviceMetric10_40 { if (src.hasState()) { tgt.setState(convertDeviceMetricCalibrationState(src.getState())); } - if (src.hasTime()) { - tgt.setTime(src.getTime()); - } + if (src.hasTimeElement()) + tgt.setTimeElement((org.hl7.fhir.dstu2.model.InstantType) VersionConvertor_10_40.convertType(src.getTimeElement())); return tgt; } @@ -109,9 +109,8 @@ public class DeviceMetric10_40 { if (src.hasState()) { tgt.setState(convertDeviceMetricCalibrationState(src.getState())); } - if (src.hasTime()) { - tgt.setTime(src.getTime()); - } + if (src.hasTimeElement()) + tgt.setTimeElement((org.hl7.fhir.r4.model.InstantType) VersionConvertor_10_40.convertType(src.getTimeElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/DeviceUseStatement10_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/DeviceUseStatement10_40.java index 7ed3171c1..c86f30fc2 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/DeviceUseStatement10_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/DeviceUseStatement10_40.java @@ -3,6 +3,7 @@ package org.hl7.fhir.convertors.conv10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r4.model.Annotation; +import java.util.Collections; public class DeviceUseStatement10_40 { @@ -26,9 +27,8 @@ public class DeviceUseStatement10_40 { if (src.hasNote()) { for (Annotation t : src.getNote()) tgt.addNotes(t.getText()); } - if (src.hasRecordedOn()) { - tgt.setRecordedOn(src.getRecordedOn()); - } + if (src.hasRecordedOnElement()) + tgt.setRecordedOnElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_40.convertType(src.getRecordedOnElement())); if (src.hasSubject()) { tgt.setSubject(VersionConvertor_10_40.convertReference(src.getSubject())); } @@ -57,9 +57,8 @@ public class DeviceUseStatement10_40 { if (src.hasNotes()) { for (org.hl7.fhir.dstu2.model.StringType t : src.getNotes()) tgt.addNote().setText(t.getValue()); } - if (src.hasRecordedOn()) { - tgt.setRecordedOn(src.getRecordedOn()); - } + if (src.hasRecordedOnElement()) + tgt.setRecordedOnElement((org.hl7.fhir.r4.model.DateTimeType) VersionConvertor_10_40.convertType(src.getRecordedOnElement())); if (src.hasSubject()) { tgt.setSubject(VersionConvertor_10_40.convertReference(src.getSubject())); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/DiagnosticReport10_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/DiagnosticReport10_40.java index 535a930b0..85dfa5f34 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/DiagnosticReport10_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/DiagnosticReport10_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class DiagnosticReport10_40 { @@ -31,9 +32,8 @@ public class DiagnosticReport10_40 { if (src.hasEffective()) { tgt.setEffective(VersionConvertor_10_40.convertType(src.getEffective())); } - if (src.hasIssued()) { - tgt.setIssued(src.getIssued()); - } + if (src.hasIssuedElement()) + tgt.setIssuedElement((org.hl7.fhir.dstu2.model.InstantType) VersionConvertor_10_40.convertType(src.getIssuedElement())); if (src.hasSpecimen()) { for (org.hl7.fhir.r4.model.Reference t : src.getSpecimen()) tgt.addSpecimen(VersionConvertor_10_40.convertReference(t)); } @@ -46,9 +46,8 @@ public class DiagnosticReport10_40 { if (src.hasMedia()) { for (org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportMediaComponent t : src.getMedia()) tgt.addImage(convertDiagnosticReportImageComponent(t)); } - if (src.hasConclusion()) { - tgt.setConclusion(src.getConclusion()); - } + if (src.hasConclusionElement()) + tgt.setConclusionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getConclusionElement())); if (src.hasConclusionCode()) { for (org.hl7.fhir.r4.model.CodeableConcept t : src.getConclusionCode()) tgt.addCodedDiagnosis(VersionConvertor_10_40.convertCodeableConcept(t)); } @@ -84,9 +83,8 @@ public class DiagnosticReport10_40 { if (src.hasEffective()) { tgt.setEffective(VersionConvertor_10_40.convertType(src.getEffective())); } - if (src.hasIssued()) { - tgt.setIssued(src.getIssued()); - } + if (src.hasIssuedElement()) + tgt.setIssuedElement((org.hl7.fhir.r4.model.InstantType) VersionConvertor_10_40.convertType(src.getIssuedElement())); if (src.hasSpecimen()) { for (org.hl7.fhir.dstu2.model.Reference t : src.getSpecimen()) tgt.addSpecimen(VersionConvertor_10_40.convertReference(t)); } @@ -99,9 +97,8 @@ public class DiagnosticReport10_40 { if (src.hasImage()) { for (org.hl7.fhir.dstu2.model.DiagnosticReport.DiagnosticReportImageComponent t : src.getImage()) tgt.addMedia(convertDiagnosticReportImageComponent(t)); } - if (src.hasConclusion()) { - tgt.setConclusion(src.getConclusion()); - } + if (src.hasConclusionElement()) + tgt.setConclusionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getConclusionElement())); if (src.hasCodedDiagnosis()) { for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getCodedDiagnosis()) tgt.addConclusionCode(VersionConvertor_10_40.convertCodeableConcept(t)); } @@ -116,9 +113,8 @@ public class DiagnosticReport10_40 { return null; org.hl7.fhir.dstu2.model.DiagnosticReport.DiagnosticReportImageComponent tgt = new org.hl7.fhir.dstu2.model.DiagnosticReport.DiagnosticReportImageComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasComment()) { - tgt.setComment(src.getComment()); - } + if (src.hasCommentElement()) + tgt.setCommentElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getCommentElement())); if (src.hasLink()) { tgt.setLink(VersionConvertor_10_40.convertReference(src.getLink())); } @@ -130,9 +126,8 @@ public class DiagnosticReport10_40 { return null; org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportMediaComponent tgt = new org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportMediaComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasComment()) { - tgt.setComment(src.getComment()); - } + if (src.hasCommentElement()) + tgt.setCommentElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getCommentElement())); if (src.hasLink()) { tgt.setLink(VersionConvertor_10_40.convertReference(src.getLink())); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/DocumentReference10_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/DocumentReference10_40.java index 124e2eecc..14e2b5d06 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/DocumentReference10_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/DocumentReference10_40.java @@ -2,8 +2,12 @@ package org.hl7.fhir.convertors.conv10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.dstu2.model.CodeableConcept; +import org.hl7.fhir.dstu2.model.DateTimeType; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r4.model.DocumentReference.ReferredDocumentStatus; +import org.hl7.fhir.r4.model.InstantType; + +import java.util.Collections; public class DocumentReference10_40 { @@ -66,8 +70,8 @@ public class DocumentReference10_40 { if (src.hasAuthenticator()) { tgt.setAuthenticator(VersionConvertor_10_40.convertReference(src.getAuthenticator())); } - if (src.hasDate()) { - tgt.setCreated(src.getDate()); + if (src.hasDateElement()) { + tgt.setCreatedElement((DateTimeType) VersionConvertor_10_40.convertType(src.getDateElement())); } if (src.hasStatus()) { tgt.setStatus(convertDocumentReferenceStatus(src.getStatus())); @@ -78,9 +82,8 @@ public class DocumentReference10_40 { if (src.hasRelatesTo()) { for (org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceRelatesToComponent t : src.getRelatesTo()) tgt.addRelatesTo(convertDocumentReferenceRelatesToComponent(t)); } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getDescriptionElement())); if (src.hasSecurityLabel()) { for (org.hl7.fhir.r4.model.CodeableConcept t : src.getSecurityLabel()) tgt.addSecurityLabel(VersionConvertor_10_40.convertCodeableConcept(t)); } @@ -119,8 +122,8 @@ public class DocumentReference10_40 { if (src.hasAuthenticator()) { tgt.setAuthenticator(VersionConvertor_10_40.convertReference(src.getAuthenticator())); } - if (src.hasCreated()) { - tgt.setDate(src.getCreated()); + if (src.hasCreatedElement()) { + tgt.setDateElement((InstantType) VersionConvertor_10_40.convertType(src.getCreatedElement())); } if (src.hasStatus()) { tgt.setStatus(convertDocumentReferenceStatus(src.getStatus())); @@ -131,9 +134,8 @@ public class DocumentReference10_40 { if (src.hasRelatesTo()) { for (org.hl7.fhir.dstu2.model.DocumentReference.DocumentReferenceRelatesToComponent t : src.getRelatesTo()) tgt.addRelatesTo(convertDocumentReferenceRelatesToComponent(t)); } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getDescriptionElement())); if (src.hasSecurityLabel()) { for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getSecurityLabel()) tgt.addSecurityLabel(VersionConvertor_10_40.convertCodeableConcept(t)); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Encounter10_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Encounter10_40.java index 1cd7ee803..fced5fe24 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Encounter10_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Encounter10_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Encounter10_40 { diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/EnrollmentRequest10_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/EnrollmentRequest10_40.java index 0d901cf15..d3a925c1f 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/EnrollmentRequest10_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/EnrollmentRequest10_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class EnrollmentRequest10_40 { @@ -13,9 +14,8 @@ public class EnrollmentRequest10_40 { if (src.hasIdentifier()) { for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_40.convertIdentifier(t)); } - if (src.hasCreated()) { - tgt.setCreated(src.getCreated()); - } + if (src.hasCreatedElement()) + tgt.setCreatedElement((org.hl7.fhir.r4.model.DateTimeType) VersionConvertor_10_40.convertType(src.getCreatedElement())); if (src.hasProvider()) { tgt.setProvider(VersionConvertor_10_40.convertReference(src.getProvider())); } @@ -36,9 +36,8 @@ public class EnrollmentRequest10_40 { if (src.hasIdentifier()) { for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_40.convertIdentifier(t)); } - if (src.hasCreated()) { - tgt.setCreated(src.getCreated()); - } + if (src.hasCreatedElement()) + tgt.setCreatedElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_40.convertType(src.getCreatedElement())); if (src.hasCoverage()) { tgt.setCoverage(VersionConvertor_10_40.convertReference(src.getCoverage())); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/EnrollmentResponse10_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/EnrollmentResponse10_40.java index 018c78227..fd000172d 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/EnrollmentResponse10_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/EnrollmentResponse10_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class EnrollmentResponse10_40 { @@ -16,12 +17,10 @@ public class EnrollmentResponse10_40 { if (src.hasRequest()) { tgt.setRequest(VersionConvertor_10_40.convertReference(src.getRequest())); } - if (src.hasDisposition()) { - tgt.setDisposition(src.getDisposition()); - } - if (src.hasCreated()) { - tgt.setCreated(src.getCreated()); - } + if (src.hasDispositionElement()) + tgt.setDispositionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getDispositionElement())); + if (src.hasCreatedElement()) + tgt.setCreatedElement((org.hl7.fhir.r4.model.DateTimeType) VersionConvertor_10_40.convertType(src.getCreatedElement())); if (src.hasOrganization()) { tgt.setOrganization(VersionConvertor_10_40.convertReference(src.getOrganization())); } @@ -39,12 +38,10 @@ public class EnrollmentResponse10_40 { if (src.hasIdentifier()) { for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_40.convertIdentifier(t)); } - if (src.hasDisposition()) { - tgt.setDisposition(src.getDisposition()); - } - if (src.hasCreated()) { - tgt.setCreated(src.getCreated()); - } + if (src.hasDispositionElement()) + tgt.setDispositionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getDispositionElement())); + if (src.hasCreatedElement()) + tgt.setCreatedElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_40.convertType(src.getCreatedElement())); return tgt; } } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/EpisodeOfCare10_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/EpisodeOfCare10_40.java index a70e1133a..bfa28c9a3 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/EpisodeOfCare10_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/EpisodeOfCare10_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class EpisodeOfCare10_40 { diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/FamilyMemberHistory10_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/FamilyMemberHistory10_40.java index a9f78250f..405003131 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/FamilyMemberHistory10_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/FamilyMemberHistory10_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class FamilyMemberHistory10_40 { @@ -50,14 +51,13 @@ public class FamilyMemberHistory10_40 { if (src.hasPatient()) { tgt.setPatient(VersionConvertor_10_40.convertReference(src.getPatient())); } - if (src.hasDate()) - tgt.setDate(src.getDate()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.r4.model.DateTimeType) VersionConvertor_10_40.convertType(src.getDateElement())); if (src.hasStatus()) { tgt.setStatus(convertFamilyHistoryStatus(src.getStatus())); } - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement())); if (src.hasRelationship()) { tgt.setRelationship(VersionConvertor_10_40.convertCodeableConcept(src.getRelationship())); } @@ -87,14 +87,13 @@ public class FamilyMemberHistory10_40 { if (src.hasPatient()) { tgt.setPatient(VersionConvertor_10_40.convertReference(src.getPatient())); } - if (src.hasDate()) - tgt.setDate(src.getDate()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_40.convertType(src.getDateElement())); if (src.hasStatus()) { tgt.setStatus(convertFamilyHistoryStatus(src.getStatus())); } - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement())); if (src.hasRelationship()) { tgt.setRelationship(VersionConvertor_10_40.convertCodeableConcept(src.getRelationship())); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Flag10_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Flag10_40.java index 4ca17c0dd..787d63bd3 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Flag10_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Flag10_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Flag10_40 { diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Group10_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Group10_40.java index b4648b47e..850858b6b 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Group10_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Group10_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Group10_40 { @@ -16,18 +17,15 @@ public class Group10_40 { if (src.hasType()) { tgt.setType(convertGroupType(src.getType())); } - if (src.hasActual()) { - tgt.setActual(src.getActual()); - } + if (src.hasActualElement()) + tgt.setActualElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_10_40.convertType(src.getActualElement())); if (src.hasCode()) { tgt.setCode(VersionConvertor_10_40.convertCodeableConcept(src.getCode())); } - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasQuantity()) { - tgt.setQuantity(src.getQuantity()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement())); + if (src.hasQuantityElement()) + tgt.setQuantityElement((org.hl7.fhir.r4.model.UnsignedIntType) VersionConvertor_10_40.convertType(src.getQuantityElement())); if (src.hasCharacteristic()) { for (org.hl7.fhir.dstu2.model.Group.GroupCharacteristicComponent t : src.getCharacteristic()) tgt.addCharacteristic(convertGroupCharacteristicComponent(t)); } @@ -48,18 +46,15 @@ public class Group10_40 { if (src.hasType()) { tgt.setType(convertGroupType(src.getType())); } - if (src.hasActual()) { - tgt.setActual(src.getActual()); - } + if (src.hasActualElement()) + tgt.setActualElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getActualElement())); if (src.hasCode()) { tgt.setCode(VersionConvertor_10_40.convertCodeableConcept(src.getCode())); } - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasQuantity()) { - tgt.setQuantity(src.getQuantity()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement())); + if (src.hasQuantityElement()) + tgt.setQuantityElement((org.hl7.fhir.dstu2.model.UnsignedIntType) VersionConvertor_10_40.convertType(src.getQuantityElement())); if (src.hasCharacteristic()) { for (org.hl7.fhir.r4.model.Group.GroupCharacteristicComponent t : src.getCharacteristic()) tgt.addCharacteristic(convertGroupCharacteristicComponent(t)); } @@ -80,9 +75,8 @@ public class Group10_40 { if (src.hasValue()) { tgt.setValue(VersionConvertor_10_40.convertType(src.getValue())); } - if (src.hasExclude()) { - tgt.setExclude(src.getExclude()); - } + if (src.hasExcludeElement()) + tgt.setExcludeElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_10_40.convertType(src.getExcludeElement())); if (src.hasPeriod()) { tgt.setPeriod(VersionConvertor_10_40.convertPeriod(src.getPeriod())); } @@ -100,9 +94,8 @@ public class Group10_40 { if (src.hasValue()) { tgt.setValue(VersionConvertor_10_40.convertType(src.getValue())); } - if (src.hasExclude()) { - tgt.setExclude(src.getExclude()); - } + if (src.hasExcludeElement()) + tgt.setExcludeElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getExcludeElement())); if (src.hasPeriod()) { tgt.setPeriod(VersionConvertor_10_40.convertPeriod(src.getPeriod())); } @@ -120,9 +113,8 @@ public class Group10_40 { if (src.hasPeriod()) { tgt.setPeriod(VersionConvertor_10_40.convertPeriod(src.getPeriod())); } - if (src.hasInactive()) { - tgt.setInactive(src.getInactive()); - } + if (src.hasInactiveElement()) + tgt.setInactiveElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_10_40.convertType(src.getInactiveElement())); return tgt; } @@ -137,9 +129,8 @@ public class Group10_40 { if (src.hasPeriod()) { tgt.setPeriod(VersionConvertor_10_40.convertPeriod(src.getPeriod())); } - if (src.hasInactive()) { - tgt.setInactive(src.getInactive()); - } + if (src.hasInactiveElement()) + tgt.setInactiveElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getInactiveElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/HealthcareService10_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/HealthcareService10_40.java index 67999c812..74fc4ab9d 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/HealthcareService10_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/HealthcareService10_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class HealthcareService10_40 { @@ -68,12 +69,10 @@ public class HealthcareService10_40 { if (src.hasLocation()) { tgt.addLocation(VersionConvertor_10_40.convertReference(src.getLocation())); } - if (src.hasComment()) { - tgt.setComment(src.getComment()); - } - if (src.hasExtraDetails()) { - tgt.setExtraDetails(src.getExtraDetails()); - } + if (src.hasCommentElement()) + tgt.setCommentElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getCommentElement())); + if (src.hasExtraDetailsElement()) + tgt.setExtraDetailsElement((org.hl7.fhir.r4.model.MarkdownType) VersionConvertor_10_40.convertType(src.getExtraDetailsElement())); if (src.hasPhoto()) { tgt.setPhoto(VersionConvertor_10_40.convertAttachment(src.getPhoto())); } @@ -99,18 +98,16 @@ public class HealthcareService10_40 { if (src.hasReferralMethod()) { for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getReferralMethod()) tgt.addReferralMethod(VersionConvertor_10_40.convertCodeableConcept(t)); } - if (src.hasAppointmentRequired()) { - tgt.setAppointmentRequired(src.getAppointmentRequired()); - } + if (src.hasAppointmentRequiredElement()) + tgt.setAppointmentRequiredElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_10_40.convertType(src.getAppointmentRequiredElement())); if (src.hasAvailableTime()) { for (org.hl7.fhir.dstu2.model.HealthcareService.HealthcareServiceAvailableTimeComponent t : src.getAvailableTime()) tgt.addAvailableTime(convertHealthcareServiceAvailableTimeComponent(t)); } if (src.hasNotAvailable()) { for (org.hl7.fhir.dstu2.model.HealthcareService.HealthcareServiceNotAvailableComponent t : src.getNotAvailable()) tgt.addNotAvailable(convertHealthcareServiceNotAvailableComponent(t)); } - if (src.hasAvailabilityExceptions()) { - tgt.setAvailabilityExceptions(src.getAvailabilityExceptions()); - } + if (src.hasAvailabilityExceptionsElement()) + tgt.setAvailabilityExceptionsElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getAvailabilityExceptionsElement())); return tgt; } @@ -133,12 +130,10 @@ public class HealthcareService10_40 { if (src.hasLocation()) { for (org.hl7.fhir.r4.model.Reference t : src.getLocation()) tgt.setLocation(VersionConvertor_10_40.convertReference(t)); } - if (src.hasComment()) { - tgt.setComment(src.getComment()); - } - if (src.hasExtraDetails()) { - tgt.setExtraDetails(src.getExtraDetails()); - } + if (src.hasCommentElement()) + tgt.setCommentElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getCommentElement())); + if (src.hasExtraDetailsElement()) + tgt.setExtraDetailsElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getExtraDetailsElement())); if (src.hasPhoto()) { tgt.setPhoto(VersionConvertor_10_40.convertAttachment(src.getPhoto())); } @@ -165,18 +160,16 @@ public class HealthcareService10_40 { if (src.hasReferralMethod()) { for (org.hl7.fhir.r4.model.CodeableConcept t : src.getReferralMethod()) tgt.addReferralMethod(VersionConvertor_10_40.convertCodeableConcept(t)); } - if (src.hasAppointmentRequired()) { - tgt.setAppointmentRequired(src.getAppointmentRequired()); - } + if (src.hasAppointmentRequiredElement()) + tgt.setAppointmentRequiredElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getAppointmentRequiredElement())); if (src.hasAvailableTime()) { for (org.hl7.fhir.r4.model.HealthcareService.HealthcareServiceAvailableTimeComponent t : src.getAvailableTime()) tgt.addAvailableTime(convertHealthcareServiceAvailableTimeComponent(t)); } if (src.hasNotAvailable()) { for (org.hl7.fhir.r4.model.HealthcareService.HealthcareServiceNotAvailableComponent t : src.getNotAvailable()) tgt.addNotAvailable(convertHealthcareServiceNotAvailableComponent(t)); } - if (src.hasAvailabilityExceptions()) { - tgt.setAvailabilityExceptions(src.getAvailabilityExceptions()); - } + if (src.hasAvailabilityExceptionsElement()) + tgt.setAvailabilityExceptionsElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getAvailabilityExceptionsElement())); return tgt; } @@ -188,15 +181,12 @@ public class HealthcareService10_40 { if (src.hasDaysOfWeek()) { for (org.hl7.fhir.dstu2.model.Enumeration t : src.getDaysOfWeek()) VersionConvertor_10_40.copyElement(t, tgt.addDaysOfWeekElement().setValue(convertDaysOfWeek(t.getValue()))); } - if (src.hasAllDay()) { - tgt.setAllDay(src.getAllDay()); - } - if (src.hasAvailableStartTime()) { - tgt.setAvailableStartTime(src.getAvailableStartTime()); - } - if (src.hasAvailableEndTime()) { - tgt.setAvailableEndTime(src.getAvailableEndTime()); - } + if (src.hasAllDayElement()) + tgt.setAllDayElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_10_40.convertType(src.getAllDayElement())); + if (src.hasAvailableStartTimeElement()) + tgt.setAvailableStartTimeElement((org.hl7.fhir.r4.model.TimeType) VersionConvertor_10_40.convertType(src.getAvailableStartTimeElement())); + if (src.hasAvailableEndTimeElement()) + tgt.setAvailableEndTimeElement((org.hl7.fhir.r4.model.TimeType) VersionConvertor_10_40.convertType(src.getAvailableEndTimeElement())); return tgt; } @@ -208,15 +198,12 @@ public class HealthcareService10_40 { if (src.hasDaysOfWeek()) { for (org.hl7.fhir.r4.model.Enumeration t : src.getDaysOfWeek()) VersionConvertor_10_40.copyElement(t, tgt.addDaysOfWeekElement().setValue(convertDaysOfWeek(t.getValue()))); } - if (src.hasAllDay()) { - tgt.setAllDay(src.getAllDay()); - } - if (src.hasAvailableStartTime()) { - tgt.setAvailableStartTime(src.getAvailableStartTime()); - } - if (src.hasAvailableEndTime()) { - tgt.setAvailableEndTime(src.getAvailableEndTime()); - } + if (src.hasAllDayElement()) + tgt.setAllDayElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getAllDayElement())); + if (src.hasAvailableStartTimeElement()) + tgt.setAvailableStartTimeElement((org.hl7.fhir.dstu2.model.TimeType) VersionConvertor_10_40.convertType(src.getAvailableStartTimeElement())); + if (src.hasAvailableEndTimeElement()) + tgt.setAvailableEndTimeElement((org.hl7.fhir.dstu2.model.TimeType) VersionConvertor_10_40.convertType(src.getAvailableEndTimeElement())); return tgt; } @@ -225,9 +212,8 @@ public class HealthcareService10_40 { return null; org.hl7.fhir.dstu2.model.HealthcareService.HealthcareServiceNotAvailableComponent tgt = new org.hl7.fhir.dstu2.model.HealthcareService.HealthcareServiceNotAvailableComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getDescriptionElement())); if (src.hasDuring()) { tgt.setDuring(VersionConvertor_10_40.convertPeriod(src.getDuring())); } @@ -239,9 +225,8 @@ public class HealthcareService10_40 { return null; org.hl7.fhir.r4.model.HealthcareService.HealthcareServiceNotAvailableComponent tgt = new org.hl7.fhir.r4.model.HealthcareService.HealthcareServiceNotAvailableComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getDescriptionElement())); if (src.hasDuring()) { tgt.setDuring(VersionConvertor_10_40.convertPeriod(src.getDuring())); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/ImplementationGuide10_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/ImplementationGuide10_40.java index b8e76bf6f..3124c8c71 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/ImplementationGuide10_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/ImplementationGuide10_40.java @@ -1,11 +1,15 @@ package org.hl7.fhir.convertors.conv10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40; +import org.hl7.fhir.dstu2.model.IdType; import org.hl7.fhir.dstu2.model.ImplementationGuide.GuidePageKind; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r4.model.Enumeration; import org.hl7.fhir.r4.model.ImplementationGuide.GuidePageGeneration; +import org.hl7.fhir.r4.model.StringType; + import java.util.List; +import java.util.Collections; public class ImplementationGuide10_40 { @@ -14,38 +18,32 @@ public class ImplementationGuide10_40 { return null; org.hl7.fhir.r4.model.ImplementationGuide tgt = new org.hl7.fhir.r4.model.ImplementationGuide(); VersionConvertor_10_40.copyDomainResource(src, tgt); - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } - if (src.hasVersion()) { - tgt.setVersion(src.getVersion()); - } - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_10_40.convertType(src.getUrlElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_10_40.convertConformanceResourceStatus(src.getStatus())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasPublisher()) { - tgt.setPublisher(src.getPublisher()); - } + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_10_40.convertType(src.getExperimentalElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuideContactComponent t : src.getContact()) tgt.addContact(convertImplementationGuideContactComponent(t)); } - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.r4.model.DateTimeType) VersionConvertor_10_40.convertType(src.getDateElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r4.model.MarkdownType) VersionConvertor_10_40.convertType(src.getDescriptionElement())); for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getUseContext()) if (VersionConvertor_10_40.isJurisdiction(t)) tgt.addJurisdiction(VersionConvertor_10_40.convertCodeableConcept(t)); else tgt.addUseContext(VersionConvertor_10_40.convertCodeableConceptToUsageContext(t)); - if (src.hasCopyright()) { - tgt.setCopyright(src.getCopyright()); - } + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.r4.model.MarkdownType) VersionConvertor_10_40.convertType(src.getCopyrightElement())); if (src.hasFhirVersion()) { tgt.addFhirVersion(org.hl7.fhir.r4.model.Enumerations.FHIRVersion.fromCode(src.getFhirVersion())); } @@ -69,39 +67,33 @@ public class ImplementationGuide10_40 { return null; org.hl7.fhir.dstu2.model.ImplementationGuide tgt = new org.hl7.fhir.dstu2.model.ImplementationGuide(); VersionConvertor_10_40.copyDomainResource(src, tgt); - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } - if (src.hasVersion()) { - tgt.setVersion(src.getVersion()); - } - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_40.convertType(src.getUrlElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_10_40.convertConformanceResourceStatus(src.getStatus())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasPublisher()) { - tgt.setPublisher(src.getPublisher()); - } + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getExperimentalElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact()) tgt.addContact(convertImplementationGuideContactComponent(t)); } - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_40.convertType(src.getDateElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getDescriptionElement())); for (org.hl7.fhir.r4.model.UsageContext t : src.getUseContext()) if (t.hasValueCodeableConcept()) tgt.addUseContext(VersionConvertor_10_40.convertCodeableConcept(t.getValueCodeableConcept())); if (src.hasJurisdiction()) { for (org.hl7.fhir.r4.model.CodeableConcept t : src.getJurisdiction()) tgt.addUseContext(VersionConvertor_10_40.convertCodeableConcept(t)); } - if (src.hasCopyright()) { - tgt.setCopyright(src.getCopyright()); - } + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getCopyrightElement())); for (Enumeration v : src.getFhirVersion()) { tgt.setFhirVersion(v.asStringValue()); } @@ -128,9 +120,8 @@ public class ImplementationGuide10_40 { return null; org.hl7.fhir.r4.model.ContactDetail tgt = new org.hl7.fhir.r4.model.ContactDetail(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_40.convertContactPoint(t)); } @@ -142,9 +133,8 @@ public class ImplementationGuide10_40 { return null; org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuideContactComponent tgt = new org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuideContactComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.r4.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_40.convertContactPoint(t)); } @@ -156,9 +146,8 @@ public class ImplementationGuide10_40 { return null; org.hl7.fhir.r4.model.ImplementationGuide.ImplementationGuideDependsOnComponent tgt = new org.hl7.fhir.r4.model.ImplementationGuide.ImplementationGuideDependsOnComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasUri()) { - tgt.setUri(src.getUri()); - } + if (src.hasUriElement()) + tgt.setUriElement((org.hl7.fhir.r4.model.CanonicalType) VersionConvertor_10_40.convertType(src.getUriElement())); return tgt; } @@ -168,9 +157,8 @@ public class ImplementationGuide10_40 { org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuideDependencyComponent tgt = new org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuideDependencyComponent(); VersionConvertor_10_40.copyElement(src, tgt); tgt.setType(org.hl7.fhir.dstu2.model.ImplementationGuide.GuideDependencyType.REFERENCE); - if (src.hasUri()) { - tgt.setUri(src.getUri()); - } + if (src.hasUriElement()) + tgt.setUriElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_40.convertType(src.getUriElement())); return tgt; } @@ -179,9 +167,8 @@ public class ImplementationGuide10_40 { return null; org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuideGlobalComponent tgt = new org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuideGlobalComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasType()) { - tgt.setType(src.getType()); - } + if (src.hasTypeElement()) + tgt.setTypeElement((org.hl7.fhir.dstu2.model.CodeType) VersionConvertor_10_40.convertType(src.getTypeElement())); if (src.hasProfileElement()) { tgt.setProfile(VersionConvertor_10_40.convertCanonicalToReference(src.getProfileElement())); } @@ -193,9 +180,8 @@ public class ImplementationGuide10_40 { return null; org.hl7.fhir.r4.model.ImplementationGuide.ImplementationGuideGlobalComponent tgt = new org.hl7.fhir.r4.model.ImplementationGuide.ImplementationGuideGlobalComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasType()) { - tgt.setType(src.getType()); - } + if (src.hasTypeElement()) + tgt.setTypeElement((org.hl7.fhir.r4.model.CodeType) VersionConvertor_10_40.convertType(src.getTypeElement())); if (src.hasProfile()) { tgt.setProfileElement(VersionConvertor_10_40.convertReferenceToCanonical(src.getProfile())); } @@ -207,15 +193,13 @@ public class ImplementationGuide10_40 { return null; org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuidePackageComponent tgt = new org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuidePackageComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasId()) { - tgt.setId(src.getId()); - } - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); + if (src.hasIdElement()) { + tgt.setIdElement((IdType) VersionConvertor_10_40.convertType(src.getIdElement())); } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getDescriptionElement())); return tgt; } @@ -225,10 +209,10 @@ public class ImplementationGuide10_40 { org.hl7.fhir.r4.model.ImplementationGuide.ImplementationGuideDefinitionGroupingComponent tgt = new org.hl7.fhir.r4.model.ImplementationGuide.ImplementationGuideDefinitionGroupingComponent(); tgt.setId("p" + (context.getGrouping().size() + 1)); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasNameElement()) + tgt.setNameElement((StringType) VersionConvertor_10_40.convertType(src.getNameElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((StringType) VersionConvertor_10_40.convertType(src.getDescriptionElement())); for (org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuidePackageResourceComponent t : src.getResource()) { org.hl7.fhir.r4.model.ImplementationGuide.ImplementationGuideDefinitionResourceComponent tn = convertImplementationGuidePackageResourceComponent(t); tn.setGroupingId(tgt.getId()); @@ -244,10 +228,10 @@ public class ImplementationGuide10_40 { VersionConvertor_10_40.copyElement(src, tgt); if (src.hasExampleCanonicalType()) tgt.setExampleFor(VersionConvertor_10_40.convertCanonicalToReference(src.getExampleCanonicalType())); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getDescriptionElement())); if (src.hasReference()) tgt.setSource(VersionConvertor_10_40.convertReference(src.getReference())); return tgt; @@ -260,10 +244,10 @@ public class ImplementationGuide10_40 { VersionConvertor_10_40.copyElement(src, tgt); if (src.hasExampleFor()) tgt.setExample(VersionConvertor_10_40.convertReferenceToCanonical(src.getExampleFor())); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getDescriptionElement())); if (src.hasSourceReference()) tgt.setReference(VersionConvertor_10_40.convertReference(src.getSourceReference())); else if (src.hasSourceUriType()) @@ -281,8 +265,8 @@ public class ImplementationGuide10_40 { tgt.setName(convertUriToUrl(src.getSourceElement())); } } - if (src.hasName()) { - tgt.setTitle(src.getName()); + if (src.hasNameElement()) { + tgt.setTitleElement((StringType) VersionConvertor_10_40.convertType(src.getNameElement())); } if (src.hasKind()) tgt.setGeneration(convertPageGeneration(src.getKind())); @@ -299,8 +283,8 @@ public class ImplementationGuide10_40 { VersionConvertor_10_40.copyElement(src, tgt); if (src.hasNameUrlType()) tgt.setSource(src.getNameUrlType().getValue()); - if (src.hasTitle()) { - tgt.setName(src.getTitle()); + if (src.hasTitleElement()) { + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getTitleElement())); } if (src.hasGeneration()) tgt.setKind(convertPageGeneration(src.getGeneration())); diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/List10_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/List10_40.java index f769f7e58..98741810e 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/List10_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/List10_40.java @@ -2,6 +2,11 @@ package org.hl7.fhir.convertors.conv10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.exceptions.FHIRException; +import org.hl7.fhir.r4.model.BooleanType; +import org.hl7.fhir.r4.model.DateTimeType; +import org.hl7.fhir.r4.model.StringType; + +import java.util.Collections; public class List10_40 { @@ -13,8 +18,8 @@ public class List10_40 { if (src.hasIdentifier()) { for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_40.convertIdentifier(t)); } - if (src.hasTitle()) { - tgt.setTitle(src.getTitle()); + if (src.hasTitleElement()) { + tgt.setTitleElement((StringType) VersionConvertor_10_40.convertType(src.getTitleElement())); } if (src.hasCode()) { tgt.setCode(VersionConvertor_10_40.convertCodeableConcept(src.getCode())); @@ -31,8 +36,8 @@ public class List10_40 { if (src.hasStatus()) { tgt.setStatus(convertListStatus(src.getStatus())); } - if (src.hasDate()) - tgt.setDate(src.getDate()); + if (src.hasDateElement()) + tgt.setDateElement((DateTimeType) VersionConvertor_10_40.convertType(src.getDateElement())); if (src.hasOrderedBy()) { tgt.setOrderedBy(VersionConvertor_10_40.convertCodeableConcept(src.getOrderedBy())); } @@ -55,8 +60,8 @@ public class List10_40 { if (src.hasIdentifier()) { for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_40.convertIdentifier(t)); } - if (src.hasTitle()) { - tgt.setTitle(src.getTitle()); + if (src.hasTitleElement()) { + tgt.setTitleElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getTitleElement())); } if (src.hasCode()) { tgt.setCode(VersionConvertor_10_40.convertCodeableConcept(src.getCode())); @@ -73,8 +78,8 @@ public class List10_40 { if (src.hasStatus()) { tgt.setStatus(convertListStatus(src.getStatus())); } - if (src.hasDate()) - tgt.setDate(src.getDate()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_40.convertType(src.getDateElement())); if (src.hasOrderedBy()) { tgt.setOrderedBy(VersionConvertor_10_40.convertCodeableConcept(src.getOrderedBy())); } @@ -98,11 +103,11 @@ public class List10_40 { if (src.hasFlag()) { tgt.setFlag(VersionConvertor_10_40.convertCodeableConcept(src.getFlag())); } - if (src.hasDeleted()) { - tgt.setDeleted(src.getDeleted()); + if (src.hasDeletedElement()) { + tgt.setDeletedElement((BooleanType) VersionConvertor_10_40.convertType(src.getDeletedElement())); } - if (src.hasDate()) - tgt.setDate(src.getDate()); + if (src.hasDateElement()) + tgt.setDateElement((DateTimeType) VersionConvertor_10_40.convertType(src.getDateElement())); if (src.hasItem()) { tgt.setItem(VersionConvertor_10_40.convertReference(src.getItem())); } @@ -117,11 +122,11 @@ public class List10_40 { if (src.hasFlag()) { tgt.setFlag(VersionConvertor_10_40.convertCodeableConcept(src.getFlag())); } - if (src.hasDeleted()) { - tgt.setDeleted(src.getDeleted()); + if (src.hasDeletedElement()) { + tgt.setDeletedElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getDeletedElement())); } - if (src.hasDate()) - tgt.setDate(src.getDate()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_40.convertType(src.getDateElement())); if (src.hasItem()) { tgt.setItem(VersionConvertor_10_40.convertReference(src.getItem())); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Location10_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Location10_40.java index 7e4441de1..2e2042bd7 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Location10_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Location10_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Location10_40 { @@ -16,12 +17,10 @@ public class Location10_40 { if (src.hasStatus()) { tgt.setStatus(convertLocationStatus(src.getStatus())); } - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getDescriptionElement())); if (src.hasMode()) { tgt.setMode(convertLocationMode(src.getMode())); } @@ -60,12 +59,10 @@ public class Location10_40 { if (src.hasStatus()) { tgt.setStatus(convertLocationStatus(src.getStatus())); } - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getDescriptionElement())); if (src.hasMode()) { tgt.setMode(convertLocationMode(src.getMode())); } @@ -124,15 +121,12 @@ public class Location10_40 { return null; org.hl7.fhir.r4.model.Location.LocationPositionComponent tgt = new org.hl7.fhir.r4.model.Location.LocationPositionComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasLongitude()) { - tgt.setLongitude(src.getLongitude()); - } - if (src.hasLatitude()) { - tgt.setLatitude(src.getLatitude()); - } - if (src.hasAltitude()) { - tgt.setAltitude(src.getAltitude()); - } + if (src.hasLongitudeElement()) + tgt.setLongitudeElement((org.hl7.fhir.r4.model.DecimalType) VersionConvertor_10_40.convertType(src.getLongitudeElement())); + if (src.hasLatitudeElement()) + tgt.setLatitudeElement((org.hl7.fhir.r4.model.DecimalType) VersionConvertor_10_40.convertType(src.getLatitudeElement())); + if (src.hasAltitudeElement()) + tgt.setAltitudeElement((org.hl7.fhir.r4.model.DecimalType) VersionConvertor_10_40.convertType(src.getAltitudeElement())); return tgt; } @@ -141,15 +135,12 @@ public class Location10_40 { return null; org.hl7.fhir.dstu2.model.Location.LocationPositionComponent tgt = new org.hl7.fhir.dstu2.model.Location.LocationPositionComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasLongitude()) { - tgt.setLongitude(src.getLongitude()); - } - if (src.hasLatitude()) { - tgt.setLatitude(src.getLatitude()); - } - if (src.hasAltitude()) { - tgt.setAltitude(src.getAltitude()); - } + if (src.hasLongitudeElement()) + tgt.setLongitudeElement((org.hl7.fhir.dstu2.model.DecimalType) VersionConvertor_10_40.convertType(src.getLongitudeElement())); + if (src.hasLatitudeElement()) + tgt.setLatitudeElement((org.hl7.fhir.dstu2.model.DecimalType) VersionConvertor_10_40.convertType(src.getLatitudeElement())); + if (src.hasAltitudeElement()) + tgt.setAltitudeElement((org.hl7.fhir.dstu2.model.DecimalType) VersionConvertor_10_40.convertType(src.getAltitudeElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/MedicationDispense10_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/MedicationDispense10_40.java index e6e0869a2..3e357bc4f 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/MedicationDispense10_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/MedicationDispense10_40.java @@ -4,6 +4,9 @@ import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r4.model.Dosage; import org.hl7.fhir.r4.model.Dosage.DosageDoseAndRateComponent; +import org.hl7.fhir.r4.model.StringType; + +import java.util.Collections; public class MedicationDispense10_40 { @@ -36,20 +39,18 @@ public class MedicationDispense10_40 { if (src.hasDaysSupply()) { tgt.setDaysSupply(VersionConvertor_10_40.convertSimpleQuantity(src.getDaysSupply())); } - if (src.hasWhenPrepared()) { - tgt.setWhenPrepared(src.getWhenPrepared()); - } - if (src.hasWhenHandedOver()) { - tgt.setWhenHandedOver(src.getWhenHandedOver()); - } + if (src.hasWhenPreparedElement()) + tgt.setWhenPreparedElement((org.hl7.fhir.r4.model.DateTimeType) VersionConvertor_10_40.convertType(src.getWhenPreparedElement())); + if (src.hasWhenHandedOverElement()) + tgt.setWhenHandedOverElement((org.hl7.fhir.r4.model.DateTimeType) VersionConvertor_10_40.convertType(src.getWhenHandedOverElement())); if (src.hasDestination()) { tgt.setDestination(VersionConvertor_10_40.convertReference(src.getDestination())); } if (src.hasReceiver()) { for (org.hl7.fhir.dstu2.model.Reference t : src.getReceiver()) tgt.addReceiver(VersionConvertor_10_40.convertReference(t)); } - if (src.hasNote()) - tgt.addNote().setText(src.getNote()); + if (src.hasNoteElement()) + tgt.setNote(Collections.singletonList((org.hl7.fhir.r4.model.Annotation) VersionConvertor_10_40.convertType(src.getNoteElement()))); if (src.hasDosageInstruction()) { for (org.hl7.fhir.dstu2.model.MedicationDispense.MedicationDispenseDosageInstructionComponent t : src.getDosageInstruction()) tgt.addDosageInstruction(convertMedicationDispenseDosageInstructionComponent(t)); } @@ -88,12 +89,10 @@ public class MedicationDispense10_40 { if (src.hasDaysSupply()) { tgt.setDaysSupply(VersionConvertor_10_40.convertSimpleQuantity(src.getDaysSupply())); } - if (src.hasWhenPrepared()) { - tgt.setWhenPrepared(src.getWhenPrepared()); - } - if (src.hasWhenHandedOver()) { - tgt.setWhenHandedOver(src.getWhenHandedOver()); - } + if (src.hasWhenPreparedElement()) + tgt.setWhenPreparedElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_40.convertType(src.getWhenPreparedElement())); + if (src.hasWhenHandedOverElement()) + tgt.setWhenHandedOverElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_40.convertType(src.getWhenHandedOverElement())); if (src.hasDestination()) { tgt.setDestination(VersionConvertor_10_40.convertReference(src.getDestination())); } @@ -117,8 +116,8 @@ public class MedicationDispense10_40 { return null; org.hl7.fhir.r4.model.Dosage tgt = new org.hl7.fhir.r4.model.Dosage(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasText()) { - tgt.setText(src.getText()); + if (src.hasTextElement()) { + tgt.setTextElement((StringType) VersionConvertor_10_40.convertType(src.getTextElement())); } if (src.hasTiming()) { tgt.setTiming(VersionConvertor_10_40.convertTiming(src.getTiming())); @@ -152,8 +151,8 @@ public class MedicationDispense10_40 { return null; org.hl7.fhir.dstu2.model.MedicationDispense.MedicationDispenseDosageInstructionComponent tgt = new org.hl7.fhir.dstu2.model.MedicationDispense.MedicationDispenseDosageInstructionComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasText()) { - tgt.setText(src.getText()); + if (src.hasTextElement()) { + tgt.setTextElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getTextElement())); } if (src.hasTiming()) { tgt.setTiming(VersionConvertor_10_40.convertTiming(src.getTiming())); diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/MedicationStatement10_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/MedicationStatement10_40.java index 6d687156a..e5d60ff0d 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/MedicationStatement10_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/MedicationStatement10_40.java @@ -3,6 +3,7 @@ package org.hl7.fhir.convertors.conv10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r4.model.Dosage.DosageDoseAndRateComponent; +import java.util.Collections; public class MedicationStatement10_40 { @@ -32,8 +33,8 @@ public class MedicationStatement10_40 { if (src.hasDerivedFrom()) { for (org.hl7.fhir.r4.model.Reference t : src.getDerivedFrom()) tgt.addSupportingInformation(VersionConvertor_10_40.convertReference(t)); } - if (src.hasDateAsserted()) - tgt.setDateAsserted(src.getDateAsserted()); + if (src.hasDateAssertedElement()) + tgt.setDateAssertedElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_40.convertType(src.getDateAssertedElement())); if (src.hasNote()) { for (org.hl7.fhir.r4.model.Annotation t : src.getNote()) tgt.setNote(t.getText()); } @@ -69,10 +70,10 @@ public class MedicationStatement10_40 { if (src.hasSupportingInformation()) { for (org.hl7.fhir.dstu2.model.Reference t : src.getSupportingInformation()) tgt.addDerivedFrom(VersionConvertor_10_40.convertReference(t)); } - if (src.hasDateAsserted()) - tgt.setDateAsserted(src.getDateAsserted()); - if (src.hasNote()) - tgt.addNote().setText(src.getNote()); + if (src.hasDateAssertedElement()) + tgt.setDateAssertedElement((org.hl7.fhir.r4.model.DateTimeType) VersionConvertor_10_40.convertType(src.getDateAssertedElement())); + if (src.hasNoteElement()) + tgt.setNote(Collections.singletonList((org.hl7.fhir.r4.model.Annotation) VersionConvertor_10_40.convertType(src.getNoteElement()))); if (src.hasDosage()) { for (org.hl7.fhir.dstu2.model.MedicationStatement.MedicationStatementDosageComponent t : src.getDosage()) tgt.addDosage(convertMedicationStatementDosageComponent(t)); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/MessageHeader10_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/MessageHeader10_40.java index 3021311ad..bf22081fc 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/MessageHeader10_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/MessageHeader10_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class MessageHeader10_40 { @@ -10,15 +11,13 @@ public class MessageHeader10_40 { return null; org.hl7.fhir.dstu2.model.MessageHeader.MessageDestinationComponent tgt = new org.hl7.fhir.dstu2.model.MessageHeader.MessageDestinationComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement())); if (src.hasTarget()) { tgt.setTarget(VersionConvertor_10_40.convertReference(src.getTarget())); } - if (src.hasEndpoint()) { - tgt.setEndpoint(src.getEndpoint()); - } + if (src.hasEndpointElement()) + tgt.setEndpointElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_40.convertType(src.getEndpointElement())); return tgt; } @@ -27,15 +26,13 @@ public class MessageHeader10_40 { return null; org.hl7.fhir.r4.model.MessageHeader.MessageDestinationComponent tgt = new org.hl7.fhir.r4.model.MessageHeader.MessageDestinationComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement())); if (src.hasTarget()) { tgt.setTarget(VersionConvertor_10_40.convertReference(src.getTarget())); } - if (src.hasEndpoint()) { - tgt.setEndpoint(src.getEndpoint()); - } + if (src.hasEndpointElement()) + tgt.setEndpointElement((org.hl7.fhir.r4.model.UrlType) VersionConvertor_10_40.convertType(src.getEndpointElement())); return tgt; } @@ -113,9 +110,8 @@ public class MessageHeader10_40 { return null; org.hl7.fhir.dstu2.model.MessageHeader.MessageHeaderResponseComponent tgt = new org.hl7.fhir.dstu2.model.MessageHeader.MessageHeaderResponseComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasIdentifier()) { - tgt.setIdentifier(src.getIdentifier()); - } + if (src.hasIdentifierElement()) + tgt.setIdentifierElement((org.hl7.fhir.dstu2.model.IdType) VersionConvertor_10_40.convertType(src.getIdentifierElement())); if (src.hasCode()) { tgt.setCode(convertResponseType(src.getCode())); } @@ -130,9 +126,8 @@ public class MessageHeader10_40 { return null; org.hl7.fhir.r4.model.MessageHeader.MessageHeaderResponseComponent tgt = new org.hl7.fhir.r4.model.MessageHeader.MessageHeaderResponseComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasIdentifier()) { - tgt.setIdentifier(src.getIdentifier()); - } + if (src.hasIdentifierElement()) + tgt.setIdentifierElement((org.hl7.fhir.r4.model.IdType) VersionConvertor_10_40.convertType(src.getIdentifierElement())); if (src.hasCode()) { tgt.setCode(convertResponseType(src.getCode())); } @@ -147,21 +142,17 @@ public class MessageHeader10_40 { return null; org.hl7.fhir.r4.model.MessageHeader.MessageSourceComponent tgt = new org.hl7.fhir.r4.model.MessageHeader.MessageSourceComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasSoftware()) { - tgt.setSoftware(src.getSoftware()); - } - if (src.hasVersion()) { - tgt.setVersion(src.getVersion()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement())); + if (src.hasSoftwareElement()) + tgt.setSoftwareElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getSoftwareElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getVersionElement())); if (src.hasContact()) { tgt.setContact(VersionConvertor_10_40.convertContactPoint(src.getContact())); } - if (src.hasEndpoint()) { - tgt.setEndpoint(src.getEndpoint()); - } + if (src.hasEndpointElement()) + tgt.setEndpointElement((org.hl7.fhir.r4.model.UrlType) VersionConvertor_10_40.convertType(src.getEndpointElement())); return tgt; } @@ -170,21 +161,17 @@ public class MessageHeader10_40 { return null; org.hl7.fhir.dstu2.model.MessageHeader.MessageSourceComponent tgt = new org.hl7.fhir.dstu2.model.MessageHeader.MessageSourceComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasSoftware()) { - tgt.setSoftware(src.getSoftware()); - } - if (src.hasVersion()) { - tgt.setVersion(src.getVersion()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement())); + if (src.hasSoftwareElement()) + tgt.setSoftwareElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getSoftwareElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getVersionElement())); if (src.hasContact()) { tgt.setContact(VersionConvertor_10_40.convertContactPoint(src.getContact())); } - if (src.hasEndpoint()) { - tgt.setEndpoint(src.getEndpoint()); - } + if (src.hasEndpointElement()) + tgt.setEndpointElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_40.convertType(src.getEndpointElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/NamingSystem10_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/NamingSystem10_40.java index 1d8881462..6fe2cbaec 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/NamingSystem10_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/NamingSystem10_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class NamingSystem10_40 { @@ -10,39 +11,34 @@ public class NamingSystem10_40 { return null; org.hl7.fhir.r4.model.NamingSystem tgt = new org.hl7.fhir.r4.model.NamingSystem(); VersionConvertor_10_40.copyDomainResource(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_10_40.convertConformanceResourceStatus(src.getStatus())); } if (src.hasKind()) { tgt.setKind(convertNamingSystemType(src.getKind())); } - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) { - tgt.setPublisher(src.getPublisher()); - } + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.r4.model.DateTimeType) VersionConvertor_10_40.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu2.model.NamingSystem.NamingSystemContactComponent t : src.getContact()) tgt.addContact(convertNamingSystemContactComponent(t)); } - if (src.hasResponsible()) { - tgt.setResponsible(src.getResponsible()); - } + if (src.hasResponsibleElement()) + tgt.setResponsibleElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getResponsibleElement())); if (src.hasType()) { tgt.setType(VersionConvertor_10_40.convertCodeableConcept(src.getType())); } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r4.model.MarkdownType) VersionConvertor_10_40.convertType(src.getDescriptionElement())); for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getUseContext()) if (VersionConvertor_10_40.isJurisdiction(t)) tgt.addJurisdiction(VersionConvertor_10_40.convertCodeableConcept(t)); else tgt.addUseContext(VersionConvertor_10_40.convertCodeableConceptToUsageContext(t)); - if (src.hasUsage()) { - tgt.setUsage(src.getUsage()); - } + if (src.hasUsageElement()) + tgt.setUsageElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getUsageElement())); if (src.hasUniqueId()) { for (org.hl7.fhir.dstu2.model.NamingSystem.NamingSystemUniqueIdComponent t : src.getUniqueId()) tgt.addUniqueId(convertNamingSystemUniqueIdComponent(t)); } @@ -54,40 +50,35 @@ public class NamingSystem10_40 { return null; org.hl7.fhir.dstu2.model.NamingSystem tgt = new org.hl7.fhir.dstu2.model.NamingSystem(); VersionConvertor_10_40.copyDomainResource(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_10_40.convertConformanceResourceStatus(src.getStatus())); } if (src.hasKind()) { tgt.setKind(convertNamingSystemType(src.getKind())); } - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) { - tgt.setPublisher(src.getPublisher()); - } + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_40.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact()) tgt.addContact(convertNamingSystemContactComponent(t)); } - if (src.hasResponsible()) { - tgt.setResponsible(src.getResponsible()); - } + if (src.hasResponsibleElement()) + tgt.setResponsibleElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getResponsibleElement())); if (src.hasType()) { tgt.setType(VersionConvertor_10_40.convertCodeableConcept(src.getType())); } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getDescriptionElement())); for (org.hl7.fhir.r4.model.UsageContext t : src.getUseContext()) if (t.hasValueCodeableConcept()) tgt.addUseContext(VersionConvertor_10_40.convertCodeableConcept(t.getValueCodeableConcept())); if (src.hasJurisdiction()) { for (org.hl7.fhir.r4.model.CodeableConcept t : src.getJurisdiction()) tgt.addUseContext(VersionConvertor_10_40.convertCodeableConcept(t)); } - if (src.hasUsage()) { - tgt.setUsage(src.getUsage()); - } + if (src.hasUsageElement()) + tgt.setUsageElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getUsageElement())); if (src.hasUniqueId()) { for (org.hl7.fhir.r4.model.NamingSystem.NamingSystemUniqueIdComponent t : src.getUniqueId()) tgt.addUniqueId(convertNamingSystemUniqueIdComponent(t)); } @@ -99,9 +90,8 @@ public class NamingSystem10_40 { return null; org.hl7.fhir.r4.model.ContactDetail tgt = new org.hl7.fhir.r4.model.ContactDetail(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_40.convertContactPoint(t)); } @@ -113,9 +103,8 @@ public class NamingSystem10_40 { return null; org.hl7.fhir.dstu2.model.NamingSystem.NamingSystemContactComponent tgt = new org.hl7.fhir.dstu2.model.NamingSystem.NamingSystemContactComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.r4.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_40.convertContactPoint(t)); } @@ -194,12 +183,10 @@ public class NamingSystem10_40 { if (src.hasType()) { tgt.setType(convertNamingSystemIdentifierType(src.getType())); } - if (src.hasValue()) { - tgt.setValue(src.getValue()); - } - if (src.hasPreferred()) { - tgt.setPreferred(src.getPreferred()); - } + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getValueElement())); + if (src.hasPreferredElement()) + tgt.setPreferredElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_10_40.convertType(src.getPreferredElement())); if (src.hasPeriod()) { tgt.setPeriod(VersionConvertor_10_40.convertPeriod(src.getPeriod())); } @@ -214,12 +201,10 @@ public class NamingSystem10_40 { if (src.hasType()) { tgt.setType(convertNamingSystemIdentifierType(src.getType())); } - if (src.hasValue()) { - tgt.setValue(src.getValue()); - } - if (src.hasPreferred()) { - tgt.setPreferred(src.getPreferred()); - } + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getValueElement())); + if (src.hasPreferredElement()) + tgt.setPreferredElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getPreferredElement())); if (src.hasPeriod()) { tgt.setPeriod(VersionConvertor_10_40.convertPeriod(src.getPeriod())); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Observation10_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Observation10_40.java index b11563075..e2d4c8cf2 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Observation10_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Observation10_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Observation10_40 { @@ -31,9 +32,8 @@ public class Observation10_40 { if (src.hasEffective()) { tgt.setEffective(VersionConvertor_10_40.convertType(src.getEffective())); } - if (src.hasIssued()) { - tgt.setIssued(src.getIssued()); - } + if (src.hasIssuedElement()) + tgt.setIssuedElement((org.hl7.fhir.dstu2.model.InstantType) VersionConvertor_10_40.convertType(src.getIssuedElement())); if (src.hasPerformer()) { for (org.hl7.fhir.r4.model.Reference t : src.getPerformer()) tgt.addPerformer(VersionConvertor_10_40.convertReference(t)); } @@ -101,9 +101,8 @@ public class Observation10_40 { if (src.hasEffective()) { tgt.setEffective(VersionConvertor_10_40.convertType(src.getEffective())); } - if (src.hasIssued()) { - tgt.setIssued(src.getIssued()); - } + if (src.hasIssuedElement()) + tgt.setIssuedElement((org.hl7.fhir.r4.model.InstantType) VersionConvertor_10_40.convertType(src.getIssuedElement())); if (src.hasPerformer()) { for (org.hl7.fhir.dstu2.model.Reference t : src.getPerformer()) tgt.addPerformer(VersionConvertor_10_40.convertReference(t)); } @@ -201,9 +200,8 @@ public class Observation10_40 { if (src.hasAge()) { tgt.setAge(VersionConvertor_10_40.convertRange(src.getAge())); } - if (src.hasText()) { - tgt.setText(src.getText()); - } + if (src.hasTextElement()) + tgt.setTextElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getTextElement())); return tgt; } @@ -224,9 +222,8 @@ public class Observation10_40 { if (src.hasAge()) { tgt.setAge(VersionConvertor_10_40.convertRange(src.getAge())); } - if (src.hasText()) { - tgt.setText(src.getText()); - } + if (src.hasTextElement()) + tgt.setTextElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getTextElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/OperationDefinition10_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/OperationDefinition10_40.java index 214a97267..dd3fdd5ee 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/OperationDefinition10_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/OperationDefinition10_40.java @@ -7,6 +7,7 @@ import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r4.model.Enumerations.SearchParamType; import org.hl7.fhir.r4.model.Type; import org.hl7.fhir.utilities.Utilities; +import java.util.Collections; public class OperationDefinition10_40 { @@ -15,58 +16,50 @@ public class OperationDefinition10_40 { return null; org.hl7.fhir.r4.model.OperationDefinition tgt = new org.hl7.fhir.r4.model.OperationDefinition(); VersionConvertor_10_40.copyDomainResource(src, tgt); - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } - if (src.hasVersion()) { - tgt.setVersion(src.getVersion()); - } - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_10_40.convertType(src.getUrlElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_10_40.convertConformanceResourceStatus(src.getStatus())); } if (src.hasKind()) { tgt.setKind(convertOperationKind(src.getKind())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) { - tgt.setPublisher(src.getPublisher()); - } + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_10_40.convertType(src.getExperimentalElement())); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.r4.model.DateTimeType) VersionConvertor_10_40.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu2.model.OperationDefinition.OperationDefinitionContactComponent t : src.getContact()) tgt.addContact(convertOperationDefinitionContactComponent(t)); } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r4.model.MarkdownType) VersionConvertor_10_40.convertType(src.getDescriptionElement())); if (src.hasRequirements()) { tgt.setPurpose(src.getRequirements()); } if (src.hasIdempotent()) tgt.setAffectsState(!src.getIdempotent()); - if (src.hasCode()) { - tgt.setCode(src.getCode()); - } + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.r4.model.CodeType) VersionConvertor_10_40.convertType(src.getCodeElement())); if (src.hasNotes()) { tgt.setComment(src.getNotes()); } if (src.hasBase()) { tgt.setBaseElement(VersionConvertor_10_40.convertReferenceToCanonical(src.getBase())); } - if (src.hasSystem()) { - tgt.setSystem(src.getSystem()); - } + if (src.hasSystemElement()) + tgt.setSystemElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_10_40.convertType(src.getSystemElement())); if (src.hasType()) { for (org.hl7.fhir.dstu2.model.CodeType t : src.getType()) tgt.addResource(t.getValue()); } tgt.setType(tgt.hasResource()); - if (src.hasInstance()) { - tgt.setInstance(src.getInstance()); - } + if (src.hasInstanceElement()) + tgt.setInstanceElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_10_40.convertType(src.getInstanceElement())); if (src.hasParameter()) { for (org.hl7.fhir.dstu2.model.OperationDefinition.OperationDefinitionParameterComponent t : src.getParameter()) tgt.addParameter(convertOperationDefinitionParameterComponent(t)); } @@ -78,58 +71,50 @@ public class OperationDefinition10_40 { return null; org.hl7.fhir.dstu2.model.OperationDefinition tgt = new org.hl7.fhir.dstu2.model.OperationDefinition(); VersionConvertor_10_40.copyDomainResource(src, tgt); - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } - if (src.hasVersion()) { - tgt.setVersion(src.getVersion()); - } - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_40.convertType(src.getUrlElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_10_40.convertConformanceResourceStatus(src.getStatus())); } if (src.hasKind()) { tgt.setKind(convertOperationKind(src.getKind())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) { - tgt.setPublisher(src.getPublisher()); - } + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getExperimentalElement())); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_40.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact()) tgt.addContact(convertOperationDefinitionContactComponent(t)); } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getDescriptionElement())); if (src.hasPurpose()) { tgt.setRequirements(src.getPurpose()); } if (src.hasAffectsState()) { tgt.setIdempotent(!src.getAffectsState()); } - if (src.hasCode()) { - tgt.setCode(src.getCode()); - } + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu2.model.CodeType) VersionConvertor_10_40.convertType(src.getCodeElement())); if (src.hasComment()) { tgt.setNotes(src.getComment()); } if (src.hasBase()) tgt.setBase(VersionConvertor_10_40.convertCanonicalToReference(src.getBaseElement())); - if (src.hasSystem()) { - tgt.setSystem(src.getSystem()); - } + if (src.hasSystemElement()) + tgt.setSystemElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getSystemElement())); if (src.getType()) if (src.hasResource()) { for (org.hl7.fhir.r4.model.CodeType t : src.getResource()) tgt.addType(t.getValue()); } - if (src.hasInstance()) { - tgt.setInstance(src.getInstance()); - } + if (src.hasInstanceElement()) + tgt.setInstanceElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getInstanceElement())); if (src.hasParameter()) { for (org.hl7.fhir.r4.model.OperationDefinition.OperationDefinitionParameterComponent t : src.getParameter()) tgt.addParameter(convertOperationDefinitionParameterComponent(t)); } @@ -141,9 +126,8 @@ public class OperationDefinition10_40 { return null; org.hl7.fhir.dstu2.model.OperationDefinition.OperationDefinitionContactComponent tgt = new org.hl7.fhir.dstu2.model.OperationDefinition.OperationDefinitionContactComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.r4.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_40.convertContactPoint(t)); } @@ -155,9 +139,8 @@ public class OperationDefinition10_40 { return null; org.hl7.fhir.r4.model.ContactDetail tgt = new org.hl7.fhir.r4.model.ContactDetail(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_40.convertContactPoint(t)); } @@ -202,27 +185,19 @@ public class OperationDefinition10_40 { return null; org.hl7.fhir.dstu2.model.OperationDefinition.OperationDefinitionParameterComponent tgt = new org.hl7.fhir.dstu2.model.OperationDefinition.OperationDefinitionParameterComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.CodeType) VersionConvertor_10_40.convertType(src.getNameElement())); if (src.hasUse()) { tgt.setUse(convertOperationParameterUse(src.getUse())); } - if (src.hasMin()) { - tgt.setMin(src.getMin()); - } - if (src.hasMax()) { - tgt.setMax(src.getMax()); - } - if (src.hasDocumentation()) { - tgt.setDocumentation(src.getDocumentation()); - } - if (src.hasSearchType()) { - if (src.hasSearchType()) { - tgt.setType(src.getSearchType().toCode()); - } - } else - tgt.setType(src.getType()); + if (src.hasMinElement()) + tgt.setMinElement((org.hl7.fhir.dstu2.model.IntegerType) VersionConvertor_10_40.convertType(src.getMinElement())); + if (src.hasMaxElement()) + tgt.setMaxElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getMaxElement())); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getDocumentationElement())); + if (src.hasTypeElement()) + tgt.setTypeElement((org.hl7.fhir.dstu2.model.CodeType) VersionConvertor_10_40.convertType(src.getTypeElement())); if (src.hasTargetProfile()) { for (org.hl7.fhir.r4.model.UriType t : src.getTargetProfile()) tgt.setProfile(new Reference(t.getValue())); } @@ -239,31 +214,19 @@ public class OperationDefinition10_40 { return null; org.hl7.fhir.r4.model.OperationDefinition.OperationDefinitionParameterComponent tgt = new org.hl7.fhir.r4.model.OperationDefinition.OperationDefinitionParameterComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.CodeType) VersionConvertor_10_40.convertType(src.getNameElement())); if (src.hasUse()) { tgt.setUse(convertOperationParameterUse(src.getUse())); } - if (src.hasMin()) { - tgt.setMin(src.getMin()); - } - if (src.hasMax()) { - tgt.setMax(src.getMax()); - } - if (src.hasDocumentation()) { - tgt.setDocumentation(src.getDocumentation()); - } - if (Utilities.existsInList(src.getType(), "token", "reference", "composite", "number", "date", "quantity", "uri")) { - tgt.setType("string"); - if (src.hasType()) { - tgt.setSearchType(SearchParamType.fromCode(src.getType())); - } - } else { - if (src.hasType()) { - tgt.setType(src.getType()); - } - } + if (src.hasMinElement()) + tgt.setMinElement((org.hl7.fhir.r4.model.IntegerType) VersionConvertor_10_40.convertType(src.getMinElement())); + if (src.hasMaxElement()) + tgt.setMaxElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getMaxElement())); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getDocumentationElement())); + if (Utilities.existsInList(src.getType(), "token", "reference", "composite", "number", "date", "quantity", "uri")) + tgt.setTypeElement((org.hl7.fhir.r4.model.CodeType) VersionConvertor_10_40.convertType(src.getTypeElement())); if (src.hasProfile()) { tgt.addTargetProfile(src.getProfile().getReference()); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/OperationOutcome10_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/OperationOutcome10_40.java index c6ab803d8..f7b160b98 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/OperationOutcome10_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/OperationOutcome10_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class OperationOutcome10_40 { @@ -209,9 +210,8 @@ public class OperationOutcome10_40 { if (src.hasDetails()) { tgt.setDetails(VersionConvertor_10_40.convertCodeableConcept(src.getDetails())); } - if (src.hasDiagnostics()) { - tgt.setDiagnostics(src.getDiagnostics()); - } + if (src.hasDiagnosticsElement()) + tgt.setDiagnosticsElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getDiagnosticsElement())); if (src.hasLocation()) { for (org.hl7.fhir.dstu2.model.StringType t : src.getLocation()) tgt.addLocation(t.getValue()); } @@ -232,9 +232,8 @@ public class OperationOutcome10_40 { if (src.hasDetails()) { tgt.setDetails(VersionConvertor_10_40.convertCodeableConcept(src.getDetails())); } - if (src.hasDiagnostics()) { - tgt.setDiagnostics(src.getDiagnostics()); - } + if (src.hasDiagnosticsElement()) + tgt.setDiagnosticsElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getDiagnosticsElement())); if (src.hasLocation()) { for (org.hl7.fhir.r4.model.StringType t : src.getLocation()) tgt.addLocation(t.getValue()); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Organization10_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Organization10_40.java index 29bbc0e40..973b62e46 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Organization10_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Organization10_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Organization10_40 { @@ -13,15 +14,13 @@ public class Organization10_40 { if (src.hasIdentifier()) { for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_40.convertIdentifier(t)); } - if (src.hasActive()) { - tgt.setActive(src.getActive()); - } + if (src.hasActiveElement()) + tgt.setActiveElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_10_40.convertType(src.getActiveElement())); if (src.hasType()) { tgt.addType(VersionConvertor_10_40.convertCodeableConcept(src.getType())); } - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_40.convertContactPoint(t)); } @@ -45,15 +44,13 @@ public class Organization10_40 { if (src.hasIdentifier()) { for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_40.convertIdentifier(t)); } - if (src.hasActive()) { - tgt.setActive(src.getActive()); - } + if (src.hasActiveElement()) + tgt.setActiveElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getActiveElement())); if (src.hasType()) { tgt.setType(VersionConvertor_10_40.convertCodeableConcept(src.getTypeFirstRep())); } - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.r4.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_40.convertContactPoint(t)); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Parameters10_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Parameters10_40.java index c7237187f..861a396ea 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Parameters10_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Parameters10_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Parameters10_40 { @@ -32,9 +33,8 @@ public class Parameters10_40 { return null; org.hl7.fhir.dstu2.model.Parameters.ParametersParameterComponent tgt = new org.hl7.fhir.dstu2.model.Parameters.ParametersParameterComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement())); if (src.hasValue()) { tgt.setValue(VersionConvertor_10_40.convertType(src.getValue())); } @@ -52,9 +52,8 @@ public class Parameters10_40 { return null; org.hl7.fhir.r4.model.Parameters.ParametersParameterComponent tgt = new org.hl7.fhir.r4.model.Parameters.ParametersParameterComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement())); if (src.hasValue()) { tgt.setValue(VersionConvertor_10_40.convertType(src.getValue())); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Patient10_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Patient10_40.java index b5635e556..29536e704 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Patient10_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Patient10_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Patient10_40 { @@ -132,9 +133,8 @@ public class Patient10_40 { if (src.hasIdentifier()) { for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_40.convertIdentifier(t)); } - if (src.hasActive()) { - tgt.setActive(src.getActive()); - } + if (src.hasActiveElement()) + tgt.setActiveElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_10_40.convertType(src.getActiveElement())); if (src.hasName()) { for (org.hl7.fhir.dstu2.model.HumanName t : src.getName()) tgt.addName(VersionConvertor_10_40.convertHumanName(t)); } @@ -144,9 +144,8 @@ public class Patient10_40 { if (src.hasGender()) { tgt.setGender(VersionConvertor_10_40.convertAdministrativeGender(src.getGender())); } - if (src.hasBirthDate()) { - tgt.setBirthDate(src.getBirthDate()); - } + if (src.hasBirthDateElement()) + tgt.setBirthDateElement((org.hl7.fhir.r4.model.DateType) VersionConvertor_10_40.convertType(src.getBirthDateElement())); if (src.hasDeceased()) { tgt.setDeceased(VersionConvertor_10_40.convertType(src.getDeceased())); } @@ -190,9 +189,8 @@ public class Patient10_40 { if (src.hasIdentifier()) { for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_40.convertIdentifier(t)); } - if (src.hasActive()) { - tgt.setActive(src.getActive()); - } + if (src.hasActiveElement()) + tgt.setActiveElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getActiveElement())); if (src.hasName()) { for (org.hl7.fhir.r4.model.HumanName t : src.getName()) tgt.addName(VersionConvertor_10_40.convertHumanName(t)); } @@ -202,9 +200,8 @@ public class Patient10_40 { if (src.hasGender()) { tgt.setGender(VersionConvertor_10_40.convertAdministrativeGender(src.getGender())); } - if (src.hasBirthDate()) { - tgt.setBirthDate(src.getBirthDate()); - } + if (src.hasBirthDateElement()) + tgt.setBirthDateElement((org.hl7.fhir.dstu2.model.DateType) VersionConvertor_10_40.convertType(src.getBirthDateElement())); if (src.hasDeceased()) { tgt.setDeceased(VersionConvertor_10_40.convertType(src.getDeceased())); } @@ -248,9 +245,8 @@ public class Patient10_40 { if (src.hasLanguage()) { tgt.setLanguage(VersionConvertor_10_40.convertCodeableConcept(src.getLanguage())); } - if (src.hasPreferred()) { - tgt.setPreferred(src.getPreferred()); - } + if (src.hasPreferredElement()) + tgt.setPreferredElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_10_40.convertType(src.getPreferredElement())); return tgt; } @@ -262,9 +258,8 @@ public class Patient10_40 { if (src.hasLanguage()) { tgt.setLanguage(VersionConvertor_10_40.convertCodeableConcept(src.getLanguage())); } - if (src.hasPreferred()) { - tgt.setPreferred(src.getPreferred()); - } + if (src.hasPreferredElement()) + tgt.setPreferredElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getPreferredElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Person10_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Person10_40.java index 7103edbf2..1888ffba2 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Person10_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Person10_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Person10_40 { @@ -56,9 +57,8 @@ public class Person10_40 { if (src.hasGender()) { tgt.setGender(VersionConvertor_10_40.convertAdministrativeGender(src.getGender())); } - if (src.hasBirthDate()) { - tgt.setBirthDate(src.getBirthDate()); - } + if (src.hasBirthDateElement()) + tgt.setBirthDateElement((org.hl7.fhir.r4.model.DateType) VersionConvertor_10_40.convertType(src.getBirthDateElement())); if (src.hasAddress()) { for (org.hl7.fhir.dstu2.model.Address t : src.getAddress()) tgt.addAddress(VersionConvertor_10_40.convertAddress(t)); } @@ -68,9 +68,8 @@ public class Person10_40 { if (src.hasManagingOrganization()) { tgt.setManagingOrganization(VersionConvertor_10_40.convertReference(src.getManagingOrganization())); } - if (src.hasActive()) { - tgt.setActive(src.getActive()); - } + if (src.hasActiveElement()) + tgt.setActiveElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_10_40.convertType(src.getActiveElement())); if (src.hasLink()) { for (org.hl7.fhir.dstu2.model.Person.PersonLinkComponent t : src.getLink()) tgt.addLink(convertPersonLinkComponent(t)); } @@ -94,9 +93,8 @@ public class Person10_40 { if (src.hasGender()) { tgt.setGender(VersionConvertor_10_40.convertAdministrativeGender(src.getGender())); } - if (src.hasBirthDate()) { - tgt.setBirthDate(src.getBirthDate()); - } + if (src.hasBirthDateElement()) + tgt.setBirthDateElement((org.hl7.fhir.dstu2.model.DateType) VersionConvertor_10_40.convertType(src.getBirthDateElement())); if (src.hasAddress()) { for (org.hl7.fhir.r4.model.Address t : src.getAddress()) tgt.addAddress(VersionConvertor_10_40.convertAddress(t)); } @@ -106,9 +104,8 @@ public class Person10_40 { if (src.hasManagingOrganization()) { tgt.setManagingOrganization(VersionConvertor_10_40.convertReference(src.getManagingOrganization())); } - if (src.hasActive()) { - tgt.setActive(src.getActive()); - } + if (src.hasActiveElement()) + tgt.setActiveElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getActiveElement())); if (src.hasLink()) { for (org.hl7.fhir.r4.model.Person.PersonLinkComponent t : src.getLink()) tgt.addLink(convertPersonLinkComponent(t)); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Practitioner10_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Practitioner10_40.java index 9e99e0e07..90151af02 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Practitioner10_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Practitioner10_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Practitioner10_40 { @@ -13,9 +14,8 @@ public class Practitioner10_40 { if (src.hasIdentifier()) { for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_40.convertIdentifier(t)); } - if (src.hasActive()) { - tgt.setActive(src.getActive()); - } + if (src.hasActiveElement()) + tgt.setActiveElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getActiveElement())); if (src.hasName()) { for (org.hl7.fhir.r4.model.HumanName t : src.getName()) tgt.setName(VersionConvertor_10_40.convertHumanName(t)); } @@ -28,9 +28,8 @@ public class Practitioner10_40 { if (src.hasGender()) { tgt.setGender(VersionConvertor_10_40.convertAdministrativeGender(src.getGender())); } - if (src.hasBirthDate()) { - tgt.setBirthDate(src.getBirthDate()); - } + if (src.hasBirthDateElement()) + tgt.setBirthDateElement((org.hl7.fhir.dstu2.model.DateType) VersionConvertor_10_40.convertType(src.getBirthDateElement())); if (src.hasPhoto()) { for (org.hl7.fhir.r4.model.Attachment t : src.getPhoto()) tgt.addPhoto(VersionConvertor_10_40.convertAttachment(t)); } @@ -51,9 +50,8 @@ public class Practitioner10_40 { if (src.hasIdentifier()) { for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_40.convertIdentifier(t)); } - if (src.hasActive()) { - tgt.setActive(src.getActive()); - } + if (src.hasActiveElement()) + tgt.setActiveElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_10_40.convertType(src.getActiveElement())); if (src.hasName()) tgt.addName(VersionConvertor_10_40.convertHumanName(src.getName())); if (src.hasTelecom()) { @@ -65,9 +63,8 @@ public class Practitioner10_40 { if (src.hasGender()) { tgt.setGender(VersionConvertor_10_40.convertAdministrativeGender(src.getGender())); } - if (src.hasBirthDate()) { - tgt.setBirthDate(src.getBirthDate()); - } + if (src.hasBirthDateElement()) + tgt.setBirthDateElement((org.hl7.fhir.r4.model.DateType) VersionConvertor_10_40.convertType(src.getBirthDateElement())); if (src.hasPhoto()) { for (org.hl7.fhir.dstu2.model.Attachment t : src.getPhoto()) tgt.addPhoto(VersionConvertor_10_40.convertAttachment(t)); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Questionnaire10_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Questionnaire10_40.java index 3a9bc7b0a..79e91f991 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Questionnaire10_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Questionnaire10_40.java @@ -4,6 +4,7 @@ import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r4.model.ContactDetail; import org.hl7.fhir.r4.model.Questionnaire.QuestionnaireItemAnswerOptionComponent; +import java.util.Collections; public class Questionnaire10_40 { @@ -15,17 +16,15 @@ public class Questionnaire10_40 { if (src.hasIdentifier()) { for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_40.convertIdentifier(t)); } - if (src.hasVersion()) { - tgt.setVersion(src.getVersion()); - } + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getVersionElement())); if (src.hasStatus()) { tgt.setStatus(convertQuestionnaireStatus(src.getStatus())); } - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) { - tgt.setPublisher(src.getPublisher()); - } + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_40.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getPublisherElement())); if (src.hasContact()) { for (ContactDetail t : src.getContact()) for (org.hl7.fhir.r4.model.ContactPoint t1 : t.getTelecom()) tgt.addTelecom(VersionConvertor_10_40.convertContactPoint(t1)); } @@ -54,8 +53,8 @@ public class Questionnaire10_40 { for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_40.convertIdentifier(t)); tgt.setVersion(src.getVersion()); tgt.setStatus(convertQuestionnaireStatus(src.getStatus())); - if (src.hasDate()) - tgt.setDate(src.getDate()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.r4.model.DateTimeType) VersionConvertor_10_40.convertType(src.getDateElement())); tgt.setPublisher(src.getPublisher()); for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getTelecom()) tgt.addContact(convertQuestionnaireContactComponent(t)); org.hl7.fhir.dstu2.model.Questionnaire.GroupComponent root = src.getGroup(); @@ -80,21 +79,17 @@ public class Questionnaire10_40 { return null; org.hl7.fhir.dstu2.model.Questionnaire.GroupComponent tgt = new org.hl7.fhir.dstu2.model.Questionnaire.GroupComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasLinkId()) { - tgt.setLinkId(src.getLinkId()); - } + if (src.hasLinkIdElement()) + tgt.setLinkIdElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getLinkIdElement())); if (src.hasCode()) { for (org.hl7.fhir.r4.model.Coding t : src.getCode()) tgt.addConcept(VersionConvertor_10_40.convertCoding(t)); } - if (src.hasText()) { - tgt.setText(src.getText()); - } - if (src.hasRequired()) { - tgt.setRequired(src.getRequired()); - } - if (src.hasRepeats()) { - tgt.setRepeats(src.getRepeats()); - } + if (src.hasTextElement()) + tgt.setTextElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getTextElement())); + if (src.hasRequiredElement()) + tgt.setRequiredElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getRequiredElement())); + if (src.hasRepeatsElement()) + tgt.setRepeatsElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getRepeatsElement())); for (org.hl7.fhir.r4.model.Questionnaire.QuestionnaireItemComponent t : src.getItem()) if (t.getType() == org.hl7.fhir.r4.model.Questionnaire.QuestionnaireItemType.GROUP) tgt.addGroup(convertQuestionnaireGroupComponent(t)); else @@ -107,22 +102,18 @@ public class Questionnaire10_40 { return null; org.hl7.fhir.r4.model.Questionnaire.QuestionnaireItemComponent tgt = new org.hl7.fhir.r4.model.Questionnaire.QuestionnaireItemComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasLinkId()) { - tgt.setLinkId(src.getLinkId()); - } + if (src.hasLinkIdElement()) + tgt.setLinkIdElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getLinkIdElement())); if (src.hasConcept()) { for (org.hl7.fhir.dstu2.model.Coding t : src.getConcept()) tgt.addCode(VersionConvertor_10_40.convertCoding(t)); } - if (src.hasText()) { - tgt.setText(src.getText()); - } + if (src.hasTextElement()) + tgt.setTextElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getTextElement())); tgt.setType(org.hl7.fhir.r4.model.Questionnaire.QuestionnaireItemType.GROUP); - if (src.hasRequired()) { - tgt.setRequired(src.getRequired()); - } - if (src.hasRepeats()) { - tgt.setRepeats(src.getRepeats()); - } + if (src.hasRequiredElement()) + tgt.setRequiredElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_10_40.convertType(src.getRequiredElement())); + if (src.hasRepeatsElement()) + tgt.setRepeatsElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_10_40.convertType(src.getRepeatsElement())); if (src.hasGroup()) { for (org.hl7.fhir.dstu2.model.Questionnaire.GroupComponent t : src.getGroup()) tgt.addItem(convertQuestionnaireGroupComponent(t)); } @@ -174,24 +165,20 @@ public class Questionnaire10_40 { return null; org.hl7.fhir.dstu2.model.Questionnaire.QuestionComponent tgt = new org.hl7.fhir.dstu2.model.Questionnaire.QuestionComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasLinkId()) { - tgt.setLinkId(src.getLinkId()); - } + if (src.hasLinkIdElement()) + tgt.setLinkIdElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getLinkIdElement())); if (src.hasCode()) { for (org.hl7.fhir.r4.model.Coding t : src.getCode()) tgt.addConcept(VersionConvertor_10_40.convertCoding(t)); } - if (src.hasText()) { - tgt.setText(src.getText()); - } + if (src.hasTextElement()) + tgt.setTextElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getTextElement())); if (src.hasType()) { tgt.setType(convertQuestionnaireItemType(src.getType())); } - if (src.hasRequired()) { - tgt.setRequired(src.getRequired()); - } - if (src.hasRepeats()) { - tgt.setRepeats(src.getRepeats()); - } + if (src.hasRequiredElement()) + tgt.setRequiredElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getRequiredElement())); + if (src.hasRepeatsElement()) + tgt.setRepeatsElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getRepeatsElement())); if (src.hasAnswerValueSetElement()) { tgt.setOptions(VersionConvertor_10_40.convertCanonicalToReference(src.getAnswerValueSetElement())); } @@ -212,24 +199,20 @@ public class Questionnaire10_40 { return null; org.hl7.fhir.r4.model.Questionnaire.QuestionnaireItemComponent tgt = new org.hl7.fhir.r4.model.Questionnaire.QuestionnaireItemComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasLinkId()) { - tgt.setLinkId(src.getLinkId()); - } + if (src.hasLinkIdElement()) + tgt.setLinkIdElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getLinkIdElement())); if (src.hasConcept()) { for (org.hl7.fhir.dstu2.model.Coding t : src.getConcept()) tgt.addCode(VersionConvertor_10_40.convertCoding(t)); } - if (src.hasText()) { - tgt.setText(src.getText()); - } + if (src.hasTextElement()) + tgt.setTextElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getTextElement())); if (src.hasType()) { tgt.setType(convertQuestionnaireQuestionType(src.getType())); } - if (src.hasRequired()) { - tgt.setRequired(src.getRequired()); - } - if (src.hasRepeats()) { - tgt.setRepeats(src.getRepeats()); - } + if (src.hasRequiredElement()) + tgt.setRequiredElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_10_40.convertType(src.getRequiredElement())); + if (src.hasRepeatsElement()) + tgt.setRepeatsElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_10_40.convertType(src.getRepeatsElement())); if (src.hasOptions()) { tgt.setAnswerValueSetElement(VersionConvertor_10_40.convertReferenceToCanonical(src.getOptions())); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/QuestionnaireResponse10_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/QuestionnaireResponse10_40.java index 84aef8183..5b3f0edb0 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/QuestionnaireResponse10_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/QuestionnaireResponse10_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class QuestionnaireResponse10_40 { @@ -10,12 +11,10 @@ public class QuestionnaireResponse10_40 { return null; org.hl7.fhir.dstu2.model.QuestionnaireResponse.GroupComponent tgt = new org.hl7.fhir.dstu2.model.QuestionnaireResponse.GroupComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasLinkId()) { - tgt.setLinkId(src.getLinkId()); - } - if (src.hasText()) { - tgt.setText(src.getText()); - } + if (src.hasLinkIdElement()) + tgt.setLinkIdElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getLinkIdElement())); + if (src.hasTextElement()) + tgt.setTextElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getTextElement())); for (org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseItemComponent t : src.getItem()) if (t.hasAnswer()) tgt.addQuestion(convertQuestionnaireItemToQuestion(t)); else @@ -28,12 +27,10 @@ public class QuestionnaireResponse10_40 { return null; org.hl7.fhir.dstu2.model.QuestionnaireResponse.QuestionComponent tgt = new org.hl7.fhir.dstu2.model.QuestionnaireResponse.QuestionComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasLinkId()) { - tgt.setLinkId(src.getLinkId()); - } - if (src.hasText()) { - tgt.setText(src.getText()); - } + if (src.hasLinkIdElement()) + tgt.setLinkIdElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getLinkIdElement())); + if (src.hasTextElement()) + tgt.setTextElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getTextElement())); if (src.hasAnswer()) { for (org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent t : src.getAnswer()) tgt.addAnswer(convertQuestionnaireResponseItemAnswerComponent(t)); } @@ -60,9 +57,8 @@ public class QuestionnaireResponse10_40 { if (src.hasAuthor()) { tgt.setAuthor(VersionConvertor_10_40.convertReference(src.getAuthor())); } - if (src.hasAuthored()) { - tgt.setAuthored(src.getAuthored()); - } + if (src.hasAuthoredElement()) + tgt.setAuthoredElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_40.convertType(src.getAuthoredElement())); if (src.hasSource()) { tgt.setSource(VersionConvertor_10_40.convertReference(src.getSource())); } @@ -97,9 +93,8 @@ public class QuestionnaireResponse10_40 { if (src.hasAuthor()) { tgt.setAuthor(VersionConvertor_10_40.convertReference(src.getAuthor())); } - if (src.hasAuthored()) { - tgt.setAuthored(src.getAuthored()); - } + if (src.hasAuthoredElement()) + tgt.setAuthoredElement((org.hl7.fhir.r4.model.DateTimeType) VersionConvertor_10_40.convertType(src.getAuthoredElement())); if (src.hasSource()) { tgt.setSource(VersionConvertor_10_40.convertReference(src.getSource())); } @@ -116,12 +111,10 @@ public class QuestionnaireResponse10_40 { return null; org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseItemComponent tgt = new org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseItemComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasLinkId()) { - tgt.setLinkId(src.getLinkId()); - } - if (src.hasText()) { - tgt.setText(src.getText()); - } + if (src.hasLinkIdElement()) + tgt.setLinkIdElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getLinkIdElement())); + if (src.hasTextElement()) + tgt.setTextElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getTextElement())); if (src.hasGroup()) { for (org.hl7.fhir.dstu2.model.QuestionnaireResponse.GroupComponent t : src.getGroup()) tgt.addItem(convertQuestionnaireResponseGroupComponent(t)); } @@ -164,12 +157,10 @@ public class QuestionnaireResponse10_40 { return null; org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseItemComponent tgt = new org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseItemComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasLinkId()) { - tgt.setLinkId(src.getLinkId()); - } - if (src.hasText()) { - tgt.setText(src.getText()); - } + if (src.hasLinkIdElement()) + tgt.setLinkIdElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getLinkIdElement())); + if (src.hasTextElement()) + tgt.setTextElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getTextElement())); if (src.hasAnswer()) { for (org.hl7.fhir.dstu2.model.QuestionnaireResponse.QuestionAnswerComponent t : src.getAnswer()) tgt.addAnswer(convertQuestionnaireResponseItemAnswerComponent(t)); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/RiskAssessment10_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/RiskAssessment10_40.java index 89c40e61d..cb060fc5c 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/RiskAssessment10_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/RiskAssessment10_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class RiskAssessment10_40 { @@ -34,9 +35,8 @@ public class RiskAssessment10_40 { if (src.hasPrediction()) { for (org.hl7.fhir.r4.model.RiskAssessment.RiskAssessmentPredictionComponent t : src.getPrediction()) tgt.addPrediction(convertRiskAssessmentPredictionComponent(t)); } - if (src.hasMitigation()) { - tgt.setMitigation(src.getMitigation()); - } + if (src.hasMitigationElement()) + tgt.setMitigationElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getMitigationElement())); return tgt; } @@ -69,9 +69,8 @@ public class RiskAssessment10_40 { if (src.hasPrediction()) { for (org.hl7.fhir.dstu2.model.RiskAssessment.RiskAssessmentPredictionComponent t : src.getPrediction()) tgt.addPrediction(convertRiskAssessmentPredictionComponent(t)); } - if (src.hasMitigation()) { - tgt.setMitigation(src.getMitigation()); - } + if (src.hasMitigationElement()) + tgt.setMitigationElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getMitigationElement())); return tgt; } @@ -86,15 +85,13 @@ public class RiskAssessment10_40 { if (src.hasProbability()) { tgt.setProbability(VersionConvertor_10_40.convertType(src.getProbability())); } - if (src.hasRelativeRisk()) { - tgt.setRelativeRisk(src.getRelativeRisk()); - } + if (src.hasRelativeRiskElement()) + tgt.setRelativeRiskElement((org.hl7.fhir.dstu2.model.DecimalType) VersionConvertor_10_40.convertType(src.getRelativeRiskElement())); if (src.hasWhen()) { tgt.setWhen(VersionConvertor_10_40.convertType(src.getWhen())); } - if (src.hasRationale()) { - tgt.setRationale(src.getRationale()); - } + if (src.hasRationaleElement()) + tgt.setRationaleElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getRationaleElement())); return tgt; } @@ -109,15 +106,13 @@ public class RiskAssessment10_40 { if (src.hasProbability()) { tgt.setProbability(VersionConvertor_10_40.convertType(src.getProbability())); } - if (src.hasRelativeRisk()) { - tgt.setRelativeRisk(src.getRelativeRisk()); - } + if (src.hasRelativeRiskElement()) + tgt.setRelativeRiskElement((org.hl7.fhir.r4.model.DecimalType) VersionConvertor_10_40.convertType(src.getRelativeRiskElement())); if (src.hasWhen()) { tgt.setWhen(VersionConvertor_10_40.convertType(src.getWhen())); } - if (src.hasRationale()) { - tgt.setRationale(src.getRationale()); - } + if (src.hasRationaleElement()) + tgt.setRationaleElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getRationaleElement())); return tgt; } } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Schedule10_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Schedule10_40.java index c9991bcf2..e8562ab59 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Schedule10_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Schedule10_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Schedule10_40 { @@ -22,9 +23,8 @@ public class Schedule10_40 { if (src.hasPlanningHorizon()) { tgt.setPlanningHorizon(VersionConvertor_10_40.convertPeriod(src.getPlanningHorizon())); } - if (src.hasComment()) { - tgt.setComment(src.getComment()); - } + if (src.hasCommentElement()) + tgt.setCommentElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getCommentElement())); return tgt; } @@ -45,9 +45,8 @@ public class Schedule10_40 { if (src.hasPlanningHorizon()) { tgt.setPlanningHorizon(VersionConvertor_10_40.convertPeriod(src.getPlanningHorizon())); } - if (src.hasComment()) { - tgt.setComment(src.getComment()); - } + if (src.hasCommentElement()) + tgt.setCommentElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getCommentElement())); return tgt; } } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/SearchParameter10_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/SearchParameter10_40.java index 11dfb5a37..f39470f05 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/SearchParameter10_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/SearchParameter10_40.java @@ -1,8 +1,12 @@ package org.hl7.fhir.convertors.conv10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40; +import org.hl7.fhir.dstu2.model.StringType; import org.hl7.fhir.dstu2.utils.ToolingExtensions; import org.hl7.fhir.exceptions.FHIRException; +import org.hl7.fhir.r4.model.MarkdownType; + +import java.util.Collections; public class SearchParameter10_40 { @@ -11,46 +15,40 @@ public class SearchParameter10_40 { return null; org.hl7.fhir.dstu2.model.SearchParameter tgt = new org.hl7.fhir.dstu2.model.SearchParameter(); VersionConvertor_10_40.copyDomainResource(src, tgt); - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_40.convertType(src.getUrlElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_10_40.convertConformanceResourceStatus(src.getStatus())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) { - tgt.setPublisher(src.getPublisher()); - } + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getExperimentalElement())); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_40.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact()) tgt.addContact(convertSearchParameterContactComponent(t)); } - if (src.hasPurpose()) { - tgt.setRequirements(src.getPurpose()); - } - if (src.hasCode()) { - tgt.setCode(src.getCode()); + if (src.hasPurposeElement()) { + tgt.setRequirementsElement((StringType) VersionConvertor_10_40.convertType(src.getPurposeElement())); } + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu2.model.CodeType) VersionConvertor_10_40.convertType(src.getCodeElement())); if (src.hasBase()) { for (org.hl7.fhir.r4.model.CodeType t : src.getBase()) tgt.setBase(t.asStringValue()); } if (src.hasType()) { tgt.setType(VersionConvertor_10_40.convertSearchParamType(src.getType())); } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getDescriptionElement())); if (src.hasExpression()) { org.hl7.fhir.dstu2.utils.ToolingExtensions.setStringExtension(tgt, ToolingExtensions.EXT_EXPRESSION, src.getExpression()); } - if (src.hasXpath()) { - tgt.setXpath(src.getXpath()); - } + if (src.hasXpathElement()) + tgt.setXpathElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getXpathElement())); if (src.hasXpathUsage()) { tgt.setXpathUsage(convertXPathUsageType(src.getXpathUsage())); } @@ -65,44 +63,37 @@ public class SearchParameter10_40 { return null; org.hl7.fhir.r4.model.SearchParameter tgt = new org.hl7.fhir.r4.model.SearchParameter(); VersionConvertor_10_40.copyDomainResource(src, tgt); - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_10_40.convertType(src.getUrlElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_10_40.convertConformanceResourceStatus(src.getStatus())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) { - tgt.setPublisher(src.getPublisher()); - } + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_10_40.convertType(src.getExperimentalElement())); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.r4.model.DateTimeType) VersionConvertor_10_40.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu2.model.SearchParameter.SearchParameterContactComponent t : src.getContact()) tgt.addContact(convertSearchParameterContactComponent(t)); } - if (src.hasRequirements()) { - tgt.setPurpose(src.getRequirements()); - } - if (src.hasCode()) { - tgt.setCode(src.getCode()); - } - if (src.hasBase()) { - tgt.addBase(src.getBase()); + if (src.hasRequirementsElement()) { + tgt.setPurposeElement((MarkdownType) VersionConvertor_10_40.convertType(src.getRequirementsElement())); } + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.r4.model.CodeType) VersionConvertor_10_40.convertType(src.getCodeElement())); + if (src.hasBaseElement()) + tgt.setBase(Collections.singletonList((org.hl7.fhir.r4.model.CodeType) VersionConvertor_10_40.convertType(src.getBaseElement()))); if (src.hasType()) { tgt.setType(VersionConvertor_10_40.convertSearchParamType(src.getType())); } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r4.model.MarkdownType) VersionConvertor_10_40.convertType(src.getDescriptionElement())); tgt.setExpression(ToolingExtensions.readStringExtension(src, ToolingExtensions.EXT_EXPRESSION)); - if (src.hasXpath()) { - tgt.setXpath(src.getXpath()); - } + if (src.hasXpathElement()) + tgt.setXpathElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getXpathElement())); if (src.hasXpathUsage()) { tgt.setXpathUsage(convertXPathUsageType(src.getXpathUsage())); } @@ -117,9 +108,8 @@ public class SearchParameter10_40 { return null; org.hl7.fhir.r4.model.ContactDetail tgt = new org.hl7.fhir.r4.model.ContactDetail(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_40.convertContactPoint(t)); } @@ -131,9 +121,8 @@ public class SearchParameter10_40 { return null; org.hl7.fhir.dstu2.model.SearchParameter.SearchParameterContactComponent tgt = new org.hl7.fhir.dstu2.model.SearchParameter.SearchParameterContactComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.r4.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_40.convertContactPoint(t)); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Slot10_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Slot10_40.java index 947d61764..78271aabb 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Slot10_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Slot10_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Slot10_40 { @@ -18,18 +19,14 @@ public class Slot10_40 { if (src.hasSchedule()) { tgt.setSchedule(VersionConvertor_10_40.convertReference(src.getSchedule())); } - if (src.hasStart()) { - tgt.setStart(src.getStart()); - } - if (src.hasEnd()) { - tgt.setEnd(src.getEnd()); - } - if (src.hasOverbooked()) { - tgt.setOverbooked(src.getOverbooked()); - } - if (src.hasComment()) { - tgt.setComment(src.getComment()); - } + if (src.hasStartElement()) + tgt.setStartElement((org.hl7.fhir.r4.model.InstantType) VersionConvertor_10_40.convertType(src.getStartElement())); + if (src.hasEndElement()) + tgt.setEndElement((org.hl7.fhir.r4.model.InstantType) VersionConvertor_10_40.convertType(src.getEndElement())); + if (src.hasOverbookedElement()) + tgt.setOverbookedElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_10_40.convertType(src.getOverbookedElement())); + if (src.hasCommentElement()) + tgt.setCommentElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getCommentElement())); return tgt; } @@ -47,18 +44,14 @@ public class Slot10_40 { if (src.hasSchedule()) { tgt.setSchedule(VersionConvertor_10_40.convertReference(src.getSchedule())); } - if (src.hasStart()) { - tgt.setStart(src.getStart()); - } - if (src.hasEnd()) { - tgt.setEnd(src.getEnd()); - } - if (src.hasOverbooked()) { - tgt.setOverbooked(src.getOverbooked()); - } - if (src.hasComment()) { - tgt.setComment(src.getComment()); - } + if (src.hasStartElement()) + tgt.setStartElement((org.hl7.fhir.dstu2.model.InstantType) VersionConvertor_10_40.convertType(src.getStartElement())); + if (src.hasEndElement()) + tgt.setEndElement((org.hl7.fhir.dstu2.model.InstantType) VersionConvertor_10_40.convertType(src.getEndElement())); + if (src.hasOverbookedElement()) + tgt.setOverbookedElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getOverbookedElement())); + if (src.hasCommentElement()) + tgt.setCommentElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getCommentElement())); return tgt; } } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/StructureDefinition10_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/StructureDefinition10_40.java index cf3a58a21..009f10def 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/StructureDefinition10_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/StructureDefinition10_40.java @@ -1,13 +1,18 @@ package org.hl7.fhir.convertors.conv10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40; +import org.hl7.fhir.dstu2.model.CodeType; import org.hl7.fhir.exceptions.FHIRException; +import org.hl7.fhir.r4.model.CanonicalType; import org.hl7.fhir.r4.model.ElementDefinition; +import org.hl7.fhir.r4.model.StringType; import org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionKind; import org.hl7.fhir.r4.model.StructureDefinition.TypeDerivationRule; +import org.hl7.fhir.r4.model.UriType; import org.hl7.fhir.utilities.Utilities; import java.util.ArrayList; import java.util.List; +import java.util.Collections; public class StructureDefinition10_40 { @@ -51,37 +56,32 @@ public class StructureDefinition10_40 { return null; org.hl7.fhir.r4.model.StructureDefinition tgt = new org.hl7.fhir.r4.model.StructureDefinition(); VersionConvertor_10_40.copyDomainResource(src, tgt); - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_10_40.convertType(src.getUrlElement())); if (src.hasIdentifier()) { for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_40.convertIdentifier(t)); } - if (src.hasVersion()) { - tgt.setVersion(src.getVersion()); - } - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasDisplay()) { - tgt.setTitle(src.getDisplay()); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement())); + if (src.hasDisplayElement()) { + tgt.setTitleElement((StringType) VersionConvertor_10_40.convertType(src.getDisplayElement())); } if (src.hasStatus()) { tgt.setStatus(VersionConvertor_10_40.convertConformanceResourceStatus(src.getStatus())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasPublisher()) { - tgt.setPublisher(src.getPublisher()); - } + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_10_40.convertType(src.getExperimentalElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu2.model.StructureDefinition.StructureDefinitionContactComponent t : src.getContact()) tgt.addContact(convertStructureDefinitionContactComponent(t)); } - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.r4.model.DateTimeType) VersionConvertor_10_40.convertType(src.getDateElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r4.model.MarkdownType) VersionConvertor_10_40.convertType(src.getDescriptionElement())); for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getUseContext()) if (VersionConvertor_10_40.isJurisdiction(t)) tgt.addJurisdiction(VersionConvertor_10_40.convertCodeableConcept(t)); else @@ -89,9 +89,8 @@ public class StructureDefinition10_40 { if (src.hasRequirements()) { tgt.setPurpose(src.getRequirements()); } - if (src.hasCopyright()) { - tgt.setCopyright(src.getCopyright()); - } + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.r4.model.MarkdownType) VersionConvertor_10_40.convertType(src.getCopyrightElement())); if (src.hasCode()) { for (org.hl7.fhir.dstu2.model.Coding t : src.getCode()) tgt.addKeyword(VersionConvertor_10_40.convertCoding(t)); } @@ -104,9 +103,8 @@ public class StructureDefinition10_40 { if (src.hasKind()) { tgt.setKind(convertStructureDefinitionKind(src.getKind(), tgt.getId())); } - if (src.hasAbstract()) { - tgt.setAbstract(src.getAbstract()); - } + if (src.hasAbstractElement()) + tgt.setAbstractElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_10_40.convertType(src.getAbstractElement())); for (org.hl7.fhir.dstu2.model.StringType t : src.getContext()) { org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionContextComponent ec = tgt.addContext(); if (src.hasContextType()) { @@ -114,16 +112,16 @@ public class StructureDefinition10_40 { } ec.setExpression("*".equals(t.getValue()) ? "Element" : t.getValue()); } - if (src.hasConstrainedType()) - tgt.setType(src.getConstrainedType()); + if (src.hasConstrainedTypeElement()) + tgt.setTypeElement((UriType) VersionConvertor_10_40.convertType(src.getConstrainedTypeElement())); else if (src.getSnapshot().hasElement()) tgt.setType(src.getSnapshot().getElement().get(0).getPath()); else if (src.getDifferential().hasElement() && !src.getDifferential().getElement().get(0).getPath().contains(".")) tgt.setType(src.getDifferential().getElement().get(0).getPath()); else tgt.setType(src.getDifferential().getElement().get(0).getPath().substring(0, src.getDifferential().getElement().get(0).getPath().indexOf("."))); - if (src.hasBase()) { - tgt.setBaseDefinition(src.getBase()); + if (src.hasBaseElement()) { + tgt.setBaseDefinitionElement((CanonicalType) VersionConvertor_10_40.convertType(src.getBaseElement())); } tgt.setDerivation(src.hasConstrainedType() ? org.hl7.fhir.r4.model.StructureDefinition.TypeDerivationRule.CONSTRAINT : org.hl7.fhir.r4.model.StructureDefinition.TypeDerivationRule.SPECIALIZATION); if (src.hasSnapshot()) { @@ -156,37 +154,32 @@ public class StructureDefinition10_40 { return null; org.hl7.fhir.dstu2.model.StructureDefinition tgt = new org.hl7.fhir.dstu2.model.StructureDefinition(); VersionConvertor_10_40.copyDomainResource(src, tgt); - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_40.convertType(src.getUrlElement())); if (src.hasIdentifier()) { for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_40.convertIdentifier(t)); } - if (src.hasVersion()) { - tgt.setVersion(src.getVersion()); - } - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasTitle()) { - tgt.setDisplay(src.getTitle()); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement())); + if (src.hasTitleElement()) { + tgt.setDisplayElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getTitleElement())); } if (src.hasStatus()) { tgt.setStatus(VersionConvertor_10_40.convertConformanceResourceStatus(src.getStatus())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasPublisher()) { - tgt.setPublisher(src.getPublisher()); - } + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getExperimentalElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact()) tgt.addContact(convertStructureDefinitionContactComponent(t)); } - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_40.convertType(src.getDateElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getDescriptionElement())); for (org.hl7.fhir.r4.model.UsageContext t : src.getUseContext()) if (t.hasValueCodeableConcept()) tgt.addUseContext(VersionConvertor_10_40.convertCodeableConcept(t.getValueCodeableConcept())); if (src.hasJurisdiction()) { @@ -195,9 +188,8 @@ public class StructureDefinition10_40 { if (src.hasPurpose()) { tgt.setRequirements(src.getPurpose()); } - if (src.hasCopyright()) { - tgt.setCopyright(src.getCopyright()); - } + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getCopyrightElement())); if (src.hasKeyword()) { for (org.hl7.fhir.r4.model.Coding t : src.getKeyword()) tgt.addCode(VersionConvertor_10_40.convertCoding(t)); } @@ -209,19 +201,18 @@ public class StructureDefinition10_40 { if (src.hasKind()) { tgt.setKind(convertStructureDefinitionKind(src.getKind())); } - if (src.hasAbstract()) { - tgt.setAbstract(src.getAbstract()); - } + if (src.hasAbstractElement()) + tgt.setAbstractElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getAbstractElement())); for (org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionContextComponent t : src.getContext()) { if (!tgt.hasContextType()) tgt.setContextType(convertExtensionContext(t.getType(), t.getExpression())); tgt.addContext("Element".equals(t.getExpression()) ? "*" : t.getExpression()); } - if (src.hasType()) { - tgt.setConstrainedType(src.getType()); + if (src.hasTypeElement()) { + tgt.setConstrainedTypeElement((CodeType) VersionConvertor_10_40.convertType(src.getTypeElement())); } - if (src.hasBaseDefinition()) { - tgt.setBase(src.getBaseDefinition()); + if (src.hasBaseDefinitionElement()) { + tgt.setBaseElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_40.convertType(src.getBaseDefinitionElement())); } if (src.hasSnapshot()) { tgt.setSnapshot(convertStructureDefinitionSnapshotComponent(src.getSnapshot())); @@ -243,9 +234,8 @@ public class StructureDefinition10_40 { return null; org.hl7.fhir.dstu2.model.StructureDefinition.StructureDefinitionContactComponent tgt = new org.hl7.fhir.dstu2.model.StructureDefinition.StructureDefinitionContactComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.r4.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_40.convertContactPoint(t)); } @@ -257,9 +247,8 @@ public class StructureDefinition10_40 { return null; org.hl7.fhir.r4.model.ContactDetail tgt = new org.hl7.fhir.r4.model.ContactDetail(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_40.convertContactPoint(t)); } @@ -333,17 +322,14 @@ public class StructureDefinition10_40 { return null; org.hl7.fhir.dstu2.model.StructureDefinition.StructureDefinitionMappingComponent tgt = new org.hl7.fhir.dstu2.model.StructureDefinition.StructureDefinitionMappingComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasIdentity()) { - tgt.setIdentity(src.getIdentity()); - } - if (src.hasUri()) { - tgt.setUri(src.getUri()); - } - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasComment()) { - tgt.setComments(src.getComment()); + if (src.hasIdentityElement()) + tgt.setIdentityElement((org.hl7.fhir.dstu2.model.IdType) VersionConvertor_10_40.convertType(src.getIdentityElement())); + if (src.hasUriElement()) + tgt.setUriElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_40.convertType(src.getUriElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement())); + if (src.hasCommentElement()) { + tgt.setCommentsElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getCommentElement())); } return tgt; } @@ -353,17 +339,14 @@ public class StructureDefinition10_40 { return null; org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionMappingComponent tgt = new org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionMappingComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasIdentity()) { - tgt.setIdentity(src.getIdentity()); - } - if (src.hasUri()) { - tgt.setUri(src.getUri()); - } - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasComments()) { - tgt.setComment(src.getComments()); + if (src.hasIdentityElement()) + tgt.setIdentityElement((org.hl7.fhir.r4.model.IdType) VersionConvertor_10_40.convertType(src.getIdentityElement())); + if (src.hasUriElement()) + tgt.setUriElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_10_40.convertType(src.getUriElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement())); + if (src.hasCommentsElement()) { + tgt.setCommentElement((StringType) VersionConvertor_10_40.convertType(src.getCommentsElement())); } return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Subscription10_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Subscription10_40.java index 27e4401a0..a739c6e95 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Subscription10_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Subscription10_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Subscription10_40 { @@ -10,27 +11,23 @@ public class Subscription10_40 { return null; org.hl7.fhir.r4.model.Subscription tgt = new org.hl7.fhir.r4.model.Subscription(); VersionConvertor_10_40.copyDomainResource(src, tgt); - if (src.hasCriteria()) { - tgt.setCriteria(src.getCriteria()); - } + if (src.hasCriteriaElement()) + tgt.setCriteriaElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getCriteriaElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getContact()) tgt.addContact(VersionConvertor_10_40.convertContactPoint(t)); } - if (src.hasReason()) { - tgt.setReason(src.getReason()); - } + if (src.hasReasonElement()) + tgt.setReasonElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getReasonElement())); if (src.hasStatus()) { tgt.setStatus(convertSubscriptionStatus(src.getStatus())); } - if (src.hasError()) { - tgt.setError(src.getError()); - } + if (src.hasErrorElement()) + tgt.setErrorElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getErrorElement())); if (src.hasChannel()) { tgt.setChannel(convertSubscriptionChannelComponent(src.getChannel())); } - if (src.hasEnd()) { - tgt.setEnd(src.getEnd()); - } + if (src.hasEndElement()) + tgt.setEndElement((org.hl7.fhir.r4.model.InstantType) VersionConvertor_10_40.convertType(src.getEndElement())); return tgt; } @@ -39,27 +36,23 @@ public class Subscription10_40 { return null; org.hl7.fhir.dstu2.model.Subscription tgt = new org.hl7.fhir.dstu2.model.Subscription(); VersionConvertor_10_40.copyDomainResource(src, tgt); - if (src.hasCriteria()) { - tgt.setCriteria(src.getCriteria()); - } + if (src.hasCriteriaElement()) + tgt.setCriteriaElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getCriteriaElement())); if (src.hasContact()) { for (org.hl7.fhir.r4.model.ContactPoint t : src.getContact()) tgt.addContact(VersionConvertor_10_40.convertContactPoint(t)); } - if (src.hasReason()) { - tgt.setReason(src.getReason()); - } + if (src.hasReasonElement()) + tgt.setReasonElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getReasonElement())); if (src.hasStatus()) { tgt.setStatus(convertSubscriptionStatus(src.getStatus())); } - if (src.hasError()) { - tgt.setError(src.getError()); - } + if (src.hasErrorElement()) + tgt.setErrorElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getErrorElement())); if (src.hasChannel()) { tgt.setChannel(convertSubscriptionChannelComponent(src.getChannel())); } - if (src.hasEnd()) { - tgt.setEnd(src.getEnd()); - } + if (src.hasEndElement()) + tgt.setEndElement((org.hl7.fhir.dstu2.model.InstantType) VersionConvertor_10_40.convertType(src.getEndElement())); return tgt; } @@ -71,15 +64,12 @@ public class Subscription10_40 { if (src.hasType()) { tgt.setType(convertSubscriptionChannelType(src.getType())); } - if (src.hasEndpoint()) { - tgt.setEndpoint(src.getEndpoint()); - } - if (src.hasPayload()) { - tgt.setPayload(src.getPayload()); - } - if (src.hasHeader()) { - tgt.addHeader(src.getHeader()); - } + if (src.hasEndpointElement()) + tgt.setEndpointElement((org.hl7.fhir.r4.model.UrlType) VersionConvertor_10_40.convertType(src.getEndpointElement())); + if (src.hasPayloadElement()) + tgt.setPayloadElement((org.hl7.fhir.r4.model.CodeType) VersionConvertor_10_40.convertType(src.getPayloadElement())); + if (src.hasHeaderElement()) + tgt.setHeader(Collections.singletonList((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getHeaderElement()))); return tgt; } @@ -91,12 +81,10 @@ public class Subscription10_40 { if (src.hasType()) { tgt.setType(convertSubscriptionChannelType(src.getType())); } - if (src.hasEndpoint()) { - tgt.setEndpoint(src.getEndpoint()); - } - if (src.hasPayload()) { - tgt.setPayload(src.getPayload()); - } + if (src.hasEndpointElement()) + tgt.setEndpointElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_40.convertType(src.getEndpointElement())); + if (src.hasPayloadElement()) + tgt.setPayloadElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getPayloadElement())); if (src.hasHeader()) tgt.setHeaderElement(VersionConvertor_10_40.convertString(src.getHeader().get(0))); return tgt; diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Substance10_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Substance10_40.java index 23c9b4e1d..15623f78d 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Substance10_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/Substance10_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Substance10_40 { @@ -19,9 +20,8 @@ public class Substance10_40 { if (src.hasCode()) { tgt.setCode(VersionConvertor_10_40.convertCodeableConcept(src.getCode())); } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getDescriptionElement())); if (src.hasInstance()) { for (org.hl7.fhir.dstu2.model.Substance.SubstanceInstanceComponent t : src.getInstance()) tgt.addInstance(convertSubstanceInstanceComponent(t)); } @@ -45,9 +45,8 @@ public class Substance10_40 { if (src.hasCode()) { tgt.setCode(VersionConvertor_10_40.convertCodeableConcept(src.getCode())); } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getDescriptionElement())); if (src.hasInstance()) { for (org.hl7.fhir.r4.model.Substance.SubstanceInstanceComponent t : src.getInstance()) tgt.addInstance(convertSubstanceInstanceComponent(t)); } @@ -90,9 +89,8 @@ public class Substance10_40 { if (src.hasIdentifier()) { tgt.setIdentifier(VersionConvertor_10_40.convertIdentifier(src.getIdentifier())); } - if (src.hasExpiry()) { - tgt.setExpiry(src.getExpiry()); - } + if (src.hasExpiryElement()) + tgt.setExpiryElement((org.hl7.fhir.r4.model.DateTimeType) VersionConvertor_10_40.convertType(src.getExpiryElement())); if (src.hasQuantity()) { tgt.setQuantity(VersionConvertor_10_40.convertSimpleQuantity(src.getQuantity())); } @@ -107,9 +105,8 @@ public class Substance10_40 { if (src.hasIdentifier()) { tgt.setIdentifier(VersionConvertor_10_40.convertIdentifier(src.getIdentifier())); } - if (src.hasExpiry()) { - tgt.setExpiry(src.getExpiry()); - } + if (src.hasExpiryElement()) + tgt.setExpiryElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_40.convertType(src.getExpiryElement())); if (src.hasQuantity()) { tgt.setQuantity(VersionConvertor_10_40.convertSimpleQuantity(src.getQuantity())); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/SupplyDelivery10_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/SupplyDelivery10_40.java index 5bc364e02..b47553583 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/SupplyDelivery10_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/SupplyDelivery10_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class SupplyDelivery10_40 { diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/SupplyRequest10_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/SupplyRequest10_40.java index 10d2cead5..9c4d7ba2a 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/SupplyRequest10_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/SupplyRequest10_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class SupplyRequest10_40 { diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/TestScript10_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/TestScript10_40.java index 016926092..82b25c7f3 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/TestScript10_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/TestScript10_40.java @@ -1,7 +1,12 @@ package org.hl7.fhir.convertors.conv10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40; +import org.hl7.fhir.dstu2.model.IdType; +import org.hl7.fhir.dstu2.model.StringType; import org.hl7.fhir.exceptions.FHIRException; +import org.hl7.fhir.r4.model.MarkdownType; + +import java.util.Collections; public class TestScript10_40 { @@ -183,60 +188,46 @@ public class TestScript10_40 { return null; org.hl7.fhir.dstu2.model.TestScript.TestScriptSetupActionAssertComponent tgt = new org.hl7.fhir.dstu2.model.TestScript.TestScriptSetupActionAssertComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasLabel()) { - tgt.setLabel(src.getLabel()); - } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasLabelElement()) + tgt.setLabelElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getLabelElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getDescriptionElement())); if (src.hasDirection()) { tgt.setDirection(convertAssertionDirectionType(src.getDirection())); } - if (src.hasCompareToSourceId()) { - tgt.setCompareToSourceId(src.getCompareToSourceId()); - } - if (src.hasCompareToSourcePath()) { - tgt.setCompareToSourcePath(src.getCompareToSourcePath()); - } - if (src.hasContentType()) { - tgt.setContentType(convertContentType(src.getContentType())); - } - if (src.hasHeaderField()) { - tgt.setHeaderField(src.getHeaderField()); - } - if (src.hasMinimumId()) { - tgt.setMinimumId(src.getMinimumId()); - } - if (src.hasNavigationLinks()) { - tgt.setNavigationLinks(src.getNavigationLinks()); - } + if (src.hasCompareToSourceIdElement()) + tgt.setCompareToSourceIdElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getCompareToSourceIdElement())); + if (src.hasCompareToSourcePathElement()) + tgt.setCompareToSourcePathElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getCompareToSourcePathElement())); + if (src.hasContentType()) { + tgt.setContentType(convertContentType(src.getContentType())); + } + if (src.hasHeaderFieldElement()) + tgt.setHeaderFieldElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getHeaderFieldElement())); + if (src.hasMinimumIdElement()) + tgt.setMinimumIdElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getMinimumIdElement())); + if (src.hasNavigationLinksElement()) + tgt.setNavigationLinksElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getNavigationLinksElement())); if (src.hasOperator()) { tgt.setOperator(convertAssertionOperatorType(src.getOperator())); } - if (src.hasPath()) { - tgt.setPath(src.getPath()); - } - if (src.hasResource()) { - tgt.setResource(src.getResource()); - } + if (src.hasPathElement()) + tgt.setPathElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getPathElement())); + if (src.hasResourceElement()) + tgt.setResourceElement((org.hl7.fhir.dstu2.model.CodeType) VersionConvertor_10_40.convertType(src.getResourceElement())); if (src.hasResponse()) { tgt.setResponse(convertAssertionResponseTypes(src.getResponse())); } - if (src.hasResponseCode()) { - tgt.setResponseCode(src.getResponseCode()); - } - if (src.hasSourceId()) { - tgt.setSourceId(src.getSourceId()); - } - if (src.hasValidateProfileId()) { - tgt.setValidateProfileId(src.getValidateProfileId()); - } - if (src.hasValue()) { - tgt.setValue(src.getValue()); - } - if (src.hasWarningOnly()) { - tgt.setWarningOnly(src.getWarningOnly()); - } + if (src.hasResponseCodeElement()) + tgt.setResponseCodeElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getResponseCodeElement())); + if (src.hasSourceIdElement()) + tgt.setSourceIdElement((org.hl7.fhir.dstu2.model.IdType) VersionConvertor_10_40.convertType(src.getSourceIdElement())); + if (src.hasValidateProfileIdElement()) + tgt.setValidateProfileIdElement((org.hl7.fhir.dstu2.model.IdType) VersionConvertor_10_40.convertType(src.getValidateProfileIdElement())); + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getValueElement())); + if (src.hasWarningOnlyElement()) + tgt.setWarningOnlyElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getWarningOnlyElement())); return tgt; } @@ -245,60 +236,46 @@ public class TestScript10_40 { return null; org.hl7.fhir.r4.model.TestScript.SetupActionAssertComponent tgt = new org.hl7.fhir.r4.model.TestScript.SetupActionAssertComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasLabel()) { - tgt.setLabel(src.getLabel()); - } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasLabelElement()) + tgt.setLabelElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getLabelElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getDescriptionElement())); if (src.hasDirection()) { tgt.setDirection(convertAssertionDirectionType(src.getDirection())); } - if (src.hasCompareToSourceId()) { - tgt.setCompareToSourceId(src.getCompareToSourceId()); - } - if (src.hasCompareToSourcePath()) { - tgt.setCompareToSourcePath(src.getCompareToSourcePath()); - } - if (src.hasContentType()) { - tgt.setContentType(convertContentType(src.getContentType())); - } - if (src.hasHeaderField()) { - tgt.setHeaderField(src.getHeaderField()); - } - if (src.hasMinimumId()) { - tgt.setMinimumId(src.getMinimumId()); - } - if (src.hasNavigationLinks()) { - tgt.setNavigationLinks(src.getNavigationLinks()); - } + if (src.hasCompareToSourceIdElement()) + tgt.setCompareToSourceIdElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getCompareToSourceIdElement())); + if (src.hasCompareToSourcePathElement()) + tgt.setCompareToSourcePathElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getCompareToSourcePathElement())); + if (src.hasContentType()) { + tgt.setContentType(convertContentType(src.getContentType())); + } + if (src.hasHeaderFieldElement()) + tgt.setHeaderFieldElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getHeaderFieldElement())); + if (src.hasMinimumIdElement()) + tgt.setMinimumIdElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getMinimumIdElement())); + if (src.hasNavigationLinksElement()) + tgt.setNavigationLinksElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_10_40.convertType(src.getNavigationLinksElement())); if (src.hasOperator()) { tgt.setOperator(convertAssertionOperatorType(src.getOperator())); } - if (src.hasPath()) { - tgt.setPath(src.getPath()); - } - if (src.hasResource()) { - tgt.setResource(src.getResource()); - } + if (src.hasPathElement()) + tgt.setPathElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getPathElement())); + if (src.hasResourceElement()) + tgt.setResourceElement((org.hl7.fhir.r4.model.CodeType) VersionConvertor_10_40.convertType(src.getResourceElement())); if (src.hasResponse()) { tgt.setResponse(convertAssertionResponseTypes(src.getResponse())); } - if (src.hasResponseCode()) { - tgt.setResponseCode(src.getResponseCode()); - } - if (src.hasSourceId()) { - tgt.setSourceId(src.getSourceId()); - } - if (src.hasValidateProfileId()) { - tgt.setValidateProfileId(src.getValidateProfileId()); - } - if (src.hasValue()) { - tgt.setValue(src.getValue()); - } - if (src.hasWarningOnly()) { - tgt.setWarningOnly(src.getWarningOnly()); - } + if (src.hasResponseCodeElement()) + tgt.setResponseCodeElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getResponseCodeElement())); + if (src.hasSourceIdElement()) + tgt.setSourceIdElement((org.hl7.fhir.r4.model.IdType) VersionConvertor_10_40.convertType(src.getSourceIdElement())); + if (src.hasValidateProfileIdElement()) + tgt.setValidateProfileIdElement((org.hl7.fhir.r4.model.IdType) VersionConvertor_10_40.convertType(src.getValidateProfileIdElement())); + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getValueElement())); + if (src.hasWarningOnlyElement()) + tgt.setWarningOnlyElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_10_40.convertType(src.getWarningOnlyElement())); return tgt; } @@ -338,45 +315,36 @@ public class TestScript10_40 { if (src.hasType()) { tgt.setType(VersionConvertor_10_40.convertCoding(src.getType())); } - if (src.hasResource()) { - tgt.setResource(src.getResource()); - } - if (src.hasLabel()) { - tgt.setLabel(src.getLabel()); - } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } - if (src.hasAccept()) { - tgt.setAccept(convertContentType(src.getAccept())); - } - if (src.hasContentType()) { - tgt.setContentType(convertContentType(src.getContentType())); - } - if (src.hasDestination()) { - tgt.setDestination(src.getDestination()); - } - if (src.hasEncodeRequestUrl()) { - tgt.setEncodeRequestUrl(src.getEncodeRequestUrl()); - } - if (src.hasParams()) { - tgt.setParams(src.getParams()); - } + if (src.hasResourceElement()) + tgt.setResourceElement((org.hl7.fhir.dstu2.model.CodeType) VersionConvertor_10_40.convertType(src.getResourceElement())); + if (src.hasLabelElement()) + tgt.setLabelElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getLabelElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getDescriptionElement())); + if (src.hasAccept()) { + tgt.setAccept(convertContentType(src.getAccept())); + } + if (src.hasContentType()) { + tgt.setContentType(convertContentType(src.getContentType())); + } + if (src.hasDestinationElement()) + tgt.setDestinationElement((org.hl7.fhir.dstu2.model.IntegerType) VersionConvertor_10_40.convertType(src.getDestinationElement())); + if (src.hasEncodeRequestUrlElement()) + tgt.setEncodeRequestUrlElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getEncodeRequestUrlElement())); + if (src.hasParamsElement()) + tgt.setParamsElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getParamsElement())); if (src.hasRequestHeader()) { for (org.hl7.fhir.r4.model.TestScript.SetupActionOperationRequestHeaderComponent t : src.getRequestHeader()) tgt.addRequestHeader(convertSetupActionOperationRequestHeaderComponent(t)); } - if (src.hasResponseId()) { - tgt.setResponseId(src.getResponseId()); - } - if (src.hasSourceId()) { - tgt.setSourceId(src.getSourceId()); - } - if (src.hasTargetId()) { - tgt.setTargetId(src.getTargetId()); - } - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); + if (src.hasResponseIdElement()) + tgt.setResponseIdElement((org.hl7.fhir.dstu2.model.IdType) VersionConvertor_10_40.convertType(src.getResponseIdElement())); + if (src.hasSourceIdElement()) + tgt.setSourceIdElement((org.hl7.fhir.dstu2.model.IdType) VersionConvertor_10_40.convertType(src.getSourceIdElement())); + if (src.hasTargetIdElement()) { + tgt.setTargetIdElement((IdType) VersionConvertor_10_40.convertType(src.getTargetIdElement())); } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getUrlElement())); return tgt; } @@ -388,45 +356,36 @@ public class TestScript10_40 { if (src.hasType()) { tgt.setType(VersionConvertor_10_40.convertCoding(src.getType())); } - if (src.hasResource()) { - tgt.setResource(src.getResource()); - } - if (src.hasLabel()) { - tgt.setLabel(src.getLabel()); - } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } - if (src.hasAccept()) { - tgt.setAccept(convertContentType(src.getAccept())); - } - if (src.hasContentType()) { - tgt.setContentType(convertContentType(src.getContentType())); - } - if (src.hasDestination()) { - tgt.setDestination(src.getDestination()); - } - if (src.hasEncodeRequestUrl()) { - tgt.setEncodeRequestUrl(src.getEncodeRequestUrl()); - } - if (src.hasParams()) { - tgt.setParams(src.getParams()); - } + if (src.hasResourceElement()) + tgt.setResourceElement((org.hl7.fhir.r4.model.CodeType) VersionConvertor_10_40.convertType(src.getResourceElement())); + if (src.hasLabelElement()) + tgt.setLabelElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getLabelElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getDescriptionElement())); + if (src.hasAccept()) { + tgt.setAccept(convertContentType(src.getAccept())); + } + if (src.hasContentType()) { + tgt.setContentType(convertContentType(src.getContentType())); + } + if (src.hasDestinationElement()) + tgt.setDestinationElement((org.hl7.fhir.r4.model.IntegerType) VersionConvertor_10_40.convertType(src.getDestinationElement())); + if (src.hasEncodeRequestUrlElement()) + tgt.setEncodeRequestUrlElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_10_40.convertType(src.getEncodeRequestUrlElement())); + if (src.hasParamsElement()) + tgt.setParamsElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getParamsElement())); if (src.hasRequestHeader()) { for (org.hl7.fhir.dstu2.model.TestScript.TestScriptSetupActionOperationRequestHeaderComponent t : src.getRequestHeader()) tgt.addRequestHeader(convertSetupActionOperationRequestHeaderComponent(t)); } - if (src.hasResponseId()) { - tgt.setResponseId(src.getResponseId()); - } - if (src.hasSourceId()) { - tgt.setSourceId(src.getSourceId()); - } - if (src.hasTargetId()) { - tgt.setTargetId(src.getTargetId()); - } - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); + if (src.hasResponseIdElement()) + tgt.setResponseIdElement((org.hl7.fhir.r4.model.IdType) VersionConvertor_10_40.convertType(src.getResponseIdElement())); + if (src.hasSourceIdElement()) + tgt.setSourceIdElement((org.hl7.fhir.r4.model.IdType) VersionConvertor_10_40.convertType(src.getSourceIdElement())); + if (src.hasTargetIdElement()) { + tgt.setTargetIdElement((org.hl7.fhir.r4.model.IdType) VersionConvertor_10_40.convertType(src.getTargetIdElement())); } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getUrlElement())); return tgt; } @@ -435,12 +394,10 @@ public class TestScript10_40 { return null; org.hl7.fhir.r4.model.TestScript.SetupActionOperationRequestHeaderComponent tgt = new org.hl7.fhir.r4.model.TestScript.SetupActionOperationRequestHeaderComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasField()) { - tgt.setField(src.getField()); - } - if (src.hasValue()) { - tgt.setValue(src.getValue()); - } + if (src.hasFieldElement()) + tgt.setFieldElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getFieldElement())); + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getValueElement())); return tgt; } @@ -449,12 +406,10 @@ public class TestScript10_40 { return null; org.hl7.fhir.dstu2.model.TestScript.TestScriptSetupActionOperationRequestHeaderComponent tgt = new org.hl7.fhir.dstu2.model.TestScript.TestScriptSetupActionOperationRequestHeaderComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasField()) { - tgt.setField(src.getField()); - } - if (src.hasValue()) { - tgt.setValue(src.getValue()); - } + if (src.hasFieldElement()) + tgt.setFieldElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getFieldElement())); + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getValueElement())); return tgt; } @@ -513,45 +468,39 @@ public class TestScript10_40 { return null; org.hl7.fhir.dstu2.model.TestScript tgt = new org.hl7.fhir.dstu2.model.TestScript(); VersionConvertor_10_40.copyDomainResource(src, tgt); - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } - if (src.hasVersion()) { - tgt.setVersion(src.getVersion()); - } - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_40.convertType(src.getUrlElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_10_40.convertConformanceResourceStatus(src.getStatus())); } if (src.hasIdentifier()) { tgt.setIdentifier(VersionConvertor_10_40.convertIdentifier(src.getIdentifier())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasPublisher()) { - tgt.setPublisher(src.getPublisher()); - } + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getExperimentalElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact()) tgt.addContact(convertTestScriptContactComponent(t)); } - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_40.convertType(src.getDateElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getDescriptionElement())); for (org.hl7.fhir.r4.model.UsageContext t : src.getUseContext()) if (t.hasValueCodeableConcept()) tgt.addUseContext(VersionConvertor_10_40.convertCodeableConcept(t.getValueCodeableConcept())); if (src.hasJurisdiction()) { for (org.hl7.fhir.r4.model.CodeableConcept t : src.getJurisdiction()) tgt.addUseContext(VersionConvertor_10_40.convertCodeableConcept(t)); } - if (src.hasPurpose()) { - tgt.setRequirements(src.getPurpose()); - } - if (src.hasCopyright()) { - tgt.setCopyright(src.getCopyright()); + if (src.hasPurposeElement()) { + tgt.setRequirementsElement((StringType) VersionConvertor_10_40.convertType(src.getPurposeElement())); } + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getCopyrightElement())); if (src.hasMetadata()) { tgt.setMetadata(convertTestScriptMetadataComponent(src.getMetadata())); } @@ -581,44 +530,38 @@ public class TestScript10_40 { return null; org.hl7.fhir.r4.model.TestScript tgt = new org.hl7.fhir.r4.model.TestScript(); VersionConvertor_10_40.copyDomainResource(src, tgt); - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } - if (src.hasVersion()) { - tgt.setVersion(src.getVersion()); - } - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_10_40.convertType(src.getUrlElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_10_40.convertConformanceResourceStatus(src.getStatus())); } if (src.hasIdentifier()) { tgt.setIdentifier(VersionConvertor_10_40.convertIdentifier(src.getIdentifier())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasPublisher()) { - tgt.setPublisher(src.getPublisher()); - } + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_10_40.convertType(src.getExperimentalElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu2.model.TestScript.TestScriptContactComponent t : src.getContact()) tgt.addContact(convertTestScriptContactComponent(t)); } - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.r4.model.DateTimeType) VersionConvertor_10_40.convertType(src.getDateElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r4.model.MarkdownType) VersionConvertor_10_40.convertType(src.getDescriptionElement())); for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getUseContext()) if (VersionConvertor_10_40.isJurisdiction(t)) tgt.addJurisdiction(VersionConvertor_10_40.convertCodeableConcept(t)); else tgt.addUseContext(VersionConvertor_10_40.convertCodeableConceptToUsageContext(t)); - if (src.hasRequirements()) { - tgt.setPurpose(src.getRequirements()); - } - if (src.hasCopyright()) { - tgt.setCopyright(src.getCopyright()); + if (src.hasRequirementsElement()) { + tgt.setPurposeElement((MarkdownType) VersionConvertor_10_40.convertType(src.getRequirementsElement())); } + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.r4.model.MarkdownType) VersionConvertor_10_40.convertType(src.getCopyrightElement())); if (src.hasMetadata()) { tgt.setMetadata(convertTestScriptMetadataComponent(src.getMetadata())); } @@ -648,9 +591,8 @@ public class TestScript10_40 { return null; org.hl7.fhir.dstu2.model.TestScript.TestScriptContactComponent tgt = new org.hl7.fhir.dstu2.model.TestScript.TestScriptContactComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.r4.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_40.convertContactPoint(t)); } @@ -662,9 +604,8 @@ public class TestScript10_40 { return null; org.hl7.fhir.r4.model.ContactDetail tgt = new org.hl7.fhir.r4.model.ContactDetail(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_40.convertContactPoint(t)); } @@ -676,12 +617,10 @@ public class TestScript10_40 { return null; org.hl7.fhir.r4.model.TestScript.TestScriptFixtureComponent tgt = new org.hl7.fhir.r4.model.TestScript.TestScriptFixtureComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasAutocreate()) { - tgt.setAutocreate(src.getAutocreate()); - } - if (src.hasAutodelete()) { - tgt.setAutodelete(src.getAutodelete()); - } + if (src.hasAutocreateElement()) + tgt.setAutocreateElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_10_40.convertType(src.getAutocreateElement())); + if (src.hasAutodeleteElement()) + tgt.setAutodeleteElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_10_40.convertType(src.getAutodeleteElement())); if (src.hasResource()) { tgt.setResource(VersionConvertor_10_40.convertReference(src.getResource())); } @@ -693,12 +632,10 @@ public class TestScript10_40 { return null; org.hl7.fhir.dstu2.model.TestScript.TestScriptFixtureComponent tgt = new org.hl7.fhir.dstu2.model.TestScript.TestScriptFixtureComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasAutocreate()) { - tgt.setAutocreate(src.getAutocreate()); - } - if (src.hasAutodelete()) { - tgt.setAutodelete(src.getAutodelete()); - } + if (src.hasAutocreateElement()) + tgt.setAutocreateElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getAutocreateElement())); + if (src.hasAutodeleteElement()) + tgt.setAutodeleteElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getAutodeleteElement())); if (src.hasResource()) { tgt.setResource(VersionConvertor_10_40.convertReference(src.getResource())); } @@ -710,18 +647,14 @@ public class TestScript10_40 { return null; org.hl7.fhir.dstu2.model.TestScript.TestScriptMetadataCapabilityComponent tgt = new org.hl7.fhir.dstu2.model.TestScript.TestScriptMetadataCapabilityComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasRequired()) { - tgt.setRequired(src.getRequired()); - } - if (src.hasValidated()) { - tgt.setValidated(src.getValidated()); - } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } - if (src.hasDestination()) { - tgt.setDestination(src.getDestination()); - } + if (src.hasRequiredElement()) + tgt.setRequiredElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getRequiredElement())); + if (src.hasValidatedElement()) + tgt.setValidatedElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getValidatedElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getDescriptionElement())); + if (src.hasDestinationElement()) + tgt.setDestinationElement((org.hl7.fhir.dstu2.model.IntegerType) VersionConvertor_10_40.convertType(src.getDestinationElement())); if (src.hasLink()) { for (org.hl7.fhir.r4.model.UriType t : src.getLink()) tgt.addLink(t.getValue()); } @@ -736,18 +669,14 @@ public class TestScript10_40 { return null; org.hl7.fhir.r4.model.TestScript.TestScriptMetadataCapabilityComponent tgt = new org.hl7.fhir.r4.model.TestScript.TestScriptMetadataCapabilityComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasRequired()) { - tgt.setRequired(src.getRequired()); - } - if (src.hasValidated()) { - tgt.setValidated(src.getValidated()); - } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } - if (src.hasDestination()) { - tgt.setDestination(src.getDestination()); - } + if (src.hasRequiredElement()) + tgt.setRequiredElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_10_40.convertType(src.getRequiredElement())); + if (src.hasValidatedElement()) + tgt.setValidatedElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_10_40.convertType(src.getValidatedElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getDescriptionElement())); + if (src.hasDestinationElement()) + tgt.setDestinationElement((org.hl7.fhir.r4.model.IntegerType) VersionConvertor_10_40.convertType(src.getDestinationElement())); if (src.hasLink()) { for (org.hl7.fhir.dstu2.model.UriType t : src.getLink()) tgt.addLink(t.getValue()); } @@ -790,12 +719,10 @@ public class TestScript10_40 { return null; org.hl7.fhir.r4.model.TestScript.TestScriptMetadataLinkComponent tgt = new org.hl7.fhir.r4.model.TestScript.TestScriptMetadataLinkComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_10_40.convertType(src.getUrlElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getDescriptionElement())); return tgt; } @@ -804,12 +731,10 @@ public class TestScript10_40 { return null; org.hl7.fhir.dstu2.model.TestScript.TestScriptMetadataLinkComponent tgt = new org.hl7.fhir.dstu2.model.TestScript.TestScriptMetadataLinkComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_40.convertType(src.getUrlElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getDescriptionElement())); return tgt; } @@ -862,12 +787,10 @@ public class TestScript10_40 { return null; org.hl7.fhir.r4.model.TestScript.TestScriptTestComponent tgt = new org.hl7.fhir.r4.model.TestScript.TestScriptTestComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getDescriptionElement())); if (src.hasAction()) { for (org.hl7.fhir.dstu2.model.TestScript.TestScriptTestActionComponent t : src.getAction()) tgt.addAction(convertTestActionComponent(t)); } @@ -879,12 +802,10 @@ public class TestScript10_40 { return null; org.hl7.fhir.dstu2.model.TestScript.TestScriptTestComponent tgt = new org.hl7.fhir.dstu2.model.TestScript.TestScriptTestComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getDescriptionElement())); if (src.hasAction()) { for (org.hl7.fhir.r4.model.TestScript.TestActionComponent t : src.getAction()) tgt.addAction(convertTestActionComponent(t)); } @@ -896,18 +817,14 @@ public class TestScript10_40 { return null; org.hl7.fhir.dstu2.model.TestScript.TestScriptVariableComponent tgt = new org.hl7.fhir.dstu2.model.TestScript.TestScriptVariableComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasHeaderField()) { - tgt.setHeaderField(src.getHeaderField()); - } - if (src.hasPath()) { - tgt.setPath(src.getPath()); - } - if (src.hasSourceId()) { - tgt.setSourceId(src.getSourceId()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement())); + if (src.hasHeaderFieldElement()) + tgt.setHeaderFieldElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getHeaderFieldElement())); + if (src.hasPathElement()) + tgt.setPathElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getPathElement())); + if (src.hasSourceIdElement()) + tgt.setSourceIdElement((org.hl7.fhir.dstu2.model.IdType) VersionConvertor_10_40.convertType(src.getSourceIdElement())); return tgt; } @@ -916,18 +833,14 @@ public class TestScript10_40 { return null; org.hl7.fhir.r4.model.TestScript.TestScriptVariableComponent tgt = new org.hl7.fhir.r4.model.TestScript.TestScriptVariableComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasHeaderField()) { - tgt.setHeaderField(src.getHeaderField()); - } - if (src.hasPath()) { - tgt.setPath(src.getPath()); - } - if (src.hasSourceId()) { - tgt.setSourceId(src.getSourceId()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement())); + if (src.hasHeaderFieldElement()) + tgt.setHeaderFieldElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getHeaderFieldElement())); + if (src.hasPathElement()) + tgt.setPathElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getPathElement())); + if (src.hasSourceIdElement()) + tgt.setSourceIdElement((org.hl7.fhir.r4.model.IdType) VersionConvertor_10_40.convertType(src.getSourceIdElement())); return tgt; } } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/ValueSet10_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/ValueSet10_40.java index dd7a231cf..4618f4956 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/ValueSet10_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/ValueSet10_40.java @@ -3,12 +3,12 @@ package org.hl7.fhir.convertors.conv10_40; import org.hl7.fhir.convertors.VersionConvertorAdvisor40; import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.exceptions.FHIRException; -import org.hl7.fhir.r4.model.BooleanType; -import org.hl7.fhir.r4.model.CodeSystem; +import org.hl7.fhir.r4.model.*; import org.hl7.fhir.r4.model.CodeSystem.CodeSystemContentMode; import org.hl7.fhir.r4.model.CodeSystem.ConceptDefinitionComponent; import org.hl7.fhir.r4.terminologies.CodeSystemUtilities; import java.util.List; +import java.util.Collections; public class ValueSet10_40 { @@ -17,12 +17,10 @@ public class ValueSet10_40 { return null; org.hl7.fhir.r4.model.ValueSet.ConceptReferenceComponent tgt = new org.hl7.fhir.r4.model.ValueSet.ConceptReferenceComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasCode()) { - tgt.setCode(src.getCode()); - } - if (src.hasDisplay()) { - tgt.setDisplay(src.getDisplay()); - } + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.r4.model.CodeType) VersionConvertor_10_40.convertType(src.getCodeElement())); + if (src.hasDisplayElement()) + tgt.setDisplayElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getDisplayElement())); if (src.hasDesignation()) { for (org.hl7.fhir.dstu2.model.ValueSet.ConceptDefinitionDesignationComponent t : src.getDesignation()) tgt.addDesignation(convertConceptReferenceDesignationComponent(t)); } @@ -34,12 +32,10 @@ public class ValueSet10_40 { return null; org.hl7.fhir.dstu2.model.ValueSet.ConceptReferenceComponent tgt = new org.hl7.fhir.dstu2.model.ValueSet.ConceptReferenceComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasCode()) { - tgt.setCode(src.getCode()); - } - if (src.hasDisplay()) { - tgt.setDisplay(src.getDisplay()); - } + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu2.model.CodeType) VersionConvertor_10_40.convertType(src.getCodeElement())); + if (src.hasDisplayElement()) + tgt.setDisplayElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getDisplayElement())); if (src.hasDesignation()) { for (org.hl7.fhir.r4.model.ValueSet.ConceptReferenceDesignationComponent t : src.getDesignation()) tgt.addDesignation(convertConceptReferenceDesignationComponent(t)); } @@ -51,15 +47,13 @@ public class ValueSet10_40 { return null; org.hl7.fhir.r4.model.ValueSet.ConceptReferenceDesignationComponent tgt = new org.hl7.fhir.r4.model.ValueSet.ConceptReferenceDesignationComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasLanguage()) { - tgt.setLanguage(src.getLanguage()); - } + if (src.hasLanguageElement()) + tgt.setLanguageElement((org.hl7.fhir.r4.model.CodeType) VersionConvertor_10_40.convertType(src.getLanguageElement())); if (src.hasUse()) { tgt.setUse(VersionConvertor_10_40.convertCoding(src.getUse())); } - if (src.hasValue()) { - tgt.setValue(src.getValue()); - } + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getValueElement())); return tgt; } @@ -68,15 +62,13 @@ public class ValueSet10_40 { return null; org.hl7.fhir.dstu2.model.ValueSet.ConceptDefinitionDesignationComponent tgt = new org.hl7.fhir.dstu2.model.ValueSet.ConceptDefinitionDesignationComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasLanguage()) { - tgt.setLanguage(src.getLanguage()); - } + if (src.hasLanguageElement()) + tgt.setLanguageElement((org.hl7.fhir.dstu2.model.CodeType) VersionConvertor_10_40.convertType(src.getLanguageElement())); if (src.hasUse()) { tgt.setUse(VersionConvertor_10_40.convertCoding(src.getUse())); } - if (src.hasValue()) { - tgt.setValue(src.getValue()); - } + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getValueElement())); return tgt; } @@ -85,12 +77,10 @@ public class ValueSet10_40 { return null; org.hl7.fhir.r4.model.ValueSet.ConceptSetComponent tgt = new org.hl7.fhir.r4.model.ValueSet.ConceptSetComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasSystem()) { - tgt.setSystem(src.getSystem()); - } - if (src.hasVersion()) { - tgt.setVersion(src.getVersion()); - } + if (src.hasSystemElement()) + tgt.setSystemElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_10_40.convertType(src.getSystemElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getVersionElement())); if (src.hasConcept()) { for (org.hl7.fhir.dstu2.model.ValueSet.ConceptReferenceComponent t : src.getConcept()) tgt.addConcept(convertConceptReferenceComponent(t)); } @@ -105,12 +95,10 @@ public class ValueSet10_40 { return null; org.hl7.fhir.dstu2.model.ValueSet.ConceptSetComponent tgt = new org.hl7.fhir.dstu2.model.ValueSet.ConceptSetComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasSystem()) { - tgt.setSystem(src.getSystem()); - } - if (src.hasVersion()) { - tgt.setVersion(src.getVersion()); - } + if (src.hasSystemElement()) + tgt.setSystemElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_40.convertType(src.getSystemElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getVersionElement())); if (src.hasConcept()) { for (org.hl7.fhir.r4.model.ValueSet.ConceptReferenceComponent t : src.getConcept()) tgt.addConcept(convertConceptReferenceComponent(t)); } @@ -125,15 +113,13 @@ public class ValueSet10_40 { return null; org.hl7.fhir.dstu2.model.ValueSet.ConceptSetFilterComponent tgt = new org.hl7.fhir.dstu2.model.ValueSet.ConceptSetFilterComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasProperty()) { - tgt.setProperty(src.getProperty()); - } + if (src.hasPropertyElement()) + tgt.setPropertyElement((org.hl7.fhir.dstu2.model.CodeType) VersionConvertor_10_40.convertType(src.getPropertyElement())); if (src.hasOp()) { tgt.setOp(convertFilterOperator(src.getOp())); } - if (src.hasValue()) { - tgt.setValue(src.getValue()); - } + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.dstu2.model.CodeType) VersionConvertor_10_40.convertType(src.getValueElement())); return tgt; } @@ -142,15 +128,13 @@ public class ValueSet10_40 { return null; org.hl7.fhir.r4.model.ValueSet.ConceptSetFilterComponent tgt = new org.hl7.fhir.r4.model.ValueSet.ConceptSetFilterComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasProperty()) { - tgt.setProperty(src.getProperty()); - } + if (src.hasPropertyElement()) + tgt.setPropertyElement((org.hl7.fhir.r4.model.CodeType) VersionConvertor_10_40.convertType(src.getPropertyElement())); if (src.hasOp()) { tgt.setOp(convertFilterOperator(src.getOp())); } - if (src.hasValue()) { - tgt.setValue(src.getValue()); - } + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getValueElement())); return tgt; } @@ -205,55 +189,48 @@ public class ValueSet10_40 { return null; org.hl7.fhir.r4.model.ValueSet tgt = new org.hl7.fhir.r4.model.ValueSet(); VersionConvertor_10_40.copyDomainResource(src, tgt); - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_10_40.convertType(src.getUrlElement())); if (src.hasIdentifier()) { tgt.addIdentifier(VersionConvertor_10_40.convertIdentifier(src.getIdentifier())); } - if (src.hasVersion()) { - tgt.setVersion(src.getVersion()); - } - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_10_40.convertConformanceResourceStatus(src.getStatus())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasPublisher()) { - tgt.setPublisher(src.getPublisher()); - } + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_10_40.convertType(src.getExperimentalElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu2.model.ValueSet.ValueSetContactComponent t : src.getContact()) tgt.addContact(convertValueSetContactComponent(t)); } - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.r4.model.DateTimeType) VersionConvertor_10_40.convertType(src.getDateElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r4.model.MarkdownType) VersionConvertor_10_40.convertType(src.getDescriptionElement())); for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getUseContext()) if (VersionConvertor_10_40.isJurisdiction(t)) tgt.addJurisdiction(VersionConvertor_10_40.convertCodeableConcept(t)); else tgt.addUseContext(VersionConvertor_10_40.convertCodeableConceptToUsageContext(t)); - if (src.hasImmutable()) { - tgt.setImmutable(src.getImmutable()); - } + if (src.hasImmutableElement()) + tgt.setImmutableElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_10_40.convertType(src.getImmutableElement())); if (src.hasRequirements()) { tgt.setPurpose(src.getRequirements()); } - if (src.hasCopyright()) { - tgt.setCopyright(src.getCopyright()); - } + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.r4.model.MarkdownType) VersionConvertor_10_40.convertType(src.getCopyrightElement())); if (src.hasExtensible()) tgt.addExtension("http://hl7.org/fhir/StructureDefinition/valueset-extensible", new BooleanType(src.getExtensible())); if (src.hasCompose()) { if (src.hasCompose()) { tgt.setCompose(convertValueSetComposeComponent(src.getCompose())); } - if (src.hasLockedDate()) { - tgt.getCompose().setLockedDate(src.getLockedDate()); + if (src.hasLockedDateElement()) { + tgt.getCompose().setLockedDateElement((DateType) VersionConvertor_10_40.convertType(src.getLockedDateElement())); } } if (src.hasCodeSystem() && advisor != null) { @@ -274,18 +251,18 @@ public class ValueSet10_40 { if (src.hasStatus()) { tgtcs.setStatus(VersionConvertor_10_40.convertConformanceResourceStatus(src.getStatus())); } - if (src.hasExperimental()) - tgtcs.setExperimental(src.getExperimental()); - if (src.hasPublisher()) { - tgtcs.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgtcs.setExperimentalElement((BooleanType) VersionConvertor_10_40.convertType(src.getExperimentalElement())); + if (src.hasPublisherElement()) { + tgtcs.setPublisherElement((StringType) VersionConvertor_10_40.convertType(src.getPublisherElement())); } if (src.hasContact()) { for (org.hl7.fhir.dstu2.model.ValueSet.ValueSetContactComponent t : src.getContact()) tgtcs.addContact(convertValueSetContactComponent(t)); } - if (src.hasDate()) - tgtcs.setDate(src.getDate()); - if (src.hasDescription()) { - tgtcs.setDescription(src.getDescription()); + if (src.hasDateElement()) + tgtcs.setDateElement((DateTimeType) VersionConvertor_10_40.convertType(src.getDateElement())); + if (src.hasDescriptionElement()) { + tgtcs.setDescriptionElement((MarkdownType) VersionConvertor_10_40.convertType(src.getDescriptionElement())); } for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getUseContext()) if (VersionConvertor_10_40.isJurisdiction(t)) tgtcs.addJurisdiction(VersionConvertor_10_40.convertCodeableConcept(t)); @@ -319,24 +296,24 @@ public class ValueSet10_40 { return null; org.hl7.fhir.dstu2.model.ValueSet tgt = new org.hl7.fhir.dstu2.model.ValueSet(); VersionConvertor_10_40.copyDomainResource(src, tgt); - tgt.setUrl(src.getUrl()); + tgt.setUrlElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_40.convertType(src.getUrlElement())); for (org.hl7.fhir.r4.model.Identifier i : src.getIdentifier()) tgt.setIdentifier(VersionConvertor_10_40.convertIdentifier(i)); - tgt.setVersion(src.getVersion()); - tgt.setName(src.getName()); + tgt.setVersionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getVersionElement())); + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement())); tgt.setStatus(VersionConvertor_10_40.convertConformanceResourceStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getExperimentalElement())); + tgt.setPublisherElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getPublisherElement())); for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact()) tgt.addContact(convertValueSetContactComponent(t)); - if (src.hasDate()) - tgt.setDate(src.getDate()); - tgt.setLockedDate(src.getCompose().getLockedDate()); - tgt.setDescription(src.getDescription()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_40.convertType(src.getDateElement())); + tgt.setLockedDateElement((org.hl7.fhir.dstu2.model.DateType) VersionConvertor_10_40.convertType(src.getCompose().getLockedDateElement())); + tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getDescriptionElement())); for (org.hl7.fhir.r4.model.UsageContext t : src.getUseContext()) if (t.hasValueCodeableConcept()) tgt.addUseContext(VersionConvertor_10_40.convertCodeableConcept(t.getValueCodeableConcept())); for (org.hl7.fhir.r4.model.CodeableConcept t : src.getJurisdiction()) tgt.addUseContext(VersionConvertor_10_40.convertCodeableConcept(t)); - tgt.setImmutable(src.getImmutable()); - tgt.setRequirements(src.getPurpose()); + tgt.setImmutableElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getImmutableElement())); + tgt.setRequirementsElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getPurposeElement())); tgt.setCopyright(src.getCopyright()); if (src.hasExtension("http://hl7.org/fhir/StructureDefinition/valueset-extensible")) tgt.setExtensible(((BooleanType) src.getExtensionByUrl("http://hl7.org/fhir/StructureDefinition/valueset-extensible").getValue()).booleanValue()); @@ -396,9 +373,8 @@ public class ValueSet10_40 { return null; org.hl7.fhir.r4.model.ContactDetail tgt = new org.hl7.fhir.r4.model.ContactDetail(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_40.convertContactPoint(t)); } @@ -410,9 +386,8 @@ public class ValueSet10_40 { return null; org.hl7.fhir.dstu2.model.ValueSet.ValueSetContactComponent tgt = new org.hl7.fhir.dstu2.model.ValueSet.ValueSetContactComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.r4.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_40.convertContactPoint(t)); } @@ -424,18 +399,14 @@ public class ValueSet10_40 { return null; org.hl7.fhir.dstu2.model.ValueSet.ValueSetExpansionComponent tgt = new org.hl7.fhir.dstu2.model.ValueSet.ValueSetExpansionComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasIdentifier()) { - tgt.setIdentifier(src.getIdentifier()); - } - if (src.hasTimestamp()) { - tgt.setTimestamp(src.getTimestamp()); - } - if (src.hasTotal()) { - tgt.setTotal(src.getTotal()); - } - if (src.hasOffset()) { - tgt.setOffset(src.getOffset()); - } + if (src.hasIdentifierElement()) + tgt.setIdentifierElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_40.convertType(src.getIdentifierElement())); + if (src.hasTimestampElement()) + tgt.setTimestampElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_40.convertType(src.getTimestampElement())); + if (src.hasTotalElement()) + tgt.setTotalElement((org.hl7.fhir.dstu2.model.IntegerType) VersionConvertor_10_40.convertType(src.getTotalElement())); + if (src.hasOffsetElement()) + tgt.setOffsetElement((org.hl7.fhir.dstu2.model.IntegerType) VersionConvertor_10_40.convertType(src.getOffsetElement())); if (src.hasParameter()) { for (org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionParameterComponent t : src.getParameter()) tgt.addParameter(convertValueSetExpansionParameterComponent(t)); } @@ -450,18 +421,14 @@ public class ValueSet10_40 { return null; org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionComponent tgt = new org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasIdentifier()) { - tgt.setIdentifier(src.getIdentifier()); - } - if (src.hasTimestamp()) { - tgt.setTimestamp(src.getTimestamp()); - } - if (src.hasTotal()) { - tgt.setTotal(src.getTotal()); - } - if (src.hasOffset()) { - tgt.setOffset(src.getOffset()); - } + if (src.hasIdentifierElement()) + tgt.setIdentifierElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_10_40.convertType(src.getIdentifierElement())); + if (src.hasTimestampElement()) + tgt.setTimestampElement((org.hl7.fhir.r4.model.DateTimeType) VersionConvertor_10_40.convertType(src.getTimestampElement())); + if (src.hasTotalElement()) + tgt.setTotalElement((org.hl7.fhir.r4.model.IntegerType) VersionConvertor_10_40.convertType(src.getTotalElement())); + if (src.hasOffsetElement()) + tgt.setOffsetElement((org.hl7.fhir.r4.model.IntegerType) VersionConvertor_10_40.convertType(src.getOffsetElement())); if (src.hasParameter()) { for (org.hl7.fhir.dstu2.model.ValueSet.ValueSetExpansionParameterComponent t : src.getParameter()) tgt.addParameter(convertValueSetExpansionParameterComponent(t)); } @@ -476,21 +443,16 @@ public class ValueSet10_40 { return null; org.hl7.fhir.dstu2.model.ValueSet.ValueSetExpansionContainsComponent tgt = new org.hl7.fhir.dstu2.model.ValueSet.ValueSetExpansionContainsComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasSystem()) { - tgt.setSystem(src.getSystem()); - } - if (src.hasAbstract()) { - tgt.setAbstract(src.getAbstract()); - } - if (src.hasVersion()) { - tgt.setVersion(src.getVersion()); - } - if (src.hasCode()) { - tgt.setCode(src.getCode()); - } - if (src.hasDisplay()) { - tgt.setDisplay(src.getDisplay()); - } + if (src.hasSystemElement()) + tgt.setSystemElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_40.convertType(src.getSystemElement())); + if (src.hasAbstractElement()) + tgt.setAbstractElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getAbstractElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getVersionElement())); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu2.model.CodeType) VersionConvertor_10_40.convertType(src.getCodeElement())); + if (src.hasDisplayElement()) + tgt.setDisplayElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getDisplayElement())); if (src.hasContains()) { for (org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionContainsComponent t : src.getContains()) tgt.addContains(convertValueSetExpansionContainsComponent(t)); } @@ -502,21 +464,16 @@ public class ValueSet10_40 { return null; org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionContainsComponent tgt = new org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionContainsComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasSystem()) { - tgt.setSystem(src.getSystem()); - } - if (src.hasAbstract()) { - tgt.setAbstract(src.getAbstract()); - } - if (src.hasVersion()) { - tgt.setVersion(src.getVersion()); - } - if (src.hasCode()) { - tgt.setCode(src.getCode()); - } - if (src.hasDisplay()) { - tgt.setDisplay(src.getDisplay()); - } + if (src.hasSystemElement()) + tgt.setSystemElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_10_40.convertType(src.getSystemElement())); + if (src.hasAbstractElement()) + tgt.setAbstractElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_10_40.convertType(src.getAbstractElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getVersionElement())); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.r4.model.CodeType) VersionConvertor_10_40.convertType(src.getCodeElement())); + if (src.hasDisplayElement()) + tgt.setDisplayElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getDisplayElement())); if (src.hasContains()) { for (org.hl7.fhir.dstu2.model.ValueSet.ValueSetExpansionContainsComponent t : src.getContains()) tgt.addContains(convertValueSetExpansionContainsComponent(t)); } @@ -528,9 +485,8 @@ public class ValueSet10_40 { return null; org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionParameterComponent tgt = new org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionParameterComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement())); if (src.hasValue()) { tgt.setValue(VersionConvertor_10_40.convertType(src.getValue())); } @@ -542,9 +498,8 @@ public class ValueSet10_40 { return null; org.hl7.fhir.dstu2.model.ValueSet.ValueSetExpansionParameterComponent tgt = new org.hl7.fhir.dstu2.model.ValueSet.ValueSetExpansionParameterComponent(); VersionConvertor_10_40.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement())); if (src.hasValue()) { tgt.setValue(VersionConvertor_10_40.convertType(src.getValue())); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/parser/Parser.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/parser/Parser.java index 103728fbe..75711c42c 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/parser/Parser.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/parser/Parser.java @@ -47,8 +47,8 @@ public class Parser { public static final String ELEMENT = "Element"; private static final String RESOURCE_FILE_FORMAT = "_%s"; //TODO fix private static final List VERSION_FILES = Arrays.asList("10_30", "10_40", "10_50", "14_30", "14_40", "14_50", "30_40", "30_50", "40_50"); - private static final List BASE_TYPES = Arrays.asList("Base64Binary", "Boolean", "Canonical", "Code", - "Enumeration", "Date", "DateType", "Decimal", "Id", "Instant", "Integer", "Integer64", + private static final List BASE_TYPES = Arrays.asList("Base64Binary", "Boolean", "boolean", "Canonical", "Code", + "Enumeration", "Date", "DateTime", "DateType", "Decimal", "BigDecimal", "Id", "Instant", "Integer", "int", "Integer64", "Markdown", "Oid", "PositiveInt", "String", "Time", "UnsignedInt", "Uri", "Url", "Uuid", "XhtmlNode"); @@ -92,22 +92,22 @@ public class Parser { // VERSION_FILES.forEach(version -> { - String version = "10_30"; - List filenames = listAllJavaFilesInDirectory(new File("").getAbsolutePath() + "/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv" + version + "/"); - System.out.println("Checking the following files:"); - Collections.sort(filenames); - filenames.forEach(System.out::println); - filenames.forEach(name -> { - try { - modifyElementNotField("/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv" + version + "/", name, ".java", listOfPrimitiveTypes, version); - } catch (FileNotFoundException e) { - e.printStackTrace(); - } - }); +// String version = "10_40"; +// List filenames = listAllJavaFilesInDirectory(new File("").getAbsolutePath() + "/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv" + version + "/"); +// System.out.println("Checking the following files:"); +// Collections.sort(filenames); +// filenames.forEach(System.out::println); +// filenames.forEach(name -> { +// try { +// modifyElementNotField("/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv" + version + "/", name, ".java", listOfPrimitiveTypes, version); +// } catch (FileNotFoundException e) { +// e.printStackTrace(); +// } +// }); // }); // try { -// modifyElementNotField("/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/", "Subscription10_30", ".java", listOfPrimitiveTypes, "10_30"); + modifyElementNotField("/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/", "DataElement10_40", ".java", listOfPrimitiveTypes, "10_40"); // modifyElementNotField("/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/", "AuditEvent10_30", ".java", listOfPrimitiveTypes, "10_30"); // modifyElementNotField("/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/", "Binary10_30", ".java", listOfPrimitiveTypes, "10_30"); // modifyElementNotField("/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/", "Bundle10_30", ".java", listOfPrimitiveTypes, "10_30"); From d30c923745ab99ca5fe309ed7f7f3b6a84e8eb70 Mon Sep 17 00:00:00 2001 From: markiantorno Date: Fri, 7 Feb 2020 10:07:01 -0500 Subject: [PATCH 06/12] convo10_50 folder updated --- .../conv10_50/Appointment10_50.java | 61 +-- .../conv10_50/AppointmentResponse10_50.java | 31 +- .../convertors/conv10_50/AuditEvent10_50.java | 81 ++- .../fhir/convertors/conv10_50/Basic10_50.java | 11 +- .../convertors/conv10_50/Binary10_50.java | 20 +- .../convertors/conv10_50/Bundle10_50.java | 134 ++--- .../convertors/conv10_50/CarePlan10_50.java | 21 +- .../conv10_50/Communication10_50.java | 21 +- .../conv10_50/CommunicationRequest10_50.java | 10 +- .../conv10_50/Composition10_50.java | 44 +- .../convertors/conv10_50/ConceptMap10_50.java | 130 +++-- .../convertors/conv10_50/Condition10_50.java | 12 +- .../conv10_50/Conformance10_50.java | 157 +++--- .../conv10_50/DataElement10_50.java | 46 +- .../conv10_50/DetectedIssue10_50.java | 29 +- .../conv10_50/DeviceMetric10_50.java | 11 +- .../conv10_50/DeviceUseStatement10_50.java | 11 +- .../conv10_50/DiagnosticReport10_50.java | 31 +- .../conv10_50/DocumentReference10_50.java | 22 +- .../convertors/conv10_50/Encounter10_50.java | 1 + .../conv10_50/EnrollmentRequest10_50.java | 11 +- .../conv10_50/EnrollmentResponse10_50.java | 21 +- .../conv10_50/EpisodeOfCare10_50.java | 1 + .../conv10_50/FamilyMemberHistory10_50.java | 19 +- .../fhir/convertors/conv10_50/Flag10_50.java | 1 + .../fhir/convertors/conv10_50/Group10_50.java | 51 +- .../conv10_50/HealthcareService10_50.java | 81 ++- .../conv10_50/ImplementationGuide10_50.java | 155 +++--- .../fhir/convertors/conv10_50/List10_50.java | 36 +- .../convertors/conv10_50/Location10_50.java | 51 +- .../conv10_50/MedicationDispense10_50.java | 25 +- .../conv10_50/MedicationStatement10_50.java | 19 +- .../conv10_50/MessageHeader10_50.java | 71 ++- .../conv10_50/NamingSystem10_50.java | 89 ++-- .../conv10_50/Observation10_50.java | 21 +- .../conv10_50/OperationDefinition10_50.java | 155 +++--- .../conv10_50/OperationOutcome10_50.java | 11 +- .../conv10_50/Organization10_50.java | 21 +- .../convertors/conv10_50/Parameters10_50.java | 11 +- .../convertors/conv10_50/Patient10_50.java | 31 +- .../convertors/conv10_50/Person10_50.java | 21 +- .../conv10_50/Practitioner10_50.java | 21 +- .../conv10_50/Questionnaire10_50.java | 106 ++-- .../conv10_50/QuestionnaireResponse10_50.java | 51 +- .../conv10_50/RiskAssessment10_50.java | 31 +- .../convertors/conv10_50/Schedule10_50.java | 11 +- .../conv10_50/SearchParameter10_50.java | 103 ++-- .../fhir/convertors/conv10_50/Slot10_50.java | 41 +- .../conv10_50/StructureDefinition10_50.java | 154 +++--- .../convertors/conv10_50/Substance10_50.java | 21 +- .../conv10_50/SupplyDelivery10_50.java | 1 + .../conv10_50/SupplyRequest10_50.java | 1 + .../convertors/conv10_50/TestScript10_50.java | 478 +++++++----------- .../convertors/conv10_50/ValueSet10_50.java | 287 +++++------ .../hl7/fhir/convertors/parser/Parser.java | 26 +- 55 files changed, 1360 insertions(+), 1758 deletions(-) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Appointment10_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Appointment10_50.java index ea3eede32..18ab5f2dd 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Appointment10_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Appointment10_50.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_50; import org.hl7.fhir.convertors.VersionConvertor_10_50; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Appointment10_50 { @@ -19,27 +20,21 @@ public class Appointment10_50 { if (src.hasServiceType()) { for (org.hl7.fhir.r5.model.CodeableConcept t : src.getServiceType()) tgt.setType(VersionConvertor_10_50.convertCodeableConcept(t)); } - if (src.hasPriority()) { - tgt.setPriority(src.getPriority()); - } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } - if (src.hasStart()) { - tgt.setStart(src.getStart()); - } - if (src.hasEnd()) { - tgt.setEnd(src.getEnd()); - } - if (src.hasMinutesDuration()) { - tgt.setMinutesDuration(src.getMinutesDuration()); - } + if (src.hasPriorityElement()) + tgt.setPriorityElement((org.hl7.fhir.dstu2.model.UnsignedIntType) VersionConvertor_10_50.convertType(src.getPriorityElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getDescriptionElement())); + if (src.hasStartElement()) + tgt.setStartElement((org.hl7.fhir.dstu2.model.InstantType) VersionConvertor_10_50.convertType(src.getStartElement())); + if (src.hasEndElement()) + tgt.setEndElement((org.hl7.fhir.dstu2.model.InstantType) VersionConvertor_10_50.convertType(src.getEndElement())); + if (src.hasMinutesDurationElement()) + tgt.setMinutesDurationElement((org.hl7.fhir.dstu2.model.PositiveIntType) VersionConvertor_10_50.convertType(src.getMinutesDurationElement())); if (src.hasSlot()) { for (org.hl7.fhir.r5.model.Reference t : src.getSlot()) tgt.addSlot(VersionConvertor_10_50.convertReference(t)); } - if (src.hasComment()) { - tgt.setComment(src.getComment()); - } + if (src.hasCommentElement()) + tgt.setCommentElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getCommentElement())); if (src.hasParticipant()) { for (org.hl7.fhir.r5.model.Appointment.AppointmentParticipantComponent t : src.getParticipant()) tgt.addParticipant(convertAppointmentParticipantComponent(t)); } @@ -59,27 +54,21 @@ public class Appointment10_50 { } if (src.hasType()) tgt.addServiceType(VersionConvertor_10_50.convertCodeableConcept(src.getType())); - if (src.hasPriority()) { - tgt.setPriority(src.getPriority()); - } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } - if (src.hasStart()) { - tgt.setStart(src.getStart()); - } - if (src.hasEnd()) { - tgt.setEnd(src.getEnd()); - } - if (src.hasMinutesDuration()) { - tgt.setMinutesDuration(src.getMinutesDuration()); - } + if (src.hasPriorityElement()) + tgt.setPriorityElement((org.hl7.fhir.r5.model.UnsignedIntType) VersionConvertor_10_50.convertType(src.getPriorityElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getDescriptionElement())); + if (src.hasStartElement()) + tgt.setStartElement((org.hl7.fhir.r5.model.InstantType) VersionConvertor_10_50.convertType(src.getStartElement())); + if (src.hasEndElement()) + tgt.setEndElement((org.hl7.fhir.r5.model.InstantType) VersionConvertor_10_50.convertType(src.getEndElement())); + if (src.hasMinutesDurationElement()) + tgt.setMinutesDurationElement((org.hl7.fhir.r5.model.PositiveIntType) VersionConvertor_10_50.convertType(src.getMinutesDurationElement())); if (src.hasSlot()) { for (org.hl7.fhir.dstu2.model.Reference t : src.getSlot()) tgt.addSlot(VersionConvertor_10_50.convertReference(t)); } - if (src.hasComment()) { - tgt.setComment(src.getComment()); - } + if (src.hasCommentElement()) + tgt.setCommentElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getCommentElement())); if (src.hasParticipant()) { for (org.hl7.fhir.dstu2.model.Appointment.AppointmentParticipantComponent t : src.getParticipant()) tgt.addParticipant(convertAppointmentParticipantComponent(t)); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/AppointmentResponse10_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/AppointmentResponse10_50.java index 0171dd0f7..7c454077c 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/AppointmentResponse10_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/AppointmentResponse10_50.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_50; import org.hl7.fhir.convertors.VersionConvertor_10_50; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class AppointmentResponse10_50 { @@ -16,12 +17,10 @@ public class AppointmentResponse10_50 { if (src.hasAppointment()) { tgt.setAppointment(VersionConvertor_10_50.convertReference(src.getAppointment())); } - if (src.hasStart()) { - tgt.setStart(src.getStart()); - } - if (src.hasEnd()) { - tgt.setEnd(src.getEnd()); - } + if (src.hasStartElement()) + tgt.setStartElement((org.hl7.fhir.dstu2.model.InstantType) VersionConvertor_10_50.convertType(src.getStartElement())); + if (src.hasEndElement()) + tgt.setEndElement((org.hl7.fhir.dstu2.model.InstantType) VersionConvertor_10_50.convertType(src.getEndElement())); if (src.hasParticipantType()) { for (org.hl7.fhir.r5.model.CodeableConcept t : src.getParticipantType()) tgt.addParticipantType(VersionConvertor_10_50.convertCodeableConcept(t)); } @@ -31,9 +30,8 @@ public class AppointmentResponse10_50 { if (src.hasParticipantStatus()) { tgt.setParticipantStatus(convertParticipantStatus(src.getParticipantStatus())); } - if (src.hasComment()) { - tgt.setComment(src.getComment()); - } + if (src.hasCommentElement()) + tgt.setCommentElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getCommentElement())); return tgt; } @@ -48,12 +46,10 @@ public class AppointmentResponse10_50 { if (src.hasAppointment()) { tgt.setAppointment(VersionConvertor_10_50.convertReference(src.getAppointment())); } - if (src.hasStart()) { - tgt.setStart(src.getStart()); - } - if (src.hasEnd()) { - tgt.setEnd(src.getEnd()); - } + if (src.hasStartElement()) + tgt.setStartElement((org.hl7.fhir.r5.model.InstantType) VersionConvertor_10_50.convertType(src.getStartElement())); + if (src.hasEndElement()) + tgt.setEndElement((org.hl7.fhir.r5.model.InstantType) VersionConvertor_10_50.convertType(src.getEndElement())); if (src.hasParticipantType()) { for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getParticipantType()) tgt.addParticipantType(VersionConvertor_10_50.convertCodeableConcept(t)); } @@ -63,9 +59,8 @@ public class AppointmentResponse10_50 { if (src.hasParticipantStatus()) { tgt.setParticipantStatus(convertParticipantStatus(src.getParticipantStatus())); } - if (src.hasComment()) { - tgt.setComment(src.getComment()); - } + if (src.hasCommentElement()) + tgt.setCommentElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getCommentElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/AuditEvent10_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/AuditEvent10_50.java index 1dfebb9b7..013cfb05f 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/AuditEvent10_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/AuditEvent10_50.java @@ -2,6 +2,9 @@ package org.hl7.fhir.convertors.conv10_50; import org.hl7.fhir.convertors.VersionConvertor_10_50; import org.hl7.fhir.exceptions.FHIRException; +import org.hl7.fhir.r5.model.Base64BinaryType; + +import java.util.Collections; public class AuditEvent10_50 { @@ -135,15 +138,12 @@ public class AuditEvent10_50 { if (src.getWho().hasReference() || src.getWho().hasDisplay() || src.getWho().hasExtension() || src.getWho().hasId()) tgt.setReference(VersionConvertor_10_50.convertReference(src.getWho())); } - if (src.hasAltId()) { - tgt.setAltId(src.getAltId()); - } - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasRequestor()) { - tgt.setRequestor(src.getRequestor()); - } + if (src.hasAltIdElement()) + tgt.setAltIdElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getAltIdElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getNameElement())); + if (src.hasRequestorElement()) + tgt.setRequestorElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_50.convertType(src.getRequestorElement())); if (src.hasLocation()) { tgt.setLocation(VersionConvertor_10_50.convertReference(src.getLocation())); } @@ -175,15 +175,12 @@ public class AuditEvent10_50 { } if (src.hasUserId()) tgt.getWho().setIdentifier(VersionConvertor_10_50.convertIdentifier(src.getUserId())); - if (src.hasAltId()) { - tgt.setAltId(src.getAltId()); - } - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasRequestor()) { - tgt.setRequestor(src.getRequestor()); - } + if (src.hasAltIdElement()) + tgt.setAltIdElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getAltIdElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getNameElement())); + if (src.hasRequestorElement()) + tgt.setRequestorElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_10_50.convertType(src.getRequestorElement())); if (src.hasLocation()) { tgt.setLocation(VersionConvertor_10_50.convertReference(src.getLocation())); } @@ -207,9 +204,8 @@ public class AuditEvent10_50 { return null; org.hl7.fhir.r5.model.AuditEvent.AuditEventAgentNetworkComponent tgt = new org.hl7.fhir.r5.model.AuditEvent.AuditEventAgentNetworkComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasAddress()) { - tgt.setAddress(src.getAddress()); - } + if (src.hasAddressElement()) + tgt.setAddressElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getAddressElement())); if (src.hasType()) { tgt.setType(convertAuditEventParticipantNetworkType(src.getType())); } @@ -221,9 +217,8 @@ public class AuditEvent10_50 { return null; org.hl7.fhir.dstu2.model.AuditEvent.AuditEventParticipantNetworkComponent tgt = new org.hl7.fhir.dstu2.model.AuditEvent.AuditEventParticipantNetworkComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasAddress()) { - tgt.setAddress(src.getAddress()); - } + if (src.hasAddressElement()) + tgt.setAddressElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getAddressElement())); if (src.hasType()) { tgt.setType(convertAuditEventParticipantNetworkType(src.getType())); } @@ -251,11 +246,10 @@ public class AuditEvent10_50 { if (src.hasSecurityLabel()) { for (org.hl7.fhir.dstu2.model.Coding t : src.getSecurityLabel()) tgt.addSecurityLabel(VersionConvertor_10_50.convertCoding(t)); } - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasQuery()) { - tgt.setQuery(src.getQuery()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getNameElement())); + if (src.hasQueryElement()) { + tgt.setQueryElement((Base64BinaryType) VersionConvertor_10_50.convertType(src.getQueryElement())); } if (src.hasDetail()) { for (org.hl7.fhir.dstu2.model.AuditEvent.AuditEventObjectDetailComponent t : src.getDetail()) tgt.addDetail(convertAuditEventEntityDetailComponent(t)); @@ -286,11 +280,10 @@ public class AuditEvent10_50 { if (src.hasSecurityLabel()) { for (org.hl7.fhir.r5.model.Coding t : src.getSecurityLabel()) tgt.addSecurityLabel(VersionConvertor_10_50.convertCoding(t)); } - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasQuery()) { - tgt.setQuery(src.getQuery()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getNameElement())); + if (src.hasQueryElement()) { + tgt.setQueryElement((org.hl7.fhir.dstu2.model.Base64BinaryType) VersionConvertor_10_50.convertType(src.getQueryElement())); } if (src.hasDetail()) { for (org.hl7.fhir.r5.model.AuditEvent.AuditEventEntityDetailComponent t : src.getDetail()) tgt.addDetail(convertAuditEventEntityDetailComponent(t)); @@ -303,9 +296,8 @@ public class AuditEvent10_50 { return null; org.hl7.fhir.r5.model.AuditEvent.AuditEventEntityDetailComponent tgt = new org.hl7.fhir.r5.model.AuditEvent.AuditEventEntityDetailComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasType()) { - tgt.setType(src.getType()); - } + if (src.hasTypeElement()) + tgt.setTypeElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getTypeElement())); if (src.hasValue()) tgt.setValue(new org.hl7.fhir.r5.model.Base64BinaryType(src.getValue())); return tgt; @@ -316,9 +308,8 @@ public class AuditEvent10_50 { return null; org.hl7.fhir.dstu2.model.AuditEvent.AuditEventObjectDetailComponent tgt = new org.hl7.fhir.dstu2.model.AuditEvent.AuditEventObjectDetailComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasType()) { - tgt.setType(src.getType()); - } + if (src.hasTypeElement()) + tgt.setTypeElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getTypeElement())); if (src.hasValueStringType()) tgt.setValue(src.getValueStringType().getValue().getBytes()); else if (src.hasValueBase64BinaryType()) @@ -403,9 +394,8 @@ public class AuditEvent10_50 { return null; org.hl7.fhir.dstu2.model.AuditEvent.AuditEventSourceComponent tgt = new org.hl7.fhir.dstu2.model.AuditEvent.AuditEventSourceComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasSite()) { - tgt.setSite(src.getSite()); - } + if (src.hasSiteElement()) + tgt.setSiteElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getSiteElement())); if (src.hasObserver()) tgt.setIdentifier(VersionConvertor_10_50.convertIdentifier(src.getObserver().getIdentifier())); if (src.hasType()) { @@ -419,9 +409,8 @@ public class AuditEvent10_50 { return null; org.hl7.fhir.r5.model.AuditEvent.AuditEventSourceComponent tgt = new org.hl7.fhir.r5.model.AuditEvent.AuditEventSourceComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasSite()) { - tgt.setSite(src.getSite()); - } + if (src.hasSiteElement()) + tgt.setSiteElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getSiteElement())); if (src.hasIdentifier()) tgt.getObserver().setIdentifier(VersionConvertor_10_50.convertIdentifier(src.getIdentifier())); if (src.hasType()) { diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Basic10_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Basic10_50.java index afc3f186e..7ba5fc85a 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Basic10_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Basic10_50.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_50; import org.hl7.fhir.convertors.VersionConvertor_10_50; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Basic10_50 { @@ -19,9 +20,8 @@ public class Basic10_50 { if (src.hasSubject()) { tgt.setSubject(VersionConvertor_10_50.convertReference(src.getSubject())); } - if (src.hasCreated()) { - tgt.setCreated(src.getCreated()); - } + if (src.hasCreatedElement()) + tgt.setCreatedElement((org.hl7.fhir.r5.model.DateType) VersionConvertor_10_50.convertType(src.getCreatedElement())); if (src.hasAuthor()) { tgt.setAuthor(VersionConvertor_10_50.convertReference(src.getAuthor())); } @@ -42,9 +42,8 @@ public class Basic10_50 { if (src.hasSubject()) { tgt.setSubject(VersionConvertor_10_50.convertReference(src.getSubject())); } - if (src.hasCreated()) { - tgt.setCreated(src.getCreated()); - } + if (src.hasCreatedElement()) + tgt.setCreatedElement((org.hl7.fhir.dstu2.model.DateType) VersionConvertor_10_50.convertType(src.getCreatedElement())); if (src.hasAuthor()) { tgt.setAuthor(VersionConvertor_10_50.convertReference(src.getAuthor())); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Binary10_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Binary10_50.java index bd2235066..2b204009a 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Binary10_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Binary10_50.java @@ -1,7 +1,11 @@ package org.hl7.fhir.convertors.conv10_50; import org.hl7.fhir.convertors.VersionConvertor_10_50; +import org.hl7.fhir.dstu2.model.Base64BinaryType; import org.hl7.fhir.exceptions.FHIRException; +import org.hl7.fhir.r5.model.CodeType; + +import java.util.Collections; public class Binary10_50 { @@ -10,11 +14,10 @@ public class Binary10_50 { return null; org.hl7.fhir.r5.model.Binary tgt = new org.hl7.fhir.r5.model.Binary(); VersionConvertor_10_50.copyResource(src, tgt); - if (src.hasContentType()) { - tgt.setContentType(src.getContentType()); - } - if (src.hasContent()) { - tgt.setContent(src.getContent()); + if (src.hasContentTypeElement()) + tgt.setContentTypeElement((org.hl7.fhir.r5.model.CodeType) VersionConvertor_10_50.convertType(src.getContentTypeElement())); + if (src.hasContentElement()) { + tgt.setContentTypeElement((CodeType) VersionConvertor_10_50.convertType(src.getContentElement())); } return tgt; } @@ -24,10 +27,9 @@ public class Binary10_50 { return null; org.hl7.fhir.dstu2.model.Binary tgt = new org.hl7.fhir.dstu2.model.Binary(); VersionConvertor_10_50.copyResource(src, tgt); - if (src.hasContentType()) { - tgt.setContentType(src.getContentType()); - } - tgt.setContent(src.getContent()); + if (src.hasContentTypeElement()) + tgt.setContentTypeElement((org.hl7.fhir.dstu2.model.CodeType) VersionConvertor_10_50.convertType(src.getContentTypeElement())); + tgt.setContentElement((Base64BinaryType) VersionConvertor_10_50.convertType(src.getContentElement())); return tgt; } } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Bundle10_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Bundle10_50.java index 4e10f1f59..c3f5f7dd0 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Bundle10_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Bundle10_50.java @@ -3,6 +3,7 @@ package org.hl7.fhir.convertors.conv10_50; import org.hl7.fhir.convertors.VersionConvertorAdvisor50; import org.hl7.fhir.convertors.VersionConvertor_10_50; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Bundle10_50 { @@ -14,8 +15,8 @@ public class Bundle10_50 { if (src.hasType()) { tgt.setType(convertBundleType(src.getType())); } - if (src.hasTotal()) - tgt.setTotal(src.getTotal()); + if (src.hasTotalElement()) + tgt.setTotalElement((org.hl7.fhir.r5.model.UnsignedIntType) VersionConvertor_10_50.convertType(src.getTotalElement())); if (src.hasLink()) { for (org.hl7.fhir.dstu2.model.Bundle.BundleLinkComponent t : src.getLink()) tgt.addLink(convertBundleLinkComponent(t)); } @@ -40,8 +41,8 @@ public class Bundle10_50 { if (src.hasType()) { tgt.setType(convertBundleType(src.getType())); } - if (src.hasTotal()) - tgt.setTotal(src.getTotal()); + if (src.hasTotalElement()) + tgt.setTotalElement((org.hl7.fhir.dstu2.model.UnsignedIntType) VersionConvertor_10_50.convertType(src.getTotalElement())); if (src.hasLink()) { for (org.hl7.fhir.r5.model.Bundle.BundleLinkComponent t : src.getLink()) tgt.addLink(convertBundleLinkComponent(t)); } @@ -61,9 +62,8 @@ public class Bundle10_50 { if (src.hasLink()) { for (org.hl7.fhir.dstu2.model.Bundle.BundleLinkComponent t : src.getLink()) tgt.addLink(convertBundleLinkComponent(t)); } - if (src.hasFullUrl()) { - tgt.setFullUrl(src.getFullUrl()); - } + if (src.hasFullUrlElement()) + tgt.setFullUrlElement((org.hl7.fhir.r5.model.UriType) VersionConvertor_10_50.convertType(src.getFullUrlElement())); if (src.hasResource()) { tgt.setResource(VersionConvertor_10_50.convertResource(src.getResource())); } @@ -113,21 +113,16 @@ public class Bundle10_50 { if (src.hasMethod()) { tgt.setMethod(convertHTTPVerb(src.getMethod())); } - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } - if (src.hasIfNoneMatch()) { - tgt.setIfNoneMatch(src.getIfNoneMatch()); - } - if (src.hasIfModifiedSince()) { - tgt.setIfModifiedSince(src.getIfModifiedSince()); - } - if (src.hasIfMatch()) { - tgt.setIfMatch(src.getIfMatch()); - } - if (src.hasIfNoneExist()) { - tgt.setIfNoneExist(src.getIfNoneExist()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_50.convertType(src.getUrlElement())); + if (src.hasIfNoneMatchElement()) + tgt.setIfNoneMatchElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getIfNoneMatchElement())); + if (src.hasIfModifiedSinceElement()) + tgt.setIfModifiedSinceElement((org.hl7.fhir.dstu2.model.InstantType) VersionConvertor_10_50.convertType(src.getIfModifiedSinceElement())); + if (src.hasIfMatchElement()) + tgt.setIfMatchElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getIfMatchElement())); + if (src.hasIfNoneExistElement()) + tgt.setIfNoneExistElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getIfNoneExistElement())); return tgt; } @@ -139,21 +134,16 @@ public class Bundle10_50 { if (src.hasMethod()) { tgt.setMethod(convertHTTPVerb(src.getMethod())); } - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } - if (src.hasIfNoneMatch()) { - tgt.setIfNoneMatch(src.getIfNoneMatch()); - } - if (src.hasIfModifiedSince()) { - tgt.setIfModifiedSince(src.getIfModifiedSince()); - } - if (src.hasIfMatch()) { - tgt.setIfMatch(src.getIfMatch()); - } - if (src.hasIfNoneExist()) { - tgt.setIfNoneExist(src.getIfNoneExist()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r5.model.UriType) VersionConvertor_10_50.convertType(src.getUrlElement())); + if (src.hasIfNoneMatchElement()) + tgt.setIfNoneMatchElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getIfNoneMatchElement())); + if (src.hasIfModifiedSinceElement()) + tgt.setIfModifiedSinceElement((org.hl7.fhir.r5.model.InstantType) VersionConvertor_10_50.convertType(src.getIfModifiedSinceElement())); + if (src.hasIfMatchElement()) + tgt.setIfMatchElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getIfMatchElement())); + if (src.hasIfNoneExistElement()) + tgt.setIfNoneExistElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getIfNoneExistElement())); return tgt; } @@ -162,18 +152,14 @@ public class Bundle10_50 { return null; org.hl7.fhir.dstu2.model.Bundle.BundleEntryResponseComponent tgt = new org.hl7.fhir.dstu2.model.Bundle.BundleEntryResponseComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasStatus()) { - tgt.setStatus(src.getStatus()); - } - if (src.hasLocation()) { - tgt.setLocation(src.getLocation()); - } - if (src.hasEtag()) { - tgt.setEtag(src.getEtag()); - } - if (src.hasLastModified()) { - tgt.setLastModified(src.getLastModified()); - } + if (src.hasStatusElement()) + tgt.setStatusElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getStatusElement())); + if (src.hasLocationElement()) + tgt.setLocationElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_50.convertType(src.getLocationElement())); + if (src.hasEtagElement()) + tgt.setEtagElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getEtagElement())); + if (src.hasLastModifiedElement()) + tgt.setLastModifiedElement((org.hl7.fhir.dstu2.model.InstantType) VersionConvertor_10_50.convertType(src.getLastModifiedElement())); return tgt; } @@ -182,18 +168,14 @@ public class Bundle10_50 { return null; org.hl7.fhir.r5.model.Bundle.BundleEntryResponseComponent tgt = new org.hl7.fhir.r5.model.Bundle.BundleEntryResponseComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasStatus()) { - tgt.setStatus(src.getStatus()); - } - if (src.hasLocation()) { - tgt.setLocation(src.getLocation()); - } - if (src.hasEtag()) { - tgt.setEtag(src.getEtag()); - } - if (src.hasLastModified()) { - tgt.setLastModified(src.getLastModified()); - } + if (src.hasStatusElement()) + tgt.setStatusElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getStatusElement())); + if (src.hasLocationElement()) + tgt.setLocationElement((org.hl7.fhir.r5.model.UriType) VersionConvertor_10_50.convertType(src.getLocationElement())); + if (src.hasEtagElement()) + tgt.setEtagElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getEtagElement())); + if (src.hasLastModifiedElement()) + tgt.setLastModifiedElement((org.hl7.fhir.r5.model.InstantType) VersionConvertor_10_50.convertType(src.getLastModifiedElement())); return tgt; } @@ -205,9 +187,8 @@ public class Bundle10_50 { if (src.hasMode()) { tgt.setMode(convertSearchEntryMode(src.getMode())); } - if (src.hasScore()) { - tgt.setScore(src.getScore()); - } + if (src.hasScoreElement()) + tgt.setScoreElement((org.hl7.fhir.dstu2.model.DecimalType) VersionConvertor_10_50.convertType(src.getScoreElement())); return tgt; } @@ -219,9 +200,8 @@ public class Bundle10_50 { if (src.hasMode()) { tgt.setMode(convertSearchEntryMode(src.getMode())); } - if (src.hasScore()) { - tgt.setScore(src.getScore()); - } + if (src.hasScoreElement()) + tgt.setScoreElement((org.hl7.fhir.r5.model.DecimalType) VersionConvertor_10_50.convertType(src.getScoreElement())); return tgt; } @@ -230,12 +210,10 @@ public class Bundle10_50 { return null; org.hl7.fhir.r5.model.Bundle.BundleLinkComponent tgt = new org.hl7.fhir.r5.model.Bundle.BundleLinkComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasRelation()) { - tgt.setRelation(src.getRelation()); - } - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } + if (src.hasRelationElement()) + tgt.setRelationElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getRelationElement())); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r5.model.UriType) VersionConvertor_10_50.convertType(src.getUrlElement())); return tgt; } @@ -244,12 +222,10 @@ public class Bundle10_50 { return null; org.hl7.fhir.dstu2.model.Bundle.BundleLinkComponent tgt = new org.hl7.fhir.dstu2.model.Bundle.BundleLinkComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasRelation()) { - tgt.setRelation(src.getRelation()); - } - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } + if (src.hasRelationElement()) + tgt.setRelationElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getRelationElement())); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_50.convertType(src.getUrlElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/CarePlan10_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/CarePlan10_50.java index ca99d68ff..6981a4f4d 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/CarePlan10_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/CarePlan10_50.java @@ -4,6 +4,7 @@ import org.hl7.fhir.convertors.VersionConvertor_10_50; import org.hl7.fhir.dstu2.model.Reference; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r5.model.CodeableReference; +import java.util.Collections; public class CarePlan10_50 { @@ -34,9 +35,8 @@ public class CarePlan10_50 { if (src.hasCategory()) { for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getCategory()) tgt.addCategory(VersionConvertor_10_50.convertCodeableConcept(t)); } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getDescriptionElement())); if (src.hasAddresses()) { for (org.hl7.fhir.dstu2.model.Reference t : src.getAddresses()) tgt.addAddresses(convertReferenceToCodableReference(t)); } @@ -77,9 +77,8 @@ public class CarePlan10_50 { if (src.hasCategory()) { for (org.hl7.fhir.r5.model.CodeableConcept t : src.getCategory()) tgt.addCategory(VersionConvertor_10_50.convertCodeableConcept(t)); } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getDescriptionElement())); for (CodeableReference t : src.getAddresses()) { if (t.hasReference()) { tgt.addAddresses(VersionConvertor_10_50.convertReference(t.getReference())); @@ -169,9 +168,8 @@ public class CarePlan10_50 { if (src.hasQuantity()) { tgt.setQuantity(VersionConvertor_10_50.convertSimpleQuantity(src.getQuantity())); } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getDescriptionElement())); return tgt; } @@ -214,9 +212,8 @@ public class CarePlan10_50 { if (src.hasQuantity()) { tgt.setQuantity(VersionConvertor_10_50.convertSimpleQuantity(src.getQuantity())); } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getDescriptionElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Communication10_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Communication10_50.java index 4d135d130..8bf8728da 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Communication10_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Communication10_50.java @@ -3,6 +3,7 @@ package org.hl7.fhir.convertors.conv10_50; import org.hl7.fhir.convertors.VersionConvertor_10_50; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r5.model.CodeableReference; +import java.util.Collections; public class Communication10_50 { @@ -35,12 +36,10 @@ public class Communication10_50 { if (src.hasEncounter()) { tgt.setEncounter(VersionConvertor_10_50.convertReference(src.getEncounter())); } - if (src.hasSent()) { - tgt.setSent(src.getSent()); - } - if (src.hasReceived()) { - tgt.setReceived(src.getReceived()); - } + if (src.hasSentElement()) + tgt.setSentElement((org.hl7.fhir.r5.model.DateTimeType) VersionConvertor_10_50.convertType(src.getSentElement())); + if (src.hasReceivedElement()) + tgt.setReceivedElement((org.hl7.fhir.r5.model.DateTimeType) VersionConvertor_10_50.convertType(src.getReceivedElement())); if (src.hasReason()) { for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getReason()) tgt.addReason(VersionConvertor_10_50.convertCodeableConceptToCodableReference(t)); } @@ -79,12 +78,10 @@ public class Communication10_50 { if (src.hasEncounter()) { tgt.setEncounter(VersionConvertor_10_50.convertReference(src.getEncounter())); } - if (src.hasSent()) { - tgt.setSent(src.getSent()); - } - if (src.hasReceived()) { - tgt.setReceived(src.getReceived()); - } + if (src.hasSentElement()) + tgt.setSentElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_50.convertType(src.getSentElement())); + if (src.hasReceivedElement()) + tgt.setReceivedElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_50.convertType(src.getReceivedElement())); for (CodeableReference t : src.getReason()) if (t.hasConcept()) tgt.addReason(VersionConvertor_10_50.convertCodeableConcept(t.getConcept())); if (src.hasSubject()) { diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/CommunicationRequest10_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/CommunicationRequest10_50.java index 11777fec1..6e13cacc5 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/CommunicationRequest10_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/CommunicationRequest10_50.java @@ -1,8 +1,10 @@ package org.hl7.fhir.convertors.conv10_50; import org.hl7.fhir.convertors.VersionConvertor_10_50; +import org.hl7.fhir.dstu2.model.DateTimeType; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r5.model.CodeableReference; +import java.util.Collections; public class CommunicationRequest10_50 { @@ -43,8 +45,8 @@ public class CommunicationRequest10_50 { } for (CodeableReference t : src.getReason()) if (t.hasConcept()) tgt.addReason(VersionConvertor_10_50.convertCodeableConcept(t.getConcept())); - if (src.hasAuthoredOn()) { - tgt.setRequestedOn(src.getAuthoredOn()); + if (src.hasAuthoredOnElement()) { + tgt.setRequestedOnElement((DateTimeType) VersionConvertor_10_50.convertType(src.getAuthoredOnElement())); } if (src.hasSubject()) { tgt.setSubject(VersionConvertor_10_50.convertReference(src.getSubject())); @@ -93,8 +95,8 @@ public class CommunicationRequest10_50 { if (src.hasReason()) { for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getReason()) tgt.addReason(VersionConvertor_10_50.convertCodeableConceptToCodableReference(t)); } - if (src.hasRequestedOn()) { - tgt.setAuthoredOn(src.getRequestedOn()); + if (src.hasRequestedOnElement()) { + tgt.setAuthoredOnElement((org.hl7.fhir.r5.model.DateTimeType) VersionConvertor_10_50.convertType(src.getRequestedOnElement())); } if (src.hasSubject()) { tgt.setSubject(VersionConvertor_10_50.convertReference(src.getSubject())); diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Composition10_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Composition10_50.java index bc8c79e50..501e1d876 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Composition10_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Composition10_50.java @@ -1,7 +1,9 @@ package org.hl7.fhir.convertors.conv10_50; import org.hl7.fhir.convertors.VersionConvertor_10_50; +import org.hl7.fhir.dstu2.model.CodeType; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Composition10_50 { @@ -13,17 +15,16 @@ public class Composition10_50 { if (src.hasIdentifier()) { tgt.setIdentifier(VersionConvertor_10_50.convertIdentifier(src.getIdentifier())); } - if (src.hasDate()) - tgt.setDate(src.getDate()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.r5.model.DateTimeType) VersionConvertor_10_50.convertType(src.getDateElement())); if (src.hasType()) { tgt.setType(VersionConvertor_10_50.convertCodeableConcept(src.getType())); } if (src.hasClass_()) { tgt.addCategory(VersionConvertor_10_50.convertCodeableConcept(src.getClass_())); } - if (src.hasTitle()) { - tgt.setTitle(src.getTitle()); - } + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getTitleElement())); if (src.hasStatus()) { tgt.setStatus(convertCompositionStatus(src.getStatus())); } @@ -66,16 +67,15 @@ public class Composition10_50 { if (src.hasIdentifier()) { tgt.setIdentifier(VersionConvertor_10_50.convertIdentifier(src.getIdentifier())); } - if (src.hasDate()) - tgt.setDate(src.getDate()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_50.convertType(src.getDateElement())); if (src.hasType()) { tgt.setType(VersionConvertor_10_50.convertCodeableConcept(src.getType())); } if (src.hasCategory()) tgt.setClass_(VersionConvertor_10_50.convertCodeableConcept(src.getCategoryFirstRep())); - if (src.hasTitle()) { - tgt.setTitle(src.getTitle()); - } + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getTitleElement())); if (src.hasStatus()) { tgt.setStatus(convertCompositionStatus(src.getStatus())); } @@ -147,9 +147,8 @@ public class Composition10_50 { VersionConvertor_10_50.copyElement(src, tgt); if (src.hasMode()) tgt.addMode(convertCompositionAttestationMode(src.getMode())); - if (src.hasTime()) { - tgt.setTime(src.getTime()); - } + if (src.hasTimeElement()) + tgt.setTimeElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_50.convertType(src.getTimeElement())); if (src.hasParty()) { tgt.setParty(VersionConvertor_10_50.convertReference(src.getParty())); } @@ -163,9 +162,8 @@ public class Composition10_50 { VersionConvertor_10_50.copyElement(src, tgt); if (src.hasMode()) tgt.setMode(convertCompositionAttestationMode(src.getMode().get(0).getValue())); - if (src.hasTime()) { - tgt.setTime(src.getTime()); - } + if (src.hasTimeElement()) + tgt.setTimeElement((org.hl7.fhir.r5.model.DateTimeType) VersionConvertor_10_50.convertType(src.getTimeElement())); if (src.hasParty()) { tgt.setParty(VersionConvertor_10_50.convertReference(src.getParty())); } @@ -245,17 +243,16 @@ public class Composition10_50 { return null; org.hl7.fhir.dstu2.model.Composition.SectionComponent tgt = new org.hl7.fhir.dstu2.model.Composition.SectionComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasTitle()) { - tgt.setTitle(src.getTitle()); - } + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getTitleElement())); if (src.hasCode()) { tgt.setCode(VersionConvertor_10_50.convertCodeableConcept(src.getCode())); } if (src.hasText()) { tgt.setText(VersionConvertor_10_50.convertNarrative(src.getText())); } - if (src.hasMode()) { - tgt.setMode(src.getMode().toCode()); + if (src.hasModeElement()) { + tgt.setModeElement((CodeType) VersionConvertor_10_50.convertType(src.getModeElement())); } if (src.hasOrderedBy()) { tgt.setOrderedBy(VersionConvertor_10_50.convertCodeableConcept(src.getOrderedBy())); @@ -277,9 +274,8 @@ public class Composition10_50 { return null; org.hl7.fhir.r5.model.Composition.SectionComponent tgt = new org.hl7.fhir.r5.model.Composition.SectionComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasTitle()) { - tgt.setTitle(src.getTitle()); - } + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getTitleElement())); if (src.hasCode()) { tgt.setCode(VersionConvertor_10_50.convertCodeableConcept(src.getCode())); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/ConceptMap10_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/ConceptMap10_50.java index b84ed0c53..fd9e9d4d8 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/ConceptMap10_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/ConceptMap10_50.java @@ -5,8 +5,12 @@ import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r5.model.CanonicalType; import org.hl7.fhir.r5.model.ConceptMap; import org.hl7.fhir.r5.model.ConceptMap.ConceptMapGroupComponent; +import org.hl7.fhir.r5.model.StringType; +import org.hl7.fhir.r5.model.UriType; + import java.util.ArrayList; import java.util.List; +import java.util.Collections; public class ConceptMap10_50 { @@ -15,18 +19,18 @@ public class ConceptMap10_50 { return null; org.hl7.fhir.r5.model.ConceptMap tgt = new org.hl7.fhir.r5.model.ConceptMap(); VersionConvertor_10_50.copyDomainResource(src, tgt); - tgt.setUrl(src.getUrl()); - tgt.addIdentifier(VersionConvertor_10_50.convertIdentifier(src.getIdentifier())); - tgt.setVersion(src.getVersion()); - tgt.setName(src.getName()); - tgt.setStatus(VersionConvertor_10_50.convertConformanceResourceStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - tgt.setPublisher(src.getPublisher()); + if (src.hasUrlElement()) tgt.setUrlElement((UriType) VersionConvertor_10_50.convertType(src.getUrlElement())); + if (src.hasIdentifier()) tgt.addIdentifier(VersionConvertor_10_50.convertIdentifier(src.getIdentifier())); + if (src.hasVersionElement()) tgt.setVersionElement((StringType) VersionConvertor_10_50.convertType(src.getVersionElement())); + if (src.hasNameElement()) tgt.setNameElement((StringType) VersionConvertor_10_50.convertType(src.getNameElement())); + if (src.hasStatus()) tgt.setStatus(VersionConvertor_10_50.convertConformanceResourceStatus(src.getStatus())); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_10_50.convertType(src.getExperimentalElement())); + if (src.hasPublisherElement()) tgt.setPublisherElement((StringType) VersionConvertor_10_50.convertType(src.getPublisherElement())); for (org.hl7.fhir.dstu2.model.ConceptMap.ConceptMapContactComponent t : src.getContact()) tgt.addContact(convertConceptMapContactComponent(t)); - if (src.hasDate()) - tgt.setDate(src.getDate()); - tgt.setDescription(src.getDescription()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.r5.model.DateTimeType) VersionConvertor_10_50.convertType(src.getDateElement())); + if (src.hasDescription()) tgt.setDescription(src.getDescription()); for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getUseContext()) if (VersionConvertor_10_50.isJurisdiction(t)) tgt.addJurisdiction(VersionConvertor_10_50.convertCodeableConcept(t)); else @@ -49,47 +53,41 @@ public class ConceptMap10_50 { return null; org.hl7.fhir.dstu2.model.ConceptMap tgt = new org.hl7.fhir.dstu2.model.ConceptMap(); VersionConvertor_10_50.copyDomainResource(src, tgt); - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_50.convertType(src.getUrlElement())); if (src.hasIdentifier()) { if (src.hasIdentifier()) { tgt.setIdentifier(VersionConvertor_10_50.convertIdentifier(src.getIdentifierFirstRep())); } } - if (src.hasVersion()) { - tgt.setVersion(src.getVersion()); - } - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_10_50.convertConformanceResourceStatus(src.getStatus())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasPublisher()) { - tgt.setPublisher(src.getPublisher()); - } + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_50.convertType(src.getExperimentalElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.r5.model.ContactDetail t : src.getContact()) tgt.addContact(convertConceptMapContactComponent(t)); } - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_50.convertType(src.getDateElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getDescriptionElement())); for (org.hl7.fhir.r5.model.UsageContext t : src.getUseContext()) if (t.hasValueCodeableConcept()) tgt.addUseContext(VersionConvertor_10_50.convertCodeableConcept(t.getValueCodeableConcept())); if (src.hasJurisdiction()) { for (org.hl7.fhir.r5.model.CodeableConcept t : src.getJurisdiction()) tgt.addUseContext(VersionConvertor_10_50.convertCodeableConcept(t)); } - if (src.hasPurpose()) { - tgt.setRequirements(src.getPurpose()); - } - if (src.hasCopyright()) { - tgt.setCopyright(src.getCopyright()); + if (src.hasPurposeElement()) { + tgt.setRequirementsElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getPurposeElement())); } + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getCopyrightElement())); if (src.hasSource()) { tgt.setSource(VersionConvertor_10_50.convertType(src.getSource())); } @@ -107,9 +105,8 @@ public class ConceptMap10_50 { return null; org.hl7.fhir.r5.model.ContactDetail tgt = new org.hl7.fhir.r5.model.ContactDetail(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_50.convertContactPoint(t)); } @@ -121,9 +118,8 @@ public class ConceptMap10_50 { return null; org.hl7.fhir.dstu2.model.ConceptMap.ConceptMapContactComponent tgt = new org.hl7.fhir.dstu2.model.ConceptMap.ConceptMapContactComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.r5.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_50.convertContactPoint(t)); } @@ -179,14 +175,14 @@ public class ConceptMap10_50 { return null; org.hl7.fhir.dstu2.model.ConceptMap.OtherElementComponent tgt = new org.hl7.fhir.dstu2.model.ConceptMap.OtherElementComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasProperty()) { - tgt.setElement(src.getProperty()); + if (src.hasPropertyElement()) { + tgt.setElementElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_50.convertType(src.getPropertyElement())); } - if (src.hasSystem()) { - tgt.setCodeSystem(src.getSystem()); + if (src.hasSystemElement()) { + tgt.setCodeSystemElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_50.convertType(src.getSystemElement())); } - if (src.hasValue()) { - tgt.setCode(src.getValue()); + if (src.hasValueElement()) { + tgt.setCodeElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getValueElement())); } return tgt; } @@ -196,14 +192,14 @@ public class ConceptMap10_50 { return null; org.hl7.fhir.r5.model.ConceptMap.OtherElementComponent tgt = new org.hl7.fhir.r5.model.ConceptMap.OtherElementComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasElement()) { - tgt.setProperty(src.getElement()); + if (src.hasElementElement()) { + tgt.setPropertyElement((UriType) VersionConvertor_10_50.convertType(src.getElementElement())); } - if (src.hasCodeSystem()) { - tgt.setSystem(src.getCodeSystem()); + if (src.hasCodeSystemElement()) { + tgt.setSystemElement((CanonicalType) VersionConvertor_10_50.convertType(src.getCodeSystemElement())); } - if (src.hasCode()) { - tgt.setValue(src.getCode()); + if (src.hasCodeElement()) { + tgt.setValueElement((StringType) VersionConvertor_10_50.convertType(src.getCodeElement())); } return tgt; } @@ -214,9 +210,8 @@ public class ConceptMap10_50 { org.hl7.fhir.dstu2.model.ConceptMap.SourceElementComponent tgt = new org.hl7.fhir.dstu2.model.ConceptMap.SourceElementComponent(); VersionConvertor_10_50.copyElement(src, tgt); tgt.setCodeSystem(g.getSource()); - if (src.hasCode()) { - tgt.setCode(src.getCode()); - } + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu2.model.CodeType) VersionConvertor_10_50.convertType(src.getCodeElement())); if (src.hasNoMap() && src.getNoMap() == true) { tgt.addTarget(new org.hl7.fhir.dstu2.model.ConceptMap.TargetElementComponent().setEquivalence(org.hl7.fhir.dstu2.model.Enumerations.ConceptMapEquivalence.UNMATCHED)); } else { @@ -234,9 +229,8 @@ public class ConceptMap10_50 { for (org.hl7.fhir.dstu2.model.ConceptMap.TargetElementComponent t : src.getTarget()) { org.hl7.fhir.r5.model.ConceptMap.SourceElementComponent tgt = new org.hl7.fhir.r5.model.ConceptMap.SourceElementComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasCode()) { - tgt.setCode(src.getCode()); - } + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.r5.model.CodeType) VersionConvertor_10_50.convertType(src.getCodeElement())); if (t.getEquivalence() == org.hl7.fhir.dstu2.model.Enumerations.ConceptMapEquivalence.UNMATCHED) { tgt.setNoMap(true); } else { @@ -255,14 +249,13 @@ public class ConceptMap10_50 { org.hl7.fhir.dstu2.model.ConceptMap.TargetElementComponent tgt = new org.hl7.fhir.dstu2.model.ConceptMap.TargetElementComponent(); VersionConvertor_10_50.copyElement(src, tgt); tgt.setCodeSystem(g.getTarget()); - if (src.hasCode()) { - tgt.setCode(src.getCode()); - } + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu2.model.CodeType) VersionConvertor_10_50.convertType(src.getCodeElement())); if (src.hasRelationship()) { tgt.setEquivalence(convertConceptMapEquivalence(src.getRelationship())); } - if (src.hasComment()) { - tgt.setComments(src.getComment()); + if (src.hasCommentElement()) { + tgt.setCommentsElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getCommentElement())); } if (src.hasDependsOn()) { for (org.hl7.fhir.r5.model.ConceptMap.OtherElementComponent t : src.getDependsOn()) tgt.addDependsOn(convertOtherElementComponent(t)); @@ -278,14 +271,13 @@ public class ConceptMap10_50 { return null; org.hl7.fhir.r5.model.ConceptMap.TargetElementComponent tgt = new org.hl7.fhir.r5.model.ConceptMap.TargetElementComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasCode()) { - tgt.setCode(src.getCode()); - } + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.r5.model.CodeType) VersionConvertor_10_50.convertType(src.getCodeElement())); if (src.hasEquivalence()) { tgt.setRelationship(convertConceptMapRelationship(src.getEquivalence())); } - if (src.hasComments()) { - tgt.setComment(src.getComments()); + if (src.hasCommentsElement()) { + tgt.setCommentElement((StringType) VersionConvertor_10_50.convertType(src.getCommentsElement())); } if (src.hasDependsOn()) { for (org.hl7.fhir.dstu2.model.ConceptMap.OtherElementComponent t : src.getDependsOn()) tgt.addDependsOn(convertOtherElementComponent(t)); diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Condition10_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Condition10_50.java index 202da162b..a59062ff3 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Condition10_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Condition10_50.java @@ -1,7 +1,11 @@ package org.hl7.fhir.convertors.conv10_50; import org.hl7.fhir.convertors.VersionConvertor_10_50; +import org.hl7.fhir.dstu2.model.DateType; import org.hl7.fhir.exceptions.FHIRException; +import org.hl7.fhir.r5.model.DateTimeType; + +import java.util.Collections; public class Condition10_50 { @@ -22,8 +26,8 @@ public class Condition10_50 { if (src.hasAsserter()) { tgt.setAsserter(VersionConvertor_10_50.convertReference(src.getAsserter())); } - if (src.hasRecordedDate()) - tgt.setDateRecorded(src.getRecordedDate()); + if (src.hasRecordedDateElement()) + tgt.setDateRecordedElement((DateType) VersionConvertor_10_50.convertType(src.getRecordedDateElement())); if (src.hasCode()) { tgt.setCode(VersionConvertor_10_50.convertCodeableConcept(src.getCode())); } @@ -73,8 +77,8 @@ public class Condition10_50 { if (src.hasAsserter()) { tgt.setAsserter(VersionConvertor_10_50.convertReference(src.getAsserter())); } - if (src.hasDateRecorded()) - tgt.setRecordedDate(src.getDateRecorded()); + if (src.hasDateRecordedElement()) + tgt.setRecordedDateElement((DateTimeType) VersionConvertor_10_50.convertType(src.getDateRecordedElement())); if (src.hasCode()) { tgt.setCode(VersionConvertor_10_50.convertCodeableConcept(src.getCode())); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Conformance10_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Conformance10_50.java index 30d60f861..9048089cb 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Conformance10_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Conformance10_50.java @@ -2,10 +2,15 @@ package org.hl7.fhir.convertors.conv10_50; import org.hl7.fhir.convertors.VersionConvertorConstants; import org.hl7.fhir.convertors.VersionConvertor_10_50; +import org.hl7.fhir.dstu2.model.DateTimeType; +import org.hl7.fhir.dstu2.model.UriType; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r5.model.CapabilityStatement.CapabilityStatementRestComponent; import org.hl7.fhir.r5.model.CapabilityStatement.CapabilityStatementRestResourceComponent; import org.hl7.fhir.r5.model.CapabilityStatement.SystemRestfulInteraction; +import org.hl7.fhir.r5.model.UrlType; + +import java.util.Collections; public class Conformance10_50 { @@ -44,37 +49,31 @@ public class Conformance10_50 { return null; org.hl7.fhir.dstu2.model.Conformance tgt = new org.hl7.fhir.dstu2.model.Conformance(); VersionConvertor_10_50.copyDomainResource(src, tgt, "http://hl7.org/fhir/3.0/StructureDefinition/extension-CapabilityStatement.acceptUnknown"); - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } - if (src.hasVersion()) { - tgt.setVersion(src.getVersion()); - } - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_50.convertType(src.getUrlElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_10_50.convertConformanceResourceStatus(src.getStatus())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) { - tgt.setPublisher(src.getPublisher()); - } + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_50.convertType(src.getExperimentalElement())); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_50.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.r5.model.ContactDetail t : src.getContact()) tgt.addContact(convertConformanceContactComponent(t)); } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getDescriptionElement())); if (src.hasPurpose()) { tgt.setRequirements(src.getPurpose()); } - if (src.hasCopyright()) { - tgt.setCopyright(src.getCopyright()); - } + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getCopyrightElement())); if (src.hasKind()) { tgt.setKind(convertConformanceStatementKind(src.getKind())); } @@ -110,25 +109,21 @@ public class Conformance10_50 { return null; org.hl7.fhir.r5.model.CapabilityStatement tgt = new org.hl7.fhir.r5.model.CapabilityStatement(); VersionConvertor_10_50.copyDomainResource(src, tgt); - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } - if (src.hasVersion()) { - tgt.setVersion(src.getVersion()); - } - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r5.model.UriType) VersionConvertor_10_50.convertType(src.getUrlElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_10_50.convertConformanceResourceStatus(src.getStatus())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) { - tgt.setPublisher(src.getPublisher()); - } + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_10_50.convertType(src.getExperimentalElement())); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.r5.model.DateTimeType) VersionConvertor_10_50.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu2.model.Conformance.ConformanceContactComponent t : src.getContact()) tgt.addContact(convertConformanceContactComponent(t)); } @@ -175,9 +170,8 @@ public class Conformance10_50 { return null; org.hl7.fhir.dstu2.model.Conformance.ConformanceContactComponent tgt = new org.hl7.fhir.dstu2.model.Conformance.ConformanceContactComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.r5.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_50.convertContactPoint(t)); } @@ -189,9 +183,8 @@ public class Conformance10_50 { return null; org.hl7.fhir.r5.model.ContactDetail tgt = new org.hl7.fhir.r5.model.ContactDetail(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_50.convertContactPoint(t)); } @@ -237,12 +230,10 @@ public class Conformance10_50 { return null; org.hl7.fhir.dstu2.model.Conformance.ConformanceImplementationComponent tgt = new org.hl7.fhir.dstu2.model.Conformance.ConformanceImplementationComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getDescriptionElement())); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_50.convertType(src.getUrlElement())); return tgt; } @@ -251,9 +242,8 @@ public class Conformance10_50 { return null; org.hl7.fhir.r5.model.CapabilityStatement.CapabilityStatementImplementationComponent tgt = new org.hl7.fhir.r5.model.CapabilityStatement.CapabilityStatementImplementationComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getDescriptionElement())); if (src.hasUrl()) { tgt.setUrl(src.getUrl()); } @@ -342,8 +332,8 @@ public class Conformance10_50 { if (src.hasProtocol()) { tgt.setProtocol(VersionConvertor_10_50.convertCoding(src.getProtocol())); } - if (src.hasAddress()) { - tgt.setAddress(src.getAddress()); + if (src.hasAddressElement()) { + tgt.setAddressElement((UrlType) VersionConvertor_10_50.convertType(src.getAddressElement())); } return tgt; } @@ -356,8 +346,8 @@ public class Conformance10_50 { if (src.hasProtocol()) { tgt.setProtocol(VersionConvertor_10_50.convertCoding(src.getProtocol())); } - if (src.hasAddress()) { - tgt.setAddress(src.getAddress()); + if (src.hasAddressElement()) { + tgt.setAddressElement((UriType) VersionConvertor_10_50.convertType(src.getAddressElement())); } return tgt; } @@ -444,9 +434,8 @@ public class Conformance10_50 { return null; org.hl7.fhir.dstu2.model.Conformance.ConformanceRestOperationComponent tgt = new org.hl7.fhir.dstu2.model.Conformance.ConformanceRestOperationComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getNameElement())); if (src.hasDefinitionElement()) { tgt.setDefinition(VersionConvertor_10_50.convertCanonicalToReference(src.getDefinitionElement())); } @@ -458,9 +447,8 @@ public class Conformance10_50 { return null; org.hl7.fhir.r5.model.CapabilityStatement.CapabilityStatementRestResourceOperationComponent tgt = new org.hl7.fhir.r5.model.CapabilityStatement.CapabilityStatementRestResourceOperationComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getNameElement())); if (src.hasDefinition()) { tgt.setDefinitionElement(VersionConvertor_10_50.convertReferenceToCanonical(src.getDefinition())); } @@ -561,9 +549,8 @@ public class Conformance10_50 { return null; org.hl7.fhir.r5.model.CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent tgt = new org.hl7.fhir.r5.model.CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getNameElement())); if (src.hasDefinition()) { tgt.setDefinition(src.getDefinition()); } @@ -581,9 +568,8 @@ public class Conformance10_50 { return null; org.hl7.fhir.dstu2.model.Conformance.ConformanceRestResourceSearchParamComponent tgt = new org.hl7.fhir.dstu2.model.Conformance.ConformanceRestResourceSearchParamComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getNameElement())); if (src.hasDefinition()) { tgt.setDefinition(src.getDefinition()); } @@ -624,9 +610,8 @@ public class Conformance10_50 { if (src.hasService()) { for (org.hl7.fhir.r5.model.CodeableConcept t : src.getService()) tgt.addService(VersionConvertor_10_50.convertCodeableConcept(t)); } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getDescriptionElement())); return tgt; } @@ -635,14 +620,12 @@ public class Conformance10_50 { return null; org.hl7.fhir.dstu2.model.Conformance.ConformanceSoftwareComponent tgt = new org.hl7.fhir.dstu2.model.Conformance.ConformanceSoftwareComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasVersion()) { - tgt.setVersion(src.getVersion()); - } - if (src.hasReleaseDate()) { - tgt.setReleaseDate(src.getReleaseDate()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getNameElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getVersionElement())); + if (src.hasReleaseDateElement()) { + tgt.setReleaseDateElement((DateTimeType) VersionConvertor_10_50.convertType(src.getReleaseDateElement())); } return tgt; } @@ -652,14 +635,12 @@ public class Conformance10_50 { return null; org.hl7.fhir.r5.model.CapabilityStatement.CapabilityStatementSoftwareComponent tgt = new org.hl7.fhir.r5.model.CapabilityStatement.CapabilityStatementSoftwareComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasVersion()) { - tgt.setVersion(src.getVersion()); - } - if (src.hasReleaseDate()) { - tgt.setReleaseDate(src.getReleaseDate()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getNameElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getVersionElement())); + if (src.hasReleaseDateElement()) { + tgt.setReleaseDateElement((org.hl7.fhir.r5.model.DateTimeType) VersionConvertor_10_50.convertType(src.getReleaseDateElement())); } return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/DataElement10_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/DataElement10_50.java index efc10ee98..9fcee0910 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/DataElement10_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/DataElement10_50.java @@ -2,10 +2,16 @@ package org.hl7.fhir.convertors.conv10_50; import org.hl7.fhir.convertors.VersionConvertor_10_50; import org.hl7.fhir.exceptions.FHIRException; +import org.hl7.fhir.r5.model.BooleanType; +import org.hl7.fhir.r5.model.DateTimeType; +import org.hl7.fhir.r5.model.StringType; import org.hl7.fhir.r5.model.StructureDefinition.StructureDefinitionKind; import org.hl7.fhir.r5.model.StructureDefinition.TypeDerivationRule; +import org.hl7.fhir.r5.model.UriType; + import java.util.ArrayList; import java.util.List; +import java.util.Collections; public class DataElement10_50 { @@ -19,21 +25,21 @@ public class DataElement10_50 { if (src.hasIdentifier()) { for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_50.convertIdentifier(t)); } - if (src.hasVersion()) { - tgt.setVersion(src.getVersion()); + if (src.hasVersionElement()) { + tgt.setVersionElement((StringType) VersionConvertor_10_50.convertType(src.getVersionElement())); } if (src.hasStatus()) { tgt.setStatus(VersionConvertor_10_50.convertConformanceResourceStatus(src.getStatus())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasPublisher()) { - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((BooleanType) VersionConvertor_10_50.convertType(src.getExperimentalElement())); + if (src.hasPublisherElement()) { + tgt.setPublisherElement((StringType) VersionConvertor_10_50.convertType(src.getPublisherElement())); } - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasName()) { - tgt.setName(src.getName()); + if (src.hasDateElement()) + tgt.setDateElement((DateTimeType) VersionConvertor_10_50.convertType(src.getDateElement())); + if (src.hasNameElement()) { + tgt.setNameElement((StringType) VersionConvertor_10_50.convertType(src.getNameElement())); } if (src.hasContact()) { for (org.hl7.fhir.dstu2.model.DataElement.DataElementContactComponent t : src.getContact()) tgt.addContact(convertDataElementContactComponent(t)); @@ -69,8 +75,8 @@ public class DataElement10_50 { return null; org.hl7.fhir.dstu2.model.DataElement.DataElementContactComponent tgt = new org.hl7.fhir.dstu2.model.DataElement.DataElementContactComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); + if (src.hasNameElement()) { + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getNameElement())); } if (src.hasTelecom()) { for (org.hl7.fhir.r5.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_50.convertContactPoint(t)); @@ -83,8 +89,8 @@ public class DataElement10_50 { return null; org.hl7.fhir.r5.model.ContactDetail tgt = new org.hl7.fhir.r5.model.ContactDetail(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); + if (src.hasNameElement()) { + tgt.setNameElement((StringType) VersionConvertor_10_50.convertType(src.getNameElement())); } if (src.hasTelecom()) { for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_50.convertContactPoint(t)); @@ -100,14 +106,14 @@ public class DataElement10_50 { if (src.hasIdentity()) { tgt.setIdentity(src.getIdentity()); } - if (src.hasUri()) { - tgt.setUri(src.getUri()); + if (src.hasUriElement()) { + tgt.setUriElement((UriType) VersionConvertor_10_50.convertType(src.getUriElement())); } - if (src.hasName()) { - tgt.setName(src.getName()); + if (src.hasNameElement()) { + tgt.setNameElement((StringType) VersionConvertor_10_50.convertType(src.getNameElement())); } - if (src.hasComments()) { - tgt.setComment(src.getComments()); + if (src.hasCommentsElement()) { + tgt.setCommentElement((StringType) VersionConvertor_10_50.convertType(src.getCommentsElement())); } return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/DetectedIssue10_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/DetectedIssue10_50.java index 6fa10d49c..56699ce52 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/DetectedIssue10_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/DetectedIssue10_50.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_50; import org.hl7.fhir.convertors.VersionConvertor_10_50; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class DetectedIssue10_50 { @@ -22,9 +23,8 @@ public class DetectedIssue10_50 { if (src.hasImplicated()) { for (org.hl7.fhir.r5.model.Reference t : src.getImplicated()) tgt.addImplicated(VersionConvertor_10_50.convertReference(t)); } - if (src.hasDetail()) { - tgt.setDetail(src.getDetail()); - } + if (src.hasDetailElement()) + tgt.setDetailElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getDetailElement())); if (src.hasIdentifiedDateTimeType()) tgt.setDateElement(VersionConvertor_10_50.convertDateTime(src.getIdentifiedDateTimeType())); if (src.hasAuthor()) { @@ -33,9 +33,8 @@ public class DetectedIssue10_50 { if (src.hasIdentifier()) { tgt.setIdentifier(VersionConvertor_10_50.convertIdentifier(src.getIdentifierFirstRep())); } - if (src.hasReference()) { - tgt.setReference(src.getReference()); - } + if (src.hasReferenceElement()) + tgt.setReferenceElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_50.convertType(src.getReferenceElement())); if (src.hasMitigation()) { for (org.hl7.fhir.r5.model.DetectedIssue.DetectedIssueMitigationComponent t : src.getMitigation()) tgt.addMitigation(convertDetectedIssueMitigationComponent(t)); } @@ -59,9 +58,8 @@ public class DetectedIssue10_50 { if (src.hasImplicated()) { for (org.hl7.fhir.dstu2.model.Reference t : src.getImplicated()) tgt.addImplicated(VersionConvertor_10_50.convertReference(t)); } - if (src.hasDetail()) { - tgt.setDetail(src.getDetail()); - } + if (src.hasDetailElement()) + tgt.setDetailElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getDetailElement())); if (src.hasDate()) tgt.setIdentified(VersionConvertor_10_50.convertDateTime(src.getDateElement())); if (src.hasAuthor()) { @@ -70,9 +68,8 @@ public class DetectedIssue10_50 { if (src.hasIdentifier()) { tgt.addIdentifier(VersionConvertor_10_50.convertIdentifier(src.getIdentifier())); } - if (src.hasReference()) { - tgt.setReference(src.getReference()); - } + if (src.hasReferenceElement()) + tgt.setReferenceElement((org.hl7.fhir.r5.model.UriType) VersionConvertor_10_50.convertType(src.getReferenceElement())); if (src.hasMitigation()) { for (org.hl7.fhir.dstu2.model.DetectedIssue.DetectedIssueMitigationComponent t : src.getMitigation()) tgt.addMitigation(convertDetectedIssueMitigationComponent(t)); } @@ -87,8 +84,8 @@ public class DetectedIssue10_50 { if (src.hasAction()) { tgt.setAction(VersionConvertor_10_50.convertCodeableConcept(src.getAction())); } - if (src.hasDate()) - tgt.setDate(src.getDate()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_50.convertType(src.getDateElement())); if (src.hasAuthor()) { tgt.setAuthor(VersionConvertor_10_50.convertReference(src.getAuthor())); } @@ -103,8 +100,8 @@ public class DetectedIssue10_50 { if (src.hasAction()) { tgt.setAction(VersionConvertor_10_50.convertCodeableConcept(src.getAction())); } - if (src.hasDate()) - tgt.setDate(src.getDate()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.r5.model.DateTimeType) VersionConvertor_10_50.convertType(src.getDateElement())); if (src.hasAuthor()) { tgt.setAuthor(VersionConvertor_10_50.convertReference(src.getAuthor())); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/DeviceMetric10_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/DeviceMetric10_50.java index 9a41fcb23..c2ae47b88 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/DeviceMetric10_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/DeviceMetric10_50.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_50; import org.hl7.fhir.convertors.VersionConvertor_10_50; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class DeviceMetric10_50 { @@ -92,9 +93,8 @@ public class DeviceMetric10_50 { if (src.hasState()) { tgt.setState(convertDeviceMetricCalibrationState(src.getState())); } - if (src.hasTime()) { - tgt.setTime(src.getTime()); - } + if (src.hasTimeElement()) + tgt.setTimeElement((org.hl7.fhir.r5.model.InstantType) VersionConvertor_10_50.convertType(src.getTimeElement())); return tgt; } @@ -109,9 +109,8 @@ public class DeviceMetric10_50 { if (src.hasState()) { tgt.setState(convertDeviceMetricCalibrationState(src.getState())); } - if (src.hasTime()) { - tgt.setTime(src.getTime()); - } + if (src.hasTimeElement()) + tgt.setTimeElement((org.hl7.fhir.dstu2.model.InstantType) VersionConvertor_10_50.convertType(src.getTimeElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/DeviceUseStatement10_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/DeviceUseStatement10_50.java index 7bc8c6e30..d836e7e36 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/DeviceUseStatement10_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/DeviceUseStatement10_50.java @@ -4,6 +4,7 @@ import org.hl7.fhir.convertors.VersionConvertor_10_50; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r5.model.Annotation; import org.hl7.fhir.r5.model.CodeableReference; +import java.util.Collections; public class DeviceUseStatement10_50 { @@ -26,9 +27,8 @@ public class DeviceUseStatement10_50 { if (src.hasNotes()) { for (org.hl7.fhir.dstu2.model.StringType t : src.getNotes()) tgt.addNote().setText(t.getValue()); } - if (src.hasRecordedOn()) { - tgt.setRecordedOn(src.getRecordedOn()); - } + if (src.hasRecordedOnElement()) + tgt.setRecordedOnElement((org.hl7.fhir.r5.model.DateTimeType) VersionConvertor_10_50.convertType(src.getRecordedOnElement())); if (src.hasSubject()) { tgt.setSubject(VersionConvertor_10_50.convertReference(src.getSubject())); } @@ -57,9 +57,8 @@ public class DeviceUseStatement10_50 { if (src.hasNote()) { for (Annotation t : src.getNote()) tgt.addNotes(t.getText()); } - if (src.hasRecordedOn()) { - tgt.setRecordedOn(src.getRecordedOn()); - } + if (src.hasRecordedOnElement()) + tgt.setRecordedOnElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_50.convertType(src.getRecordedOnElement())); if (src.hasSubject()) { tgt.setSubject(VersionConvertor_10_50.convertReference(src.getSubject())); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/DiagnosticReport10_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/DiagnosticReport10_50.java index ca46f5c76..96d75fa2c 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/DiagnosticReport10_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/DiagnosticReport10_50.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_50; import org.hl7.fhir.convertors.VersionConvertor_10_50; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class DiagnosticReport10_50 { @@ -31,9 +32,8 @@ public class DiagnosticReport10_50 { if (src.hasEffective()) { tgt.setEffective(VersionConvertor_10_50.convertType(src.getEffective())); } - if (src.hasIssued()) { - tgt.setIssued(src.getIssued()); - } + if (src.hasIssuedElement()) + tgt.setIssuedElement((org.hl7.fhir.r5.model.InstantType) VersionConvertor_10_50.convertType(src.getIssuedElement())); if (src.hasSpecimen()) { for (org.hl7.fhir.dstu2.model.Reference t : src.getSpecimen()) tgt.addSpecimen(VersionConvertor_10_50.convertReference(t)); } @@ -46,9 +46,8 @@ public class DiagnosticReport10_50 { if (src.hasImage()) { for (org.hl7.fhir.dstu2.model.DiagnosticReport.DiagnosticReportImageComponent t : src.getImage()) tgt.addMedia(convertDiagnosticReportImageComponent(t)); } - if (src.hasConclusion()) { - tgt.setConclusion(src.getConclusion()); - } + if (src.hasConclusionElement()) + tgt.setConclusionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getConclusionElement())); if (src.hasCodedDiagnosis()) { for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getCodedDiagnosis()) tgt.addConclusionCode(VersionConvertor_10_50.convertCodeableConcept(t)); } @@ -84,9 +83,8 @@ public class DiagnosticReport10_50 { if (src.hasEffective()) { tgt.setEffective(VersionConvertor_10_50.convertType(src.getEffective())); } - if (src.hasIssued()) { - tgt.setIssued(src.getIssued()); - } + if (src.hasIssuedElement()) + tgt.setIssuedElement((org.hl7.fhir.dstu2.model.InstantType) VersionConvertor_10_50.convertType(src.getIssuedElement())); if (src.hasSpecimen()) { for (org.hl7.fhir.r5.model.Reference t : src.getSpecimen()) tgt.addSpecimen(VersionConvertor_10_50.convertReference(t)); } @@ -99,9 +97,8 @@ public class DiagnosticReport10_50 { if (src.hasMedia()) { for (org.hl7.fhir.r5.model.DiagnosticReport.DiagnosticReportMediaComponent t : src.getMedia()) tgt.addImage(convertDiagnosticReportImageComponent(t)); } - if (src.hasConclusion()) { - tgt.setConclusion(src.getConclusion()); - } + if (src.hasConclusionElement()) + tgt.setConclusionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getConclusionElement())); if (src.hasConclusionCode()) { for (org.hl7.fhir.r5.model.CodeableConcept t : src.getConclusionCode()) tgt.addCodedDiagnosis(VersionConvertor_10_50.convertCodeableConcept(t)); } @@ -116,9 +113,8 @@ public class DiagnosticReport10_50 { return null; org.hl7.fhir.r5.model.DiagnosticReport.DiagnosticReportMediaComponent tgt = new org.hl7.fhir.r5.model.DiagnosticReport.DiagnosticReportMediaComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasComment()) { - tgt.setComment(src.getComment()); - } + if (src.hasCommentElement()) + tgt.setCommentElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getCommentElement())); if (src.hasLink()) { tgt.setLink(VersionConvertor_10_50.convertReference(src.getLink())); } @@ -130,9 +126,8 @@ public class DiagnosticReport10_50 { return null; org.hl7.fhir.dstu2.model.DiagnosticReport.DiagnosticReportImageComponent tgt = new org.hl7.fhir.dstu2.model.DiagnosticReport.DiagnosticReportImageComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasComment()) { - tgt.setComment(src.getComment()); - } + if (src.hasCommentElement()) + tgt.setCommentElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getCommentElement())); if (src.hasLink()) { tgt.setLink(VersionConvertor_10_50.convertReference(src.getLink())); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/DocumentReference10_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/DocumentReference10_50.java index ff7f464c0..e0fbe018f 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/DocumentReference10_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/DocumentReference10_50.java @@ -2,7 +2,11 @@ package org.hl7.fhir.convertors.conv10_50; import org.hl7.fhir.convertors.VersionConvertor_10_50; import org.hl7.fhir.dstu2.model.CodeableConcept; +import org.hl7.fhir.dstu2.model.DateTimeType; import org.hl7.fhir.exceptions.FHIRException; +import org.hl7.fhir.r5.model.InstantType; + +import java.util.Collections; public class DocumentReference10_50 { @@ -65,8 +69,8 @@ public class DocumentReference10_50 { if (src.hasAuthenticator()) { tgt.setAuthenticator(VersionConvertor_10_50.convertReference(src.getAuthenticator())); } - if (src.hasDate()) { - tgt.setCreated(src.getDate()); + if (src.hasDateElement()) { + tgt.setCreatedElement((DateTimeType) VersionConvertor_10_50.convertType(src.getDateElement())); } if (src.hasStatus()) { tgt.setStatus(convertDocumentReferenceStatus(src.getStatus())); @@ -77,9 +81,8 @@ public class DocumentReference10_50 { if (src.hasRelatesTo()) { for (org.hl7.fhir.r5.model.DocumentReference.DocumentReferenceRelatesToComponent t : src.getRelatesTo()) tgt.addRelatesTo(convertDocumentReferenceRelatesToComponent(t)); } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getDescriptionElement())); if (src.hasSecurityLabel()) { for (org.hl7.fhir.r5.model.CodeableConcept t : src.getSecurityLabel()) tgt.addSecurityLabel(VersionConvertor_10_50.convertCodeableConcept(t)); } @@ -118,8 +121,8 @@ public class DocumentReference10_50 { if (src.hasAuthenticator()) { tgt.setAuthenticator(VersionConvertor_10_50.convertReference(src.getAuthenticator())); } - if (src.hasCreated()) { - tgt.setDate(src.getCreated()); + if (src.hasCreatedElement()) { + tgt.setDateElement((InstantType) VersionConvertor_10_50.convertType(src.getCreatedElement())); } if (src.hasStatus()) { tgt.setStatus(convertDocumentReferenceStatus(src.getStatus())); @@ -130,9 +133,8 @@ public class DocumentReference10_50 { if (src.hasRelatesTo()) { for (org.hl7.fhir.dstu2.model.DocumentReference.DocumentReferenceRelatesToComponent t : src.getRelatesTo()) tgt.addRelatesTo(convertDocumentReferenceRelatesToComponent(t)); } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getDescriptionElement())); if (src.hasSecurityLabel()) { for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getSecurityLabel()) tgt.addSecurityLabel(VersionConvertor_10_50.convertCodeableConcept(t)); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Encounter10_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Encounter10_50.java index dc2dea5e8..c68f40f83 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Encounter10_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Encounter10_50.java @@ -3,6 +3,7 @@ package org.hl7.fhir.convertors.conv10_50; import org.hl7.fhir.convertors.VersionConvertor_10_50; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r5.model.CodeableReference; +import java.util.Collections; public class Encounter10_50 { diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/EnrollmentRequest10_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/EnrollmentRequest10_50.java index c19e92b78..15b73fc6f 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/EnrollmentRequest10_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/EnrollmentRequest10_50.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_50; import org.hl7.fhir.convertors.VersionConvertor_10_50; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class EnrollmentRequest10_50 { @@ -13,9 +14,8 @@ public class EnrollmentRequest10_50 { if (src.hasIdentifier()) { for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_50.convertIdentifier(t)); } - if (src.hasCreated()) { - tgt.setCreated(src.getCreated()); - } + if (src.hasCreatedElement()) + tgt.setCreatedElement((org.hl7.fhir.r5.model.DateTimeType) VersionConvertor_10_50.convertType(src.getCreatedElement())); if (src.hasProvider()) { tgt.setProvider(VersionConvertor_10_50.convertReference(src.getProvider())); } @@ -36,9 +36,8 @@ public class EnrollmentRequest10_50 { if (src.hasIdentifier()) { for (org.hl7.fhir.r5.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_50.convertIdentifier(t)); } - if (src.hasCreated()) { - tgt.setCreated(src.getCreated()); - } + if (src.hasCreatedElement()) + tgt.setCreatedElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_50.convertType(src.getCreatedElement())); if (src.hasCoverage()) { tgt.setCoverage(VersionConvertor_10_50.convertReference(src.getCoverage())); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/EnrollmentResponse10_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/EnrollmentResponse10_50.java index 696ccc8ab..9fe076fac 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/EnrollmentResponse10_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/EnrollmentResponse10_50.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_50; import org.hl7.fhir.convertors.VersionConvertor_10_50; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class EnrollmentResponse10_50 { @@ -13,12 +14,10 @@ public class EnrollmentResponse10_50 { if (src.hasIdentifier()) { for (org.hl7.fhir.r5.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_50.convertIdentifier(t)); } - if (src.hasDisposition()) { - tgt.setDisposition(src.getDisposition()); - } - if (src.hasCreated()) { - tgt.setCreated(src.getCreated()); - } + if (src.hasDispositionElement()) + tgt.setDispositionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getDispositionElement())); + if (src.hasCreatedElement()) + tgt.setCreatedElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_50.convertType(src.getCreatedElement())); return tgt; } @@ -33,12 +32,10 @@ public class EnrollmentResponse10_50 { if (src.hasRequest()) { tgt.setRequest(VersionConvertor_10_50.convertReference(src.getRequest())); } - if (src.hasDisposition()) { - tgt.setDisposition(src.getDisposition()); - } - if (src.hasCreated()) { - tgt.setCreated(src.getCreated()); - } + if (src.hasDispositionElement()) + tgt.setDispositionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getDispositionElement())); + if (src.hasCreatedElement()) + tgt.setCreatedElement((org.hl7.fhir.r5.model.DateTimeType) VersionConvertor_10_50.convertType(src.getCreatedElement())); if (src.hasOrganization()) { tgt.setOrganization(VersionConvertor_10_50.convertReference(src.getOrganization())); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/EpisodeOfCare10_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/EpisodeOfCare10_50.java index ea25c5457..852018b3e 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/EpisodeOfCare10_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/EpisodeOfCare10_50.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_50; import org.hl7.fhir.convertors.VersionConvertor_10_50; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class EpisodeOfCare10_50 { diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/FamilyMemberHistory10_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/FamilyMemberHistory10_50.java index 84c72cbc1..c8b775646 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/FamilyMemberHistory10_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/FamilyMemberHistory10_50.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_50; import org.hl7.fhir.convertors.VersionConvertor_10_50; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class FamilyMemberHistory10_50 { @@ -50,14 +51,13 @@ public class FamilyMemberHistory10_50 { if (src.hasPatient()) { tgt.setPatient(VersionConvertor_10_50.convertReference(src.getPatient())); } - if (src.hasDate()) - tgt.setDate(src.getDate()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.r5.model.DateTimeType) VersionConvertor_10_50.convertType(src.getDateElement())); if (src.hasStatus()) { tgt.setStatus(convertFamilyHistoryStatus(src.getStatus())); } - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getNameElement())); if (src.hasRelationship()) { tgt.setRelationship(VersionConvertor_10_50.convertCodeableConcept(src.getRelationship())); } @@ -87,14 +87,13 @@ public class FamilyMemberHistory10_50 { if (src.hasPatient()) { tgt.setPatient(VersionConvertor_10_50.convertReference(src.getPatient())); } - if (src.hasDate()) - tgt.setDate(src.getDate()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_50.convertType(src.getDateElement())); if (src.hasStatus()) { tgt.setStatus(convertFamilyHistoryStatus(src.getStatus())); } - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getNameElement())); if (src.hasRelationship()) { tgt.setRelationship(VersionConvertor_10_50.convertCodeableConcept(src.getRelationship())); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Flag10_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Flag10_50.java index a731c823d..7d5483176 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Flag10_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Flag10_50.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_50; import org.hl7.fhir.convertors.VersionConvertor_10_50; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Flag10_50 { diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Group10_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Group10_50.java index 4efec57dd..cd9c39c9d 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Group10_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Group10_50.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_50; import org.hl7.fhir.convertors.VersionConvertor_10_50; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Group10_50 { @@ -16,18 +17,15 @@ public class Group10_50 { if (src.hasType()) { tgt.setType(convertGroupType(src.getType())); } - if (src.hasActual()) { - tgt.setActual(src.getActual()); - } + if (src.hasActualElement()) + tgt.setActualElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_50.convertType(src.getActualElement())); if (src.hasCode()) { tgt.setCode(VersionConvertor_10_50.convertCodeableConcept(src.getCode())); } - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasQuantity()) { - tgt.setQuantity(src.getQuantity()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getNameElement())); + if (src.hasQuantityElement()) + tgt.setQuantityElement((org.hl7.fhir.dstu2.model.UnsignedIntType) VersionConvertor_10_50.convertType(src.getQuantityElement())); if (src.hasCharacteristic()) { for (org.hl7.fhir.r5.model.Group.GroupCharacteristicComponent t : src.getCharacteristic()) tgt.addCharacteristic(convertGroupCharacteristicComponent(t)); } @@ -48,18 +46,15 @@ public class Group10_50 { if (src.hasType()) { tgt.setType(convertGroupType(src.getType())); } - if (src.hasActual()) { - tgt.setActual(src.getActual()); - } + if (src.hasActualElement()) + tgt.setActualElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_10_50.convertType(src.getActualElement())); if (src.hasCode()) { tgt.setCode(VersionConvertor_10_50.convertCodeableConcept(src.getCode())); } - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasQuantity()) { - tgt.setQuantity(src.getQuantity()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getNameElement())); + if (src.hasQuantityElement()) + tgt.setQuantityElement((org.hl7.fhir.r5.model.UnsignedIntType) VersionConvertor_10_50.convertType(src.getQuantityElement())); if (src.hasCharacteristic()) { for (org.hl7.fhir.dstu2.model.Group.GroupCharacteristicComponent t : src.getCharacteristic()) tgt.addCharacteristic(convertGroupCharacteristicComponent(t)); } @@ -80,9 +75,8 @@ public class Group10_50 { if (src.hasValue()) { tgt.setValue(VersionConvertor_10_50.convertType(src.getValue())); } - if (src.hasExclude()) { - tgt.setExclude(src.getExclude()); - } + if (src.hasExcludeElement()) + tgt.setExcludeElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_50.convertType(src.getExcludeElement())); if (src.hasPeriod()) { tgt.setPeriod(VersionConvertor_10_50.convertPeriod(src.getPeriod())); } @@ -100,9 +94,8 @@ public class Group10_50 { if (src.hasValue()) { tgt.setValue(VersionConvertor_10_50.convertType(src.getValue())); } - if (src.hasExclude()) { - tgt.setExclude(src.getExclude()); - } + if (src.hasExcludeElement()) + tgt.setExcludeElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_10_50.convertType(src.getExcludeElement())); if (src.hasPeriod()) { tgt.setPeriod(VersionConvertor_10_50.convertPeriod(src.getPeriod())); } @@ -120,9 +113,8 @@ public class Group10_50 { if (src.hasPeriod()) { tgt.setPeriod(VersionConvertor_10_50.convertPeriod(src.getPeriod())); } - if (src.hasInactive()) { - tgt.setInactive(src.getInactive()); - } + if (src.hasInactiveElement()) + tgt.setInactiveElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_10_50.convertType(src.getInactiveElement())); return tgt; } @@ -137,9 +129,8 @@ public class Group10_50 { if (src.hasPeriod()) { tgt.setPeriod(VersionConvertor_10_50.convertPeriod(src.getPeriod())); } - if (src.hasInactive()) { - tgt.setInactive(src.getInactive()); - } + if (src.hasInactiveElement()) + tgt.setInactiveElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_50.convertType(src.getInactiveElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/HealthcareService10_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/HealthcareService10_50.java index 287b1398d..1a7749b7a 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/HealthcareService10_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/HealthcareService10_50.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_50; import org.hl7.fhir.convertors.VersionConvertor_10_50; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class HealthcareService10_50 { @@ -70,12 +71,10 @@ public class HealthcareService10_50 { if (src.hasLocation()) { for (org.hl7.fhir.r5.model.Reference t : src.getLocation()) tgt.setLocation(VersionConvertor_10_50.convertReference(t)); } - if (src.hasComment()) { - tgt.setComment(src.getComment()); - } - if (src.hasExtraDetails()) { - tgt.setExtraDetails(src.getExtraDetails()); - } + if (src.hasCommentElement()) + tgt.setCommentElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getCommentElement())); + if (src.hasExtraDetailsElement()) + tgt.setExtraDetailsElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getExtraDetailsElement())); if (src.hasPhoto()) { tgt.setPhoto(VersionConvertor_10_50.convertAttachment(src.getPhoto())); } @@ -102,18 +101,16 @@ public class HealthcareService10_50 { if (src.hasReferralMethod()) { for (org.hl7.fhir.r5.model.CodeableConcept t : src.getReferralMethod()) tgt.addReferralMethod(VersionConvertor_10_50.convertCodeableConcept(t)); } - if (src.hasAppointmentRequired()) { - tgt.setAppointmentRequired(src.getAppointmentRequired()); - } + if (src.hasAppointmentRequiredElement()) + tgt.setAppointmentRequiredElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_50.convertType(src.getAppointmentRequiredElement())); if (src.hasAvailableTime()) { for (org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceAvailableTimeComponent t : src.getAvailableTime()) tgt.addAvailableTime(convertHealthcareServiceAvailableTimeComponent(t)); } if (src.hasNotAvailable()) { for (org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceNotAvailableComponent t : src.getNotAvailable()) tgt.addNotAvailable(convertHealthcareServiceNotAvailableComponent(t)); } - if (src.hasAvailabilityExceptions()) { - tgt.setAvailabilityExceptions(src.getAvailabilityExceptions()); - } + if (src.hasAvailabilityExceptionsElement()) + tgt.setAvailabilityExceptionsElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getAvailabilityExceptionsElement())); return tgt; } @@ -134,12 +131,10 @@ public class HealthcareService10_50 { if (src.hasLocation()) { tgt.addLocation(VersionConvertor_10_50.convertReference(src.getLocation())); } - if (src.hasComment()) { - tgt.setComment(src.getComment()); - } - if (src.hasExtraDetails()) { - tgt.setExtraDetails(src.getExtraDetails()); - } + if (src.hasCommentElement()) + tgt.setCommentElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getCommentElement())); + if (src.hasExtraDetailsElement()) + tgt.setExtraDetailsElement((org.hl7.fhir.r5.model.MarkdownType) VersionConvertor_10_50.convertType(src.getExtraDetailsElement())); if (src.hasPhoto()) { tgt.setPhoto(VersionConvertor_10_50.convertAttachment(src.getPhoto())); } @@ -165,18 +160,16 @@ public class HealthcareService10_50 { if (src.hasReferralMethod()) { for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getReferralMethod()) tgt.addReferralMethod(VersionConvertor_10_50.convertCodeableConcept(t)); } - if (src.hasAppointmentRequired()) { - tgt.setAppointmentRequired(src.getAppointmentRequired()); - } + if (src.hasAppointmentRequiredElement()) + tgt.setAppointmentRequiredElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_10_50.convertType(src.getAppointmentRequiredElement())); if (src.hasAvailableTime()) { for (org.hl7.fhir.dstu2.model.HealthcareService.HealthcareServiceAvailableTimeComponent t : src.getAvailableTime()) tgt.addAvailableTime(convertHealthcareServiceAvailableTimeComponent(t)); } if (src.hasNotAvailable()) { for (org.hl7.fhir.dstu2.model.HealthcareService.HealthcareServiceNotAvailableComponent t : src.getNotAvailable()) tgt.addNotAvailable(convertHealthcareServiceNotAvailableComponent(t)); } - if (src.hasAvailabilityExceptions()) { - tgt.setAvailabilityExceptions(src.getAvailabilityExceptions()); - } + if (src.hasAvailabilityExceptionsElement()) + tgt.setAvailabilityExceptionsElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getAvailabilityExceptionsElement())); return tgt; } @@ -188,15 +181,12 @@ public class HealthcareService10_50 { if (src.hasDaysOfWeek()) { for (org.hl7.fhir.r5.model.Enumeration t : src.getDaysOfWeek()) VersionConvertor_10_50.copyElement(t, tgt.addDaysOfWeekElement().setValue(convertDaysOfWeek(t.getValue()))); } - if (src.hasAllDay()) { - tgt.setAllDay(src.getAllDay()); - } - if (src.hasAvailableStartTime()) { - tgt.setAvailableStartTime(src.getAvailableStartTime()); - } - if (src.hasAvailableEndTime()) { - tgt.setAvailableEndTime(src.getAvailableEndTime()); - } + if (src.hasAllDayElement()) + tgt.setAllDayElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_50.convertType(src.getAllDayElement())); + if (src.hasAvailableStartTimeElement()) + tgt.setAvailableStartTimeElement((org.hl7.fhir.dstu2.model.TimeType) VersionConvertor_10_50.convertType(src.getAvailableStartTimeElement())); + if (src.hasAvailableEndTimeElement()) + tgt.setAvailableEndTimeElement((org.hl7.fhir.dstu2.model.TimeType) VersionConvertor_10_50.convertType(src.getAvailableEndTimeElement())); return tgt; } @@ -208,15 +198,12 @@ public class HealthcareService10_50 { if (src.hasDaysOfWeek()) { for (org.hl7.fhir.dstu2.model.Enumeration t : src.getDaysOfWeek()) VersionConvertor_10_50.copyElement(t, tgt.addDaysOfWeekElement().setValue(convertDaysOfWeek(t.getValue()))); } - if (src.hasAllDay()) { - tgt.setAllDay(src.getAllDay()); - } - if (src.hasAvailableStartTime()) { - tgt.setAvailableStartTime(src.getAvailableStartTime()); - } - if (src.hasAvailableEndTime()) { - tgt.setAvailableEndTime(src.getAvailableEndTime()); - } + if (src.hasAllDayElement()) + tgt.setAllDayElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_10_50.convertType(src.getAllDayElement())); + if (src.hasAvailableStartTimeElement()) + tgt.setAvailableStartTimeElement((org.hl7.fhir.r5.model.TimeType) VersionConvertor_10_50.convertType(src.getAvailableStartTimeElement())); + if (src.hasAvailableEndTimeElement()) + tgt.setAvailableEndTimeElement((org.hl7.fhir.r5.model.TimeType) VersionConvertor_10_50.convertType(src.getAvailableEndTimeElement())); return tgt; } @@ -225,9 +212,8 @@ public class HealthcareService10_50 { return null; org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceNotAvailableComponent tgt = new org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceNotAvailableComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getDescriptionElement())); if (src.hasDuring()) { tgt.setDuring(VersionConvertor_10_50.convertPeriod(src.getDuring())); } @@ -239,9 +225,8 @@ public class HealthcareService10_50 { return null; org.hl7.fhir.dstu2.model.HealthcareService.HealthcareServiceNotAvailableComponent tgt = new org.hl7.fhir.dstu2.model.HealthcareService.HealthcareServiceNotAvailableComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getDescriptionElement())); if (src.hasDuring()) { tgt.setDuring(VersionConvertor_10_50.convertPeriod(src.getDuring())); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/ImplementationGuide10_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/ImplementationGuide10_50.java index 7ce83626e..f85093d5b 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/ImplementationGuide10_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/ImplementationGuide10_50.java @@ -5,7 +5,10 @@ import org.hl7.fhir.dstu2.model.ImplementationGuide.GuidePageKind; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r5.model.Enumeration; import org.hl7.fhir.r5.model.ImplementationGuide.GuidePageGeneration; +import org.hl7.fhir.r5.model.StringType; + import java.util.List; +import java.util.Collections; public class ImplementationGuide10_50 { @@ -14,42 +17,34 @@ public class ImplementationGuide10_50 { return null; org.hl7.fhir.r5.model.ImplementationGuide tgt = new org.hl7.fhir.r5.model.ImplementationGuide(); VersionConvertor_10_50.copyDomainResource(src, tgt); - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } - if (src.hasVersion()) { - tgt.setVersion(src.getVersion()); - } - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r5.model.UriType) VersionConvertor_10_50.convertType(src.getUrlElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_10_50.convertConformanceResourceStatus(src.getStatus())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasPublisher()) { - tgt.setPublisher(src.getPublisher()); - } + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_10_50.convertType(src.getExperimentalElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuideContactComponent t : src.getContact()) tgt.addContact(convertImplementationGuideContactComponent(t)); } - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.r5.model.DateTimeType) VersionConvertor_10_50.convertType(src.getDateElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r5.model.MarkdownType) VersionConvertor_10_50.convertType(src.getDescriptionElement())); for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getUseContext()) if (VersionConvertor_10_50.isJurisdiction(t)) tgt.addJurisdiction(VersionConvertor_10_50.convertCodeableConcept(t)); else tgt.addUseContext(VersionConvertor_10_50.convertCodeableConceptToUsageContext(t)); - if (src.hasCopyright()) { - tgt.setCopyright(src.getCopyright()); - } + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.r5.model.MarkdownType) VersionConvertor_10_50.convertType(src.getCopyrightElement())); if (src.hasFhirVersion()) { - if (src.hasFhirVersion()) { - tgt.addFhirVersion(org.hl7.fhir.r5.model.Enumerations.FHIRVersion.fromCode(src.getFhirVersion())); - } + tgt.addFhirVersion(org.hl7.fhir.r5.model.Enumerations.FHIRVersion.fromCode(src.getFhirVersion())); } if (src.hasDependency()) { for (org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuideDependencyComponent t : src.getDependency()) tgt.addDependsOn(convertImplementationGuideDependencyComponent(t)); @@ -71,39 +66,33 @@ public class ImplementationGuide10_50 { return null; org.hl7.fhir.dstu2.model.ImplementationGuide tgt = new org.hl7.fhir.dstu2.model.ImplementationGuide(); VersionConvertor_10_50.copyDomainResource(src, tgt); - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } - if (src.hasVersion()) { - tgt.setVersion(src.getVersion()); - } - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_50.convertType(src.getUrlElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_10_50.convertConformanceResourceStatus(src.getStatus())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasPublisher()) { - tgt.setPublisher(src.getPublisher()); - } + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_50.convertType(src.getExperimentalElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.r5.model.ContactDetail t : src.getContact()) tgt.addContact(convertImplementationGuideContactComponent(t)); } - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_50.convertType(src.getDateElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getDescriptionElement())); for (org.hl7.fhir.r5.model.UsageContext t : src.getUseContext()) if (t.hasValueCodeableConcept()) tgt.addUseContext(VersionConvertor_10_50.convertCodeableConcept(t.getValueCodeableConcept())); if (src.hasJurisdiction()) { for (org.hl7.fhir.r5.model.CodeableConcept t : src.getJurisdiction()) tgt.addUseContext(VersionConvertor_10_50.convertCodeableConcept(t)); } - if (src.hasCopyright()) { - tgt.setCopyright(src.getCopyright()); - } + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getCopyrightElement())); for (Enumeration v : src.getFhirVersion()) { tgt.setFhirVersion(v.asStringValue()); } @@ -130,9 +119,8 @@ public class ImplementationGuide10_50 { return null; org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuideContactComponent tgt = new org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuideContactComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.r5.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_50.convertContactPoint(t)); } @@ -144,9 +132,8 @@ public class ImplementationGuide10_50 { return null; org.hl7.fhir.r5.model.ContactDetail tgt = new org.hl7.fhir.r5.model.ContactDetail(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_50.convertContactPoint(t)); } @@ -159,9 +146,8 @@ public class ImplementationGuide10_50 { org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuideDependencyComponent tgt = new org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuideDependencyComponent(); VersionConvertor_10_50.copyElement(src, tgt); tgt.setType(org.hl7.fhir.dstu2.model.ImplementationGuide.GuideDependencyType.REFERENCE); - if (src.hasUri()) { - tgt.setUri(src.getUri()); - } + if (src.hasUriElement()) + tgt.setUriElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_50.convertType(src.getUriElement())); return tgt; } @@ -170,9 +156,8 @@ public class ImplementationGuide10_50 { return null; org.hl7.fhir.r5.model.ImplementationGuide.ImplementationGuideDependsOnComponent tgt = new org.hl7.fhir.r5.model.ImplementationGuide.ImplementationGuideDependsOnComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasUri()) { - tgt.setUri(src.getUri()); - } + if (src.hasUriElement()) + tgt.setUriElement((org.hl7.fhir.r5.model.CanonicalType) VersionConvertor_10_50.convertType(src.getUriElement())); return tgt; } @@ -181,9 +166,8 @@ public class ImplementationGuide10_50 { return null; org.hl7.fhir.r5.model.ImplementationGuide.ImplementationGuideGlobalComponent tgt = new org.hl7.fhir.r5.model.ImplementationGuide.ImplementationGuideGlobalComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasType()) { - tgt.setType(src.getType()); - } + if (src.hasTypeElement()) + tgt.setTypeElement((org.hl7.fhir.r5.model.CodeType) VersionConvertor_10_50.convertType(src.getTypeElement())); if (src.hasProfile()) { tgt.setProfileElement(VersionConvertor_10_50.convertReferenceToCanonical(src.getProfile())); } @@ -196,9 +180,8 @@ public class ImplementationGuide10_50 { org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuideGlobalComponent tgt = new org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuideGlobalComponent(); VersionConvertor_10_50.copyElement(src, tgt); if (src.hasType()) { - if (src.hasType()) { - tgt.setType(src.getType()); - } + if (src.hasTypeElement()) + tgt.setTypeElement((org.hl7.fhir.dstu2.model.CodeType) VersionConvertor_10_50.convertType(src.getTypeElement())); } if (src.hasProfileElement()) { tgt.setProfile(VersionConvertor_10_50.convertCanonicalToReference(src.getProfileElement())); @@ -214,12 +197,10 @@ public class ImplementationGuide10_50 { if (src.hasId()) { tgt.setId(src.getId()); } - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getNameElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getDescriptionElement())); return tgt; } @@ -229,10 +210,10 @@ public class ImplementationGuide10_50 { org.hl7.fhir.r5.model.ImplementationGuide.ImplementationGuideDefinitionGroupingComponent tgt = new org.hl7.fhir.r5.model.ImplementationGuide.ImplementationGuideDefinitionGroupingComponent(); tgt.setId("p" + (context.getGrouping().size() + 1)); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasNameElement()) + tgt.setNameElement((StringType) VersionConvertor_10_50.convertType(src.getNameElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((StringType) VersionConvertor_10_50.convertType(src.getDescriptionElement())); for (org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuidePackageResourceComponent t : src.getResource()) { org.hl7.fhir.r5.model.ImplementationGuide.ImplementationGuideDefinitionResourceComponent tn = convertImplementationGuidePackageResourceComponent(t); tn.setGroupingId(tgt.getId()); @@ -248,10 +229,10 @@ public class ImplementationGuide10_50 { VersionConvertor_10_50.copyElement(src, tgt); if (src.hasExampleCanonicalType()) tgt.setExampleFor(VersionConvertor_10_50.convertCanonicalToReference(src.getExampleCanonicalType())); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getNameElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getDescriptionElement())); if (src.hasReference()) tgt.setSource(VersionConvertor_10_50.convertReference(src.getReference())); return tgt; @@ -264,10 +245,10 @@ public class ImplementationGuide10_50 { VersionConvertor_10_50.copyElement(src, tgt); if (src.hasExampleFor()) tgt.setExample(VersionConvertor_10_50.convertReferenceToCanonical(src.getExampleFor())); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getNameElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getDescriptionElement())); if (src.hasSourceReference()) tgt.setReference(VersionConvertor_10_50.convertReference(src.getSourceReference())); else if (src.hasSourceUriType()) @@ -285,8 +266,8 @@ public class ImplementationGuide10_50 { tgt.setName(convertUriToUrl(src.getSourceElement())); } } - if (src.hasName()) { - tgt.setTitle(src.getName()); + if (src.hasNameElement()) { + tgt.setTitleElement((StringType) VersionConvertor_10_50.convertType(src.getNameElement())); } if (src.hasKind()) tgt.setGeneration(convertPageGeneration(src.getKind())); @@ -303,8 +284,8 @@ public class ImplementationGuide10_50 { VersionConvertor_10_50.copyElement(src, tgt); if (src.hasNameUrlType()) tgt.setSource(src.getNameUrlType().getValue()); - if (src.hasTitle()) { - tgt.setName(src.getTitle()); + if (src.hasTitleElement()) { + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getTitleElement())); } if (src.hasGeneration()) tgt.setKind(convertPageGeneration(src.getGeneration())); diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/List10_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/List10_50.java index 9c43d90c2..b4bf1d1ba 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/List10_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/List10_50.java @@ -1,7 +1,11 @@ package org.hl7.fhir.convertors.conv10_50; import org.hl7.fhir.convertors.VersionConvertor_10_50; +import org.hl7.fhir.dstu2.model.BooleanType; +import org.hl7.fhir.dstu2.model.DateTimeType; +import org.hl7.fhir.dstu2.model.StringType; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class List10_50 { @@ -13,8 +17,8 @@ public class List10_50 { if (src.hasIdentifier()) { for (org.hl7.fhir.r5.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_50.convertIdentifier(t)); } - if (src.hasTitle()) { - tgt.setTitle(src.getTitle()); + if (src.hasTitleElement()) { + tgt.setTitleElement((StringType) VersionConvertor_10_50.convertType(src.getTitleElement())); } if (src.hasCode()) { tgt.setCode(VersionConvertor_10_50.convertCodeableConcept(src.getCode())); @@ -31,8 +35,8 @@ public class List10_50 { if (src.hasStatus()) { tgt.setStatus(convertListStatus(src.getStatus())); } - if (src.hasDate()) - tgt.setDate(src.getDate()); + if (src.hasDateElement()) + tgt.setDateElement((DateTimeType) VersionConvertor_10_50.convertType(src.getDateElement())); if (src.hasOrderedBy()) { tgt.setOrderedBy(VersionConvertor_10_50.convertCodeableConcept(src.getOrderedBy())); } @@ -56,8 +60,8 @@ public class List10_50 { if (src.hasIdentifier()) { for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_50.convertIdentifier(t)); } - if (src.hasTitle()) { - tgt.setTitle(src.getTitle()); + if (src.hasTitleElement()) { + tgt.setTitleElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getTitleElement())); } if (src.hasCode()) { tgt.setCode(VersionConvertor_10_50.convertCodeableConcept(src.getCode())); @@ -74,8 +78,8 @@ public class List10_50 { if (src.hasStatus()) { tgt.setStatus(convertListStatus(src.getStatus())); } - if (src.hasDate()) - tgt.setDate(src.getDate()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.r5.model.DateTimeType) VersionConvertor_10_50.convertType(src.getDateElement())); if (src.hasOrderedBy()) { tgt.setOrderedBy(VersionConvertor_10_50.convertCodeableConcept(src.getOrderedBy())); } @@ -98,11 +102,11 @@ public class List10_50 { if (src.hasFlag()) { tgt.setFlag(VersionConvertor_10_50.convertCodeableConcept(src.getFlag())); } - if (src.hasDeleted()) { - tgt.setDeleted(src.getDeleted()); + if (src.hasDeletedElement()) { + tgt.setDeletedElement((BooleanType) VersionConvertor_10_50.convertType(src.getDeletedElement())); } - if (src.hasDate()) - tgt.setDate(src.getDate()); + if (src.hasDateElement()) + tgt.setDateElement((DateTimeType) VersionConvertor_10_50.convertType(src.getDateElement())); if (src.hasItem()) { tgt.setItem(VersionConvertor_10_50.convertReference(src.getItem())); } @@ -117,11 +121,11 @@ public class List10_50 { if (src.hasFlag()) { tgt.setFlag(VersionConvertor_10_50.convertCodeableConcept(src.getFlag())); } - if (src.hasDeleted()) { - tgt.setDeleted(src.getDeleted()); + if (src.hasDeletedElement()) { + tgt.setDeletedElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_10_50.convertType(src.getDeletedElement())); } - if (src.hasDate()) - tgt.setDate(src.getDate()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.r5.model.DateTimeType) VersionConvertor_10_50.convertType(src.getDateElement())); if (src.hasItem()) { tgt.setItem(VersionConvertor_10_50.convertReference(src.getItem())); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Location10_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Location10_50.java index 260f06f17..98ae76df1 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Location10_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Location10_50.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_50; import org.hl7.fhir.convertors.VersionConvertor_10_50; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Location10_50 { @@ -16,12 +17,10 @@ public class Location10_50 { if (src.hasStatus()) { tgt.setStatus(convertLocationStatus(src.getStatus())); } - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getNameElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getDescriptionElement())); if (src.hasMode()) { tgt.setMode(convertLocationMode(src.getMode())); } @@ -60,12 +59,10 @@ public class Location10_50 { if (src.hasStatus()) { tgt.setStatus(convertLocationStatus(src.getStatus())); } - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getNameElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getDescriptionElement())); if (src.hasMode()) { tgt.setMode(convertLocationMode(src.getMode())); } @@ -124,15 +121,12 @@ public class Location10_50 { return null; org.hl7.fhir.r5.model.Location.LocationPositionComponent tgt = new org.hl7.fhir.r5.model.Location.LocationPositionComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasLongitude()) { - tgt.setLongitude(src.getLongitude()); - } - if (src.hasLatitude()) { - tgt.setLatitude(src.getLatitude()); - } - if (src.hasAltitude()) { - tgt.setAltitude(src.getAltitude()); - } + if (src.hasLongitudeElement()) + tgt.setLongitudeElement((org.hl7.fhir.r5.model.DecimalType) VersionConvertor_10_50.convertType(src.getLongitudeElement())); + if (src.hasLatitudeElement()) + tgt.setLatitudeElement((org.hl7.fhir.r5.model.DecimalType) VersionConvertor_10_50.convertType(src.getLatitudeElement())); + if (src.hasAltitudeElement()) + tgt.setAltitudeElement((org.hl7.fhir.r5.model.DecimalType) VersionConvertor_10_50.convertType(src.getAltitudeElement())); return tgt; } @@ -141,15 +135,12 @@ public class Location10_50 { return null; org.hl7.fhir.dstu2.model.Location.LocationPositionComponent tgt = new org.hl7.fhir.dstu2.model.Location.LocationPositionComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasLongitude()) { - tgt.setLongitude(src.getLongitude()); - } - if (src.hasLatitude()) { - tgt.setLatitude(src.getLatitude()); - } - if (src.hasAltitude()) { - tgt.setAltitude(src.getAltitude()); - } + if (src.hasLongitudeElement()) + tgt.setLongitudeElement((org.hl7.fhir.dstu2.model.DecimalType) VersionConvertor_10_50.convertType(src.getLongitudeElement())); + if (src.hasLatitudeElement()) + tgt.setLatitudeElement((org.hl7.fhir.dstu2.model.DecimalType) VersionConvertor_10_50.convertType(src.getLatitudeElement())); + if (src.hasAltitudeElement()) + tgt.setAltitudeElement((org.hl7.fhir.dstu2.model.DecimalType) VersionConvertor_10_50.convertType(src.getAltitudeElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/MedicationDispense10_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/MedicationDispense10_50.java index a9eeadfbf..c4eb56aee 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/MedicationDispense10_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/MedicationDispense10_50.java @@ -4,6 +4,7 @@ import org.hl7.fhir.convertors.VersionConvertor_10_50; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r5.model.Dosage; import org.hl7.fhir.r5.model.Dosage.DosageDoseAndRateComponent; +import java.util.Collections; public class MedicationDispense10_50 { @@ -36,20 +37,18 @@ public class MedicationDispense10_50 { if (src.hasDaysSupply()) { tgt.setDaysSupply(VersionConvertor_10_50.convertSimpleQuantity(src.getDaysSupply())); } - if (src.hasWhenPrepared()) { - tgt.setWhenPrepared(src.getWhenPrepared()); - } - if (src.hasWhenHandedOver()) { - tgt.setWhenHandedOver(src.getWhenHandedOver()); - } + if (src.hasWhenPreparedElement()) + tgt.setWhenPreparedElement((org.hl7.fhir.r5.model.DateTimeType) VersionConvertor_10_50.convertType(src.getWhenPreparedElement())); + if (src.hasWhenHandedOverElement()) + tgt.setWhenHandedOverElement((org.hl7.fhir.r5.model.DateTimeType) VersionConvertor_10_50.convertType(src.getWhenHandedOverElement())); if (src.hasDestination()) { tgt.setDestination(VersionConvertor_10_50.convertReference(src.getDestination())); } if (src.hasReceiver()) { for (org.hl7.fhir.dstu2.model.Reference t : src.getReceiver()) tgt.addReceiver(VersionConvertor_10_50.convertReference(t)); } - if (src.hasNote()) - tgt.addNote().setText(src.getNote()); + if (src.hasNoteElement()) + tgt.setNote(Collections.singletonList((org.hl7.fhir.r5.model.Annotation) VersionConvertor_10_50.convertType(src.getNoteElement()))); if (src.hasDosageInstruction()) { for (org.hl7.fhir.dstu2.model.MedicationDispense.MedicationDispenseDosageInstructionComponent t : src.getDosageInstruction()) tgt.addDosageInstruction(convertMedicationDispenseDosageInstructionComponent(t)); } @@ -88,12 +87,10 @@ public class MedicationDispense10_50 { if (src.hasDaysSupply()) { tgt.setDaysSupply(VersionConvertor_10_50.convertSimpleQuantity(src.getDaysSupply())); } - if (src.hasWhenPrepared()) { - tgt.setWhenPrepared(src.getWhenPrepared()); - } - if (src.hasWhenHandedOver()) { - tgt.setWhenHandedOver(src.getWhenHandedOver()); - } + if (src.hasWhenPreparedElement()) + tgt.setWhenPreparedElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_50.convertType(src.getWhenPreparedElement())); + if (src.hasWhenHandedOverElement()) + tgt.setWhenHandedOverElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_50.convertType(src.getWhenHandedOverElement())); if (src.hasDestination()) { tgt.setDestination(VersionConvertor_10_50.convertReference(src.getDestination())); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/MedicationStatement10_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/MedicationStatement10_50.java index 05d58a5e5..865335422 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/MedicationStatement10_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/MedicationStatement10_50.java @@ -3,6 +3,9 @@ package org.hl7.fhir.convertors.conv10_50; import org.hl7.fhir.convertors.VersionConvertor_10_50; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r5.model.Dosage.DosageDoseAndRateComponent; +import org.hl7.fhir.r5.model.StringType; + +import java.util.Collections; public class MedicationStatement10_50 { @@ -32,8 +35,8 @@ public class MedicationStatement10_50 { if (src.hasDerivedFrom()) { for (org.hl7.fhir.r5.model.Reference t : src.getDerivedFrom()) tgt.addSupportingInformation(VersionConvertor_10_50.convertReference(t)); } - if (src.hasDateAsserted()) - tgt.setDateAsserted(src.getDateAsserted()); + if (src.hasDateAssertedElement()) + tgt.setDateAssertedElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_50.convertType(src.getDateAssertedElement())); if (src.hasNote()) { for (org.hl7.fhir.r5.model.Annotation t : src.getNote()) tgt.setNote(t.getText()); } @@ -69,8 +72,8 @@ public class MedicationStatement10_50 { if (src.hasSupportingInformation()) { for (org.hl7.fhir.dstu2.model.Reference t : src.getSupportingInformation()) tgt.addDerivedFrom(VersionConvertor_10_50.convertReference(t)); } - if (src.hasDateAsserted()) - tgt.setDateAsserted(src.getDateAsserted()); + if (src.hasDateAssertedElement()) + tgt.setDateAssertedElement((org.hl7.fhir.r5.model.DateTimeType) VersionConvertor_10_50.convertType(src.getDateAssertedElement())); if (src.hasNote()) tgt.addNote().setText(src.getNote()); if (src.hasDosage()) { @@ -84,8 +87,8 @@ public class MedicationStatement10_50 { return null; org.hl7.fhir.r5.model.Dosage tgt = new org.hl7.fhir.r5.model.Dosage(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasText()) { - tgt.setText(src.getText()); + if (src.hasTextElement()) { + tgt.setTextElement((StringType) VersionConvertor_10_50.convertType(src.getTextElement())); } if (src.hasTiming()) { tgt.setTiming(VersionConvertor_10_50.convertTiming(src.getTiming())); @@ -117,8 +120,8 @@ public class MedicationStatement10_50 { return null; org.hl7.fhir.dstu2.model.MedicationStatement.MedicationStatementDosageComponent tgt = new org.hl7.fhir.dstu2.model.MedicationStatement.MedicationStatementDosageComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasText()) { - tgt.setText(src.getText()); + if (src.hasTextElement()) { + tgt.setTextElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getTextElement())); } if (src.hasTiming()) { tgt.setTiming(VersionConvertor_10_50.convertTiming(src.getTiming())); diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/MessageHeader10_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/MessageHeader10_50.java index ebac509df..5bc90c15e 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/MessageHeader10_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/MessageHeader10_50.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_50; import org.hl7.fhir.convertors.VersionConvertor_10_50; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class MessageHeader10_50 { @@ -10,15 +11,13 @@ public class MessageHeader10_50 { return null; org.hl7.fhir.dstu2.model.MessageHeader.MessageDestinationComponent tgt = new org.hl7.fhir.dstu2.model.MessageHeader.MessageDestinationComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getNameElement())); if (src.hasTarget()) { tgt.setTarget(VersionConvertor_10_50.convertReference(src.getTarget())); } - if (src.hasEndpoint()) { - tgt.setEndpoint(src.getEndpoint()); - } + if (src.hasEndpointElement()) + tgt.setEndpointElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_50.convertType(src.getEndpointElement())); return tgt; } @@ -27,15 +26,13 @@ public class MessageHeader10_50 { return null; org.hl7.fhir.r5.model.MessageHeader.MessageDestinationComponent tgt = new org.hl7.fhir.r5.model.MessageHeader.MessageDestinationComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getNameElement())); if (src.hasTarget()) { tgt.setTarget(VersionConvertor_10_50.convertReference(src.getTarget())); } - if (src.hasEndpoint()) { - tgt.setEndpoint(src.getEndpoint()); - } + if (src.hasEndpointElement()) + tgt.setEndpointElement((org.hl7.fhir.r5.model.UrlType) VersionConvertor_10_50.convertType(src.getEndpointElement())); return tgt; } @@ -113,9 +110,8 @@ public class MessageHeader10_50 { return null; org.hl7.fhir.dstu2.model.MessageHeader.MessageHeaderResponseComponent tgt = new org.hl7.fhir.dstu2.model.MessageHeader.MessageHeaderResponseComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasIdentifier()) { - tgt.setIdentifier(src.getIdentifier()); - } + if (src.hasIdentifierElement()) + tgt.setIdentifierElement((org.hl7.fhir.dstu2.model.IdType) VersionConvertor_10_50.convertType(src.getIdentifierElement())); if (src.hasCode()) { tgt.setCode(convertResponseType(src.getCode())); } @@ -130,9 +126,8 @@ public class MessageHeader10_50 { return null; org.hl7.fhir.r5.model.MessageHeader.MessageHeaderResponseComponent tgt = new org.hl7.fhir.r5.model.MessageHeader.MessageHeaderResponseComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasIdentifier()) { - tgt.setIdentifier(src.getIdentifier()); - } + if (src.hasIdentifierElement()) + tgt.setIdentifierElement((org.hl7.fhir.r5.model.IdType) VersionConvertor_10_50.convertType(src.getIdentifierElement())); if (src.hasCode()) { tgt.setCode(convertResponseType(src.getCode())); } @@ -147,21 +142,17 @@ public class MessageHeader10_50 { return null; org.hl7.fhir.dstu2.model.MessageHeader.MessageSourceComponent tgt = new org.hl7.fhir.dstu2.model.MessageHeader.MessageSourceComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasSoftware()) { - tgt.setSoftware(src.getSoftware()); - } - if (src.hasVersion()) { - tgt.setVersion(src.getVersion()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getNameElement())); + if (src.hasSoftwareElement()) + tgt.setSoftwareElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getSoftwareElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getVersionElement())); if (src.hasContact()) { tgt.setContact(VersionConvertor_10_50.convertContactPoint(src.getContact())); } - if (src.hasEndpoint()) { - tgt.setEndpoint(src.getEndpoint()); - } + if (src.hasEndpointElement()) + tgt.setEndpointElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_50.convertType(src.getEndpointElement())); return tgt; } @@ -170,21 +161,17 @@ public class MessageHeader10_50 { return null; org.hl7.fhir.r5.model.MessageHeader.MessageSourceComponent tgt = new org.hl7.fhir.r5.model.MessageHeader.MessageSourceComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasSoftware()) { - tgt.setSoftware(src.getSoftware()); - } - if (src.hasVersion()) { - tgt.setVersion(src.getVersion()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getNameElement())); + if (src.hasSoftwareElement()) + tgt.setSoftwareElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getSoftwareElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getVersionElement())); if (src.hasContact()) { tgt.setContact(VersionConvertor_10_50.convertContactPoint(src.getContact())); } - if (src.hasEndpoint()) { - tgt.setEndpoint(src.getEndpoint()); - } + if (src.hasEndpointElement()) + tgt.setEndpointElement((org.hl7.fhir.r5.model.UrlType) VersionConvertor_10_50.convertType(src.getEndpointElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/NamingSystem10_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/NamingSystem10_50.java index e2053f961..2e036f4d7 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/NamingSystem10_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/NamingSystem10_50.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_50; import org.hl7.fhir.convertors.VersionConvertor_10_50; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class NamingSystem10_50 { @@ -10,40 +11,35 @@ public class NamingSystem10_50 { return null; org.hl7.fhir.dstu2.model.NamingSystem tgt = new org.hl7.fhir.dstu2.model.NamingSystem(); VersionConvertor_10_50.copyDomainResource(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_10_50.convertConformanceResourceStatus(src.getStatus())); } if (src.hasKind()) { tgt.setKind(convertNamingSystemType(src.getKind())); } - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) { - tgt.setPublisher(src.getPublisher()); - } + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_50.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.r5.model.ContactDetail t : src.getContact()) tgt.addContact(convertNamingSystemContactComponent(t)); } - if (src.hasResponsible()) { - tgt.setResponsible(src.getResponsible()); - } + if (src.hasResponsibleElement()) + tgt.setResponsibleElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getResponsibleElement())); if (src.hasType()) { tgt.setType(VersionConvertor_10_50.convertCodeableConcept(src.getType())); } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getDescriptionElement())); for (org.hl7.fhir.r5.model.UsageContext t : src.getUseContext()) if (t.hasValueCodeableConcept()) tgt.addUseContext(VersionConvertor_10_50.convertCodeableConcept(t.getValueCodeableConcept())); if (src.hasJurisdiction()) { for (org.hl7.fhir.r5.model.CodeableConcept t : src.getJurisdiction()) tgt.addUseContext(VersionConvertor_10_50.convertCodeableConcept(t)); } - if (src.hasUsage()) { - tgt.setUsage(src.getUsage()); - } + if (src.hasUsageElement()) + tgt.setUsageElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getUsageElement())); if (src.hasUniqueId()) { for (org.hl7.fhir.r5.model.NamingSystem.NamingSystemUniqueIdComponent t : src.getUniqueId()) tgt.addUniqueId(convertNamingSystemUniqueIdComponent(t)); } @@ -55,39 +51,34 @@ public class NamingSystem10_50 { return null; org.hl7.fhir.r5.model.NamingSystem tgt = new org.hl7.fhir.r5.model.NamingSystem(); VersionConvertor_10_50.copyDomainResource(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_10_50.convertConformanceResourceStatus(src.getStatus())); } if (src.hasKind()) { tgt.setKind(convertNamingSystemType(src.getKind())); } - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) { - tgt.setPublisher(src.getPublisher()); - } + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.r5.model.DateTimeType) VersionConvertor_10_50.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu2.model.NamingSystem.NamingSystemContactComponent t : src.getContact()) tgt.addContact(convertNamingSystemContactComponent(t)); } - if (src.hasResponsible()) { - tgt.setResponsible(src.getResponsible()); - } + if (src.hasResponsibleElement()) + tgt.setResponsibleElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getResponsibleElement())); if (src.hasType()) { tgt.setType(VersionConvertor_10_50.convertCodeableConcept(src.getType())); } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r5.model.MarkdownType) VersionConvertor_10_50.convertType(src.getDescriptionElement())); for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getUseContext()) if (VersionConvertor_10_50.isJurisdiction(t)) tgt.addJurisdiction(VersionConvertor_10_50.convertCodeableConcept(t)); else tgt.addUseContext(VersionConvertor_10_50.convertCodeableConceptToUsageContext(t)); - if (src.hasUsage()) { - tgt.setUsage(src.getUsage()); - } + if (src.hasUsageElement()) + tgt.setUsageElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getUsageElement())); if (src.hasUniqueId()) { for (org.hl7.fhir.dstu2.model.NamingSystem.NamingSystemUniqueIdComponent t : src.getUniqueId()) tgt.addUniqueId(convertNamingSystemUniqueIdComponent(t)); } @@ -99,9 +90,8 @@ public class NamingSystem10_50 { return null; org.hl7.fhir.r5.model.ContactDetail tgt = new org.hl7.fhir.r5.model.ContactDetail(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_50.convertContactPoint(t)); } @@ -113,9 +103,8 @@ public class NamingSystem10_50 { return null; org.hl7.fhir.dstu2.model.NamingSystem.NamingSystemContactComponent tgt = new org.hl7.fhir.dstu2.model.NamingSystem.NamingSystemContactComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.r5.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_50.convertContactPoint(t)); } @@ -194,12 +183,10 @@ public class NamingSystem10_50 { if (src.hasType()) { tgt.setType(convertNamingSystemIdentifierType(src.getType())); } - if (src.hasValue()) { - tgt.setValue(src.getValue()); - } - if (src.hasPreferred()) { - tgt.setPreferred(src.getPreferred()); - } + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getValueElement())); + if (src.hasPreferredElement()) + tgt.setPreferredElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_10_50.convertType(src.getPreferredElement())); if (src.hasPeriod()) { tgt.setPeriod(VersionConvertor_10_50.convertPeriod(src.getPeriod())); } @@ -214,12 +201,10 @@ public class NamingSystem10_50 { if (src.hasType()) { tgt.setType(convertNamingSystemIdentifierType(src.getType())); } - if (src.hasValue()) { - tgt.setValue(src.getValue()); - } - if (src.hasPreferred()) { - tgt.setPreferred(src.getPreferred()); - } + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getValueElement())); + if (src.hasPreferredElement()) + tgt.setPreferredElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_50.convertType(src.getPreferredElement())); if (src.hasPeriod()) { tgt.setPeriod(VersionConvertor_10_50.convertPeriod(src.getPeriod())); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Observation10_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Observation10_50.java index 81383ce00..17e68726d 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Observation10_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Observation10_50.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_50; import org.hl7.fhir.convertors.VersionConvertor_10_50; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Observation10_50 { @@ -31,9 +32,8 @@ public class Observation10_50 { if (src.hasEffective()) { tgt.setEffective(VersionConvertor_10_50.convertType(src.getEffective())); } - if (src.hasIssued()) { - tgt.setIssued(src.getIssued()); - } + if (src.hasIssuedElement()) + tgt.setIssuedElement((org.hl7.fhir.dstu2.model.InstantType) VersionConvertor_10_50.convertType(src.getIssuedElement())); if (src.hasPerformer()) { for (org.hl7.fhir.r5.model.Reference t : src.getPerformer()) tgt.addPerformer(VersionConvertor_10_50.convertReference(t)); } @@ -101,9 +101,8 @@ public class Observation10_50 { if (src.hasEffective()) { tgt.setEffective(VersionConvertor_10_50.convertType(src.getEffective())); } - if (src.hasIssued()) { - tgt.setIssued(src.getIssued()); - } + if (src.hasIssuedElement()) + tgt.setIssuedElement((org.hl7.fhir.r5.model.InstantType) VersionConvertor_10_50.convertType(src.getIssuedElement())); if (src.hasPerformer()) { for (org.hl7.fhir.dstu2.model.Reference t : src.getPerformer()) tgt.addPerformer(VersionConvertor_10_50.convertReference(t)); } @@ -201,9 +200,8 @@ public class Observation10_50 { if (src.hasAge()) { tgt.setAge(VersionConvertor_10_50.convertRange(src.getAge())); } - if (src.hasText()) { - tgt.setText(src.getText()); - } + if (src.hasTextElement()) + tgt.setTextElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getTextElement())); return tgt; } @@ -224,9 +222,8 @@ public class Observation10_50 { if (src.hasAge()) { tgt.setAge(VersionConvertor_10_50.convertRange(src.getAge())); } - if (src.hasText()) { - tgt.setText(src.getText()); - } + if (src.hasTextElement()) + tgt.setTextElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getTextElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/OperationDefinition10_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/OperationDefinition10_50.java index 3e97d5276..a733418be 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/OperationDefinition10_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/OperationDefinition10_50.java @@ -9,7 +9,9 @@ import org.hl7.fhir.r5.model.DataType; import org.hl7.fhir.r5.model.Enumerations; import org.hl7.fhir.r5.model.Enumerations.FHIRAllTypes; import org.hl7.fhir.r5.model.Enumerations.SearchParamType; +import org.hl7.fhir.r5.model.StringType; import org.hl7.fhir.utilities.Utilities; +import java.util.Collections; public class OperationDefinition10_50 { @@ -18,58 +20,50 @@ public class OperationDefinition10_50 { return null; org.hl7.fhir.dstu2.model.OperationDefinition tgt = new org.hl7.fhir.dstu2.model.OperationDefinition(); VersionConvertor_10_50.copyDomainResource(src, tgt); - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } - if (src.hasVersion()) { - tgt.setVersion(src.getVersion()); - } - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_50.convertType(src.getUrlElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_10_50.convertConformanceResourceStatus(src.getStatus())); } if (src.hasKind()) { tgt.setKind(convertOperationKind(src.getKind())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) { - tgt.setPublisher(src.getPublisher()); - } + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_50.convertType(src.getExperimentalElement())); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_50.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.r5.model.ContactDetail t : src.getContact()) tgt.addContact(convertOperationDefinitionContactComponent(t)); } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } - if (src.hasPurpose()) { - tgt.setRequirements(src.getPurpose()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getDescriptionElement())); + if (src.hasPurposeElement()) { + tgt.setRequirementsElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getPurposeElement())); } if (src.hasAffectsState()) { tgt.setIdempotent(!src.getAffectsState()); } - if (src.hasCode()) { - tgt.setCode(src.getCode()); - } + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu2.model.CodeType) VersionConvertor_10_50.convertType(src.getCodeElement())); if (src.hasComment()) { tgt.setNotes(src.getComment()); } if (src.hasBase()) tgt.setBase(VersionConvertor_10_50.convertCanonicalToReference(src.getBaseElement())); - if (src.hasSystem()) { - tgt.setSystem(src.getSystem()); - } + if (src.hasSystemElement()) + tgt.setSystemElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_50.convertType(src.getSystemElement())); if (src.getType()) if (src.hasResource()) { for (CodeType t : src.getResource()) tgt.addType(t.getValue()); } - if (src.hasInstance()) { - tgt.setInstance(src.getInstance()); - } + if (src.hasInstanceElement()) + tgt.setInstanceElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_50.convertType(src.getInstanceElement())); if (src.hasParameter()) { for (org.hl7.fhir.r5.model.OperationDefinition.OperationDefinitionParameterComponent t : src.getParameter()) tgt.addParameter(convertOperationDefinitionParameterComponent(t)); } @@ -81,58 +75,50 @@ public class OperationDefinition10_50 { return null; org.hl7.fhir.r5.model.OperationDefinition tgt = new org.hl7.fhir.r5.model.OperationDefinition(); VersionConvertor_10_50.copyDomainResource(src, tgt); - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } - if (src.hasVersion()) { - tgt.setVersion(src.getVersion()); - } - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r5.model.UriType) VersionConvertor_10_50.convertType(src.getUrlElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_10_50.convertConformanceResourceStatus(src.getStatus())); } if (src.hasKind()) { tgt.setKind(convertOperationKind(src.getKind())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) { - tgt.setPublisher(src.getPublisher()); - } + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_10_50.convertType(src.getExperimentalElement())); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.r5.model.DateTimeType) VersionConvertor_10_50.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu2.model.OperationDefinition.OperationDefinitionContactComponent t : src.getContact()) tgt.addContact(convertOperationDefinitionContactComponent(t)); } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r5.model.MarkdownType) VersionConvertor_10_50.convertType(src.getDescriptionElement())); if (src.hasRequirements()) { tgt.setPurpose(src.getRequirements()); } if (src.hasIdempotent()) tgt.setAffectsState(!src.getIdempotent()); - if (src.hasCode()) { - tgt.setCode(src.getCode()); - } + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.r5.model.CodeType) VersionConvertor_10_50.convertType(src.getCodeElement())); if (src.hasNotes()) { tgt.setComment(src.getNotes()); } if (src.hasBase()) { tgt.setBaseElement(VersionConvertor_10_50.convertReferenceToCanonical(src.getBase())); } - if (src.hasSystem()) { - tgt.setSystem(src.getSystem()); - } + if (src.hasSystemElement()) + tgt.setSystemElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_10_50.convertType(src.getSystemElement())); if (src.hasType()) { for (org.hl7.fhir.dstu2.model.CodeType t : src.getType()) tgt.addResource(t.getValue()); } tgt.setType(tgt.hasResource()); - if (src.hasInstance()) { - tgt.setInstance(src.getInstance()); - } + if (src.hasInstanceElement()) + tgt.setInstanceElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_10_50.convertType(src.getInstanceElement())); if (src.hasParameter()) { for (org.hl7.fhir.dstu2.model.OperationDefinition.OperationDefinitionParameterComponent t : src.getParameter()) tgt.addParameter(convertOperationDefinitionParameterComponent(t)); } @@ -144,9 +130,8 @@ public class OperationDefinition10_50 { return null; org.hl7.fhir.dstu2.model.OperationDefinition.OperationDefinitionContactComponent tgt = new org.hl7.fhir.dstu2.model.OperationDefinition.OperationDefinitionContactComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.r5.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_50.convertContactPoint(t)); } @@ -158,9 +143,8 @@ public class OperationDefinition10_50 { return null; org.hl7.fhir.r5.model.ContactDetail tgt = new org.hl7.fhir.r5.model.ContactDetail(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_50.convertContactPoint(t)); } @@ -205,20 +189,17 @@ public class OperationDefinition10_50 { return null; org.hl7.fhir.r5.model.OperationDefinition.OperationDefinitionParameterComponent tgt = new org.hl7.fhir.r5.model.OperationDefinition.OperationDefinitionParameterComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.CodeType) VersionConvertor_10_50.convertType(src.getNameElement())); if (src.hasUse()) { tgt.setUse(convertOperationParameterUse(src.getUse())); } - if (src.hasMin()) { - tgt.setMin(src.getMin()); - } - if (src.hasMax()) { - tgt.setMax(src.getMax()); - } - if (src.hasDocumentation()) { - tgt.setDocumentation(src.getDocumentation()); + if (src.hasMinElement()) + tgt.setMinElement((org.hl7.fhir.r5.model.IntegerType) VersionConvertor_10_50.convertType(src.getMinElement())); + if (src.hasMaxElement()) + tgt.setMaxElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getMaxElement())); + if (src.hasDocumentationElement()) { + tgt.setDocumentationElement((StringType) VersionConvertor_10_50.convertType(src.getDocumentationElement())); } if (Utilities.existsInList(src.getType(), "token", "reference", "composite", "number", "date", "quantity", "uri")) { tgt.setType(FHIRAllTypes.STRING); @@ -247,25 +228,19 @@ public class OperationDefinition10_50 { return null; org.hl7.fhir.dstu2.model.OperationDefinition.OperationDefinitionParameterComponent tgt = new org.hl7.fhir.dstu2.model.OperationDefinition.OperationDefinitionParameterComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.CodeType) VersionConvertor_10_50.convertType(src.getNameElement())); if (src.hasUse()) { tgt.setUse(convertOperationParameterUse(src.getUse())); } - if (src.hasMin()) { - tgt.setMin(src.getMin()); - } - if (src.hasMax()) { - tgt.setMax(src.getMax()); - } - if (src.hasDocumentation()) { - tgt.setDocumentation(src.getDocumentation()); - } + if (src.hasMinElement()) + tgt.setMinElement((org.hl7.fhir.dstu2.model.IntegerType) VersionConvertor_10_50.convertType(src.getMinElement())); + if (src.hasMaxElement()) + tgt.setMaxElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getMaxElement())); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getDocumentationElement())); if (src.hasSearchType()) { - if (src.hasSearchType()) { - tgt.setType(src.getSearchType().toCode()); - } + tgt.setType(src.getSearchType().toCode()); } else tgt.setType(src.getType().toCode()); if (src.hasTargetProfile()) { diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/OperationOutcome10_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/OperationOutcome10_50.java index af5821335..474e57e25 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/OperationOutcome10_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/OperationOutcome10_50.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_50; import org.hl7.fhir.convertors.VersionConvertor_10_50; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class OperationOutcome10_50 { @@ -209,9 +210,8 @@ public class OperationOutcome10_50 { if (src.hasDetails()) { tgt.setDetails(VersionConvertor_10_50.convertCodeableConcept(src.getDetails())); } - if (src.hasDiagnostics()) { - tgt.setDiagnostics(src.getDiagnostics()); - } + if (src.hasDiagnosticsElement()) + tgt.setDiagnosticsElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getDiagnosticsElement())); if (src.hasLocation()) { for (org.hl7.fhir.dstu2.model.StringType t : src.getLocation()) tgt.addLocation(t.getValue()); } @@ -232,9 +232,8 @@ public class OperationOutcome10_50 { if (src.hasDetails()) { tgt.setDetails(VersionConvertor_10_50.convertCodeableConcept(src.getDetails())); } - if (src.hasDiagnostics()) { - tgt.setDiagnostics(src.getDiagnostics()); - } + if (src.hasDiagnosticsElement()) + tgt.setDiagnosticsElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getDiagnosticsElement())); if (src.hasLocation()) { for (org.hl7.fhir.r5.model.StringType t : src.getLocation()) tgt.addLocation(t.getValue()); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Organization10_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Organization10_50.java index 595f8aaed..a54f37563 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Organization10_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Organization10_50.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_50; import org.hl7.fhir.convertors.VersionConvertor_10_50; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Organization10_50 { @@ -13,15 +14,13 @@ public class Organization10_50 { if (src.hasIdentifier()) { for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_50.convertIdentifier(t)); } - if (src.hasActive()) { - tgt.setActive(src.getActive()); - } + if (src.hasActiveElement()) + tgt.setActiveElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_10_50.convertType(src.getActiveElement())); if (src.hasType()) { tgt.addType(VersionConvertor_10_50.convertCodeableConcept(src.getType())); } - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_50.convertContactPoint(t)); } @@ -45,15 +44,13 @@ public class Organization10_50 { if (src.hasIdentifier()) { for (org.hl7.fhir.r5.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_50.convertIdentifier(t)); } - if (src.hasActive()) { - tgt.setActive(src.getActive()); - } + if (src.hasActiveElement()) + tgt.setActiveElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_50.convertType(src.getActiveElement())); if (src.hasType()) { tgt.setType(VersionConvertor_10_50.convertCodeableConcept(src.getTypeFirstRep())); } - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.r5.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_50.convertContactPoint(t)); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Parameters10_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Parameters10_50.java index 80dd775bc..7935c03a7 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Parameters10_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Parameters10_50.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_50; import org.hl7.fhir.convertors.VersionConvertor_10_50; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Parameters10_50 { @@ -32,9 +33,8 @@ public class Parameters10_50 { return null; org.hl7.fhir.dstu2.model.Parameters.ParametersParameterComponent tgt = new org.hl7.fhir.dstu2.model.Parameters.ParametersParameterComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getNameElement())); if (src.hasValue()) { tgt.setValue(VersionConvertor_10_50.convertType(src.getValue())); } @@ -52,9 +52,8 @@ public class Parameters10_50 { return null; org.hl7.fhir.r5.model.Parameters.ParametersParameterComponent tgt = new org.hl7.fhir.r5.model.Parameters.ParametersParameterComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getNameElement())); if (src.hasValue()) { tgt.setValue(VersionConvertor_10_50.convertType(src.getValue())); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Patient10_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Patient10_50.java index 14c6984bf..1c5cbb57f 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Patient10_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Patient10_50.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_50; import org.hl7.fhir.convertors.VersionConvertor_10_50; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Patient10_50 { @@ -132,9 +133,8 @@ public class Patient10_50 { if (src.hasIdentifier()) { for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_50.convertIdentifier(t)); } - if (src.hasActive()) { - tgt.setActive(src.getActive()); - } + if (src.hasActiveElement()) + tgt.setActiveElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_10_50.convertType(src.getActiveElement())); if (src.hasName()) { for (org.hl7.fhir.dstu2.model.HumanName t : src.getName()) tgt.addName(VersionConvertor_10_50.convertHumanName(t)); } @@ -144,9 +144,8 @@ public class Patient10_50 { if (src.hasGender()) { tgt.setGender(VersionConvertor_10_50.convertAdministrativeGender(src.getGender())); } - if (src.hasBirthDate()) { - tgt.setBirthDate(src.getBirthDate()); - } + if (src.hasBirthDateElement()) + tgt.setBirthDateElement((org.hl7.fhir.r5.model.DateType) VersionConvertor_10_50.convertType(src.getBirthDateElement())); if (src.hasDeceased()) { tgt.setDeceased(VersionConvertor_10_50.convertType(src.getDeceased())); } @@ -190,9 +189,8 @@ public class Patient10_50 { if (src.hasIdentifier()) { for (org.hl7.fhir.r5.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_50.convertIdentifier(t)); } - if (src.hasActive()) { - tgt.setActive(src.getActive()); - } + if (src.hasActiveElement()) + tgt.setActiveElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_50.convertType(src.getActiveElement())); if (src.hasName()) { for (org.hl7.fhir.r5.model.HumanName t : src.getName()) tgt.addName(VersionConvertor_10_50.convertHumanName(t)); } @@ -202,9 +200,8 @@ public class Patient10_50 { if (src.hasGender()) { tgt.setGender(VersionConvertor_10_50.convertAdministrativeGender(src.getGender())); } - if (src.hasBirthDate()) { - tgt.setBirthDate(src.getBirthDate()); - } + if (src.hasBirthDateElement()) + tgt.setBirthDateElement((org.hl7.fhir.dstu2.model.DateType) VersionConvertor_10_50.convertType(src.getBirthDateElement())); if (src.hasDeceased()) { tgt.setDeceased(VersionConvertor_10_50.convertType(src.getDeceased())); } @@ -248,9 +245,8 @@ public class Patient10_50 { if (src.hasLanguage()) { tgt.setLanguage(VersionConvertor_10_50.convertCodeableConcept(src.getLanguage())); } - if (src.hasPreferred()) { - tgt.setPreferred(src.getPreferred()); - } + if (src.hasPreferredElement()) + tgt.setPreferredElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_50.convertType(src.getPreferredElement())); return tgt; } @@ -262,9 +258,8 @@ public class Patient10_50 { if (src.hasLanguage()) { tgt.setLanguage(VersionConvertor_10_50.convertCodeableConcept(src.getLanguage())); } - if (src.hasPreferred()) { - tgt.setPreferred(src.getPreferred()); - } + if (src.hasPreferredElement()) + tgt.setPreferredElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_10_50.convertType(src.getPreferredElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Person10_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Person10_50.java index 5ebd6c97b..1a0b9f1c6 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Person10_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Person10_50.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_50; import org.hl7.fhir.convertors.VersionConvertor_10_50; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Person10_50 { @@ -56,9 +57,8 @@ public class Person10_50 { if (src.hasGender()) { tgt.setGender(VersionConvertor_10_50.convertAdministrativeGender(src.getGender())); } - if (src.hasBirthDate()) { - tgt.setBirthDate(src.getBirthDate()); - } + if (src.hasBirthDateElement()) + tgt.setBirthDateElement((org.hl7.fhir.r5.model.DateType) VersionConvertor_10_50.convertType(src.getBirthDateElement())); if (src.hasAddress()) { for (org.hl7.fhir.dstu2.model.Address t : src.getAddress()) tgt.addAddress(VersionConvertor_10_50.convertAddress(t)); } @@ -68,9 +68,8 @@ public class Person10_50 { if (src.hasManagingOrganization()) { tgt.setManagingOrganization(VersionConvertor_10_50.convertReference(src.getManagingOrganization())); } - if (src.hasActive()) { - tgt.setActive(src.getActive()); - } + if (src.hasActiveElement()) + tgt.setActiveElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_10_50.convertType(src.getActiveElement())); if (src.hasLink()) { for (org.hl7.fhir.dstu2.model.Person.PersonLinkComponent t : src.getLink()) tgt.addLink(convertPersonLinkComponent(t)); } @@ -94,9 +93,8 @@ public class Person10_50 { if (src.hasGender()) { tgt.setGender(VersionConvertor_10_50.convertAdministrativeGender(src.getGender())); } - if (src.hasBirthDate()) { - tgt.setBirthDate(src.getBirthDate()); - } + if (src.hasBirthDateElement()) + tgt.setBirthDateElement((org.hl7.fhir.dstu2.model.DateType) VersionConvertor_10_50.convertType(src.getBirthDateElement())); if (src.hasAddress()) { for (org.hl7.fhir.r5.model.Address t : src.getAddress()) tgt.addAddress(VersionConvertor_10_50.convertAddress(t)); } @@ -106,9 +104,8 @@ public class Person10_50 { if (src.hasManagingOrganization()) { tgt.setManagingOrganization(VersionConvertor_10_50.convertReference(src.getManagingOrganization())); } - if (src.hasActive()) { - tgt.setActive(src.getActive()); - } + if (src.hasActiveElement()) + tgt.setActiveElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_50.convertType(src.getActiveElement())); if (src.hasLink()) { for (org.hl7.fhir.r5.model.Person.PersonLinkComponent t : src.getLink()) tgt.addLink(convertPersonLinkComponent(t)); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Practitioner10_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Practitioner10_50.java index 2d126c474..0f235bade 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Practitioner10_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Practitioner10_50.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_50; import org.hl7.fhir.convertors.VersionConvertor_10_50; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Practitioner10_50 { @@ -13,9 +14,8 @@ public class Practitioner10_50 { if (src.hasIdentifier()) { for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_50.convertIdentifier(t)); } - if (src.hasActive()) { - tgt.setActive(src.getActive()); - } + if (src.hasActiveElement()) + tgt.setActiveElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_10_50.convertType(src.getActiveElement())); if (src.hasName()) tgt.addName(VersionConvertor_10_50.convertHumanName(src.getName())); if (src.hasTelecom()) { @@ -27,9 +27,8 @@ public class Practitioner10_50 { if (src.hasGender()) { tgt.setGender(VersionConvertor_10_50.convertAdministrativeGender(src.getGender())); } - if (src.hasBirthDate()) { - tgt.setBirthDate(src.getBirthDate()); - } + if (src.hasBirthDateElement()) + tgt.setBirthDateElement((org.hl7.fhir.r5.model.DateType) VersionConvertor_10_50.convertType(src.getBirthDateElement())); if (src.hasPhoto()) { for (org.hl7.fhir.dstu2.model.Attachment t : src.getPhoto()) tgt.addPhoto(VersionConvertor_10_50.convertAttachment(t)); } @@ -50,9 +49,8 @@ public class Practitioner10_50 { if (src.hasIdentifier()) { for (org.hl7.fhir.r5.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_50.convertIdentifier(t)); } - if (src.hasActive()) { - tgt.setActive(src.getActive()); - } + if (src.hasActiveElement()) + tgt.setActiveElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_50.convertType(src.getActiveElement())); if (src.hasName()) { for (org.hl7.fhir.r5.model.HumanName t : src.getName()) tgt.setName(VersionConvertor_10_50.convertHumanName(t)); } @@ -65,9 +63,8 @@ public class Practitioner10_50 { if (src.hasGender()) { tgt.setGender(VersionConvertor_10_50.convertAdministrativeGender(src.getGender())); } - if (src.hasBirthDate()) { - tgt.setBirthDate(src.getBirthDate()); - } + if (src.hasBirthDateElement()) + tgt.setBirthDateElement((org.hl7.fhir.dstu2.model.DateType) VersionConvertor_10_50.convertType(src.getBirthDateElement())); if (src.hasPhoto()) { for (org.hl7.fhir.r5.model.Attachment t : src.getPhoto()) tgt.addPhoto(VersionConvertor_10_50.convertAttachment(t)); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Questionnaire10_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Questionnaire10_50.java index a6f6f810f..9505f7b92 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Questionnaire10_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Questionnaire10_50.java @@ -5,6 +5,9 @@ import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r5.model.CodeType; import org.hl7.fhir.r5.model.ContactDetail; import org.hl7.fhir.r5.model.Questionnaire.QuestionnaireItemAnswerOptionComponent; +import org.hl7.fhir.r5.model.StringType; + +import java.util.Collections; public class Questionnaire10_50 { @@ -14,14 +17,13 @@ public class Questionnaire10_50 { org.hl7.fhir.r5.model.Questionnaire tgt = new org.hl7.fhir.r5.model.Questionnaire(); VersionConvertor_10_50.copyDomainResource(src, tgt); for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_50.convertIdentifier(t)); - tgt.setVersion(src.getVersion()); + if (src.hasVersionElement()) tgt.setVersionElement((StringType) VersionConvertor_10_50.convertType(src.getVersionElement())); tgt.setStatus(convertQuestionnaireStatus(src.getStatus())); - if (src.hasDate()) - tgt.setDate(src.getDate()); - tgt.setPublisher(src.getPublisher()); + if (src.hasDateElement()) tgt.setDateElement((org.hl7.fhir.r5.model.DateTimeType) VersionConvertor_10_50.convertType(src.getDateElement())); + if (src.hasPublisherElement()) tgt.setPublisherElement((StringType) VersionConvertor_10_50.convertType(src.getPublisherElement())); for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getTelecom()) tgt.addContact(convertQuestionnaireContactComponent(t)); org.hl7.fhir.dstu2.model.Questionnaire.GroupComponent root = src.getGroup(); - tgt.setTitle(root.getTitle()); + tgt.setTitleElement((StringType) VersionConvertor_10_50.convertType(root.getTitleElement())); for (org.hl7.fhir.dstu2.model.Coding t : root.getConcept()) tgt.addCode(VersionConvertor_10_50.convertCoding(t)); for (org.hl7.fhir.dstu2.model.CodeType t : src.getSubjectType()) tgt.addSubjectType(t.getValue()); tgt.addItem(convertQuestionnaireGroupComponent(root)); @@ -36,17 +38,15 @@ public class Questionnaire10_50 { if (src.hasIdentifier()) { for (org.hl7.fhir.r5.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_50.convertIdentifier(t)); } - if (src.hasVersion()) { - tgt.setVersion(src.getVersion()); - } + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getVersionElement())); if (src.hasStatus()) { tgt.setStatus(convertQuestionnaireStatus(src.getStatus())); } - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) { - tgt.setPublisher(src.getPublisher()); - } + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_50.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getPublisherElement())); if (src.hasContact()) { for (ContactDetail t : src.getContact()) for (org.hl7.fhir.r5.model.ContactPoint t1 : t.getTelecom()) tgt.addTelecom(VersionConvertor_10_50.convertContactPoint(t1)); } @@ -81,21 +81,17 @@ public class Questionnaire10_50 { return null; org.hl7.fhir.dstu2.model.Questionnaire.GroupComponent tgt = new org.hl7.fhir.dstu2.model.Questionnaire.GroupComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasLinkId()) { - tgt.setLinkId(src.getLinkId()); - } + if (src.hasLinkIdElement()) + tgt.setLinkIdElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getLinkIdElement())); if (src.hasCode()) { for (org.hl7.fhir.r5.model.Coding t : src.getCode()) tgt.addConcept(VersionConvertor_10_50.convertCoding(t)); } - if (src.hasText()) { - tgt.setText(src.getText()); - } - if (src.hasRequired()) { - tgt.setRequired(src.getRequired()); - } - if (src.hasRepeats()) { - tgt.setRepeats(src.getRepeats()); - } + if (src.hasTextElement()) + tgt.setTextElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getTextElement())); + if (src.hasRequiredElement()) + tgt.setRequiredElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_50.convertType(src.getRequiredElement())); + if (src.hasRepeatsElement()) + tgt.setRepeatsElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_50.convertType(src.getRepeatsElement())); for (org.hl7.fhir.r5.model.Questionnaire.QuestionnaireItemComponent t : src.getItem()) if (t.getType() == org.hl7.fhir.r5.model.Questionnaire.QuestionnaireItemType.GROUP) tgt.addGroup(convertQuestionnaireGroupComponent(t)); else @@ -108,22 +104,18 @@ public class Questionnaire10_50 { return null; org.hl7.fhir.r5.model.Questionnaire.QuestionnaireItemComponent tgt = new org.hl7.fhir.r5.model.Questionnaire.QuestionnaireItemComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasLinkId()) { - tgt.setLinkId(src.getLinkId()); - } + if (src.hasLinkIdElement()) + tgt.setLinkIdElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getLinkIdElement())); if (src.hasConcept()) { for (org.hl7.fhir.dstu2.model.Coding t : src.getConcept()) tgt.addCode(VersionConvertor_10_50.convertCoding(t)); } - if (src.hasText()) { - tgt.setText(src.getText()); - } + if (src.hasTextElement()) + tgt.setTextElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getTextElement())); tgt.setType(org.hl7.fhir.r5.model.Questionnaire.QuestionnaireItemType.GROUP); - if (src.hasRequired()) { - tgt.setRequired(src.getRequired()); - } - if (src.hasRepeats()) { - tgt.setRepeats(src.getRepeats()); - } + if (src.hasRequiredElement()) + tgt.setRequiredElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_10_50.convertType(src.getRequiredElement())); + if (src.hasRepeatsElement()) + tgt.setRepeatsElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_10_50.convertType(src.getRepeatsElement())); if (src.hasGroup()) { for (org.hl7.fhir.dstu2.model.Questionnaire.GroupComponent t : src.getGroup()) tgt.addItem(convertQuestionnaireGroupComponent(t)); } @@ -175,24 +167,20 @@ public class Questionnaire10_50 { return null; org.hl7.fhir.dstu2.model.Questionnaire.QuestionComponent tgt = new org.hl7.fhir.dstu2.model.Questionnaire.QuestionComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasLinkId()) { - tgt.setLinkId(src.getLinkId()); - } + if (src.hasLinkIdElement()) + tgt.setLinkIdElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getLinkIdElement())); if (src.hasCode()) { for (org.hl7.fhir.r5.model.Coding t : src.getCode()) tgt.addConcept(VersionConvertor_10_50.convertCoding(t)); } - if (src.hasText()) { - tgt.setText(src.getText()); - } + if (src.hasTextElement()) + tgt.setTextElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getTextElement())); if (src.hasType()) { tgt.setType(convertQuestionnaireItemType(src.getType())); } - if (src.hasRequired()) { - tgt.setRequired(src.getRequired()); - } - if (src.hasRepeats()) { - tgt.setRepeats(src.getRepeats()); - } + if (src.hasRequiredElement()) + tgt.setRequiredElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_50.convertType(src.getRequiredElement())); + if (src.hasRepeatsElement()) + tgt.setRepeatsElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_50.convertType(src.getRepeatsElement())); if (src.hasAnswerValueSetElement()) { tgt.setOptions(VersionConvertor_10_50.convertCanonicalToReference(src.getAnswerValueSetElement())); } @@ -213,24 +201,20 @@ public class Questionnaire10_50 { return null; org.hl7.fhir.r5.model.Questionnaire.QuestionnaireItemComponent tgt = new org.hl7.fhir.r5.model.Questionnaire.QuestionnaireItemComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasLinkId()) { - tgt.setLinkId(src.getLinkId()); - } + if (src.hasLinkIdElement()) + tgt.setLinkIdElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getLinkIdElement())); if (src.hasConcept()) { for (org.hl7.fhir.dstu2.model.Coding t : src.getConcept()) tgt.addCode(VersionConvertor_10_50.convertCoding(t)); } - if (src.hasText()) { - tgt.setText(src.getText()); - } + if (src.hasTextElement()) + tgt.setTextElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getTextElement())); if (src.hasType()) { tgt.setType(convertQuestionnaireQuestionType(src.getType())); } - if (src.hasRequired()) { - tgt.setRequired(src.getRequired()); - } - if (src.hasRepeats()) { - tgt.setRepeats(src.getRepeats()); - } + if (src.hasRequiredElement()) + tgt.setRequiredElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_10_50.convertType(src.getRequiredElement())); + if (src.hasRepeatsElement()) + tgt.setRepeatsElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_10_50.convertType(src.getRepeatsElement())); if (src.hasOptions()) { tgt.setAnswerValueSetElement(VersionConvertor_10_50.convertReferenceToCanonical(src.getOptions())); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/QuestionnaireResponse10_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/QuestionnaireResponse10_50.java index 92e2bc3fd..8d69a7a02 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/QuestionnaireResponse10_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/QuestionnaireResponse10_50.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_50; import org.hl7.fhir.convertors.VersionConvertor_10_50; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class QuestionnaireResponse10_50 { @@ -10,12 +11,10 @@ public class QuestionnaireResponse10_50 { return null; org.hl7.fhir.dstu2.model.QuestionnaireResponse.GroupComponent tgt = new org.hl7.fhir.dstu2.model.QuestionnaireResponse.GroupComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasLinkId()) { - tgt.setLinkId(src.getLinkId()); - } - if (src.hasText()) { - tgt.setText(src.getText()); - } + if (src.hasLinkIdElement()) + tgt.setLinkIdElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getLinkIdElement())); + if (src.hasTextElement()) + tgt.setTextElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getTextElement())); for (org.hl7.fhir.r5.model.QuestionnaireResponse.QuestionnaireResponseItemComponent t : src.getItem()) if (t.hasAnswer()) tgt.addQuestion(convertQuestionnaireItemToQuestion(t)); else @@ -28,12 +27,10 @@ public class QuestionnaireResponse10_50 { return null; org.hl7.fhir.dstu2.model.QuestionnaireResponse.QuestionComponent tgt = new org.hl7.fhir.dstu2.model.QuestionnaireResponse.QuestionComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasLinkId()) { - tgt.setLinkId(src.getLinkId()); - } - if (src.hasText()) { - tgt.setText(src.getText()); - } + if (src.hasLinkIdElement()) + tgt.setLinkIdElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getLinkIdElement())); + if (src.hasTextElement()) + tgt.setTextElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getTextElement())); if (src.hasAnswer()) { for (org.hl7.fhir.r5.model.QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent t : src.getAnswer()) tgt.addAnswer(convertQuestionnaireResponseItemAnswerComponent(t)); } @@ -60,9 +57,8 @@ public class QuestionnaireResponse10_50 { if (src.hasAuthor()) { tgt.setAuthor(VersionConvertor_10_50.convertReference(src.getAuthor())); } - if (src.hasAuthored()) { - tgt.setAuthored(src.getAuthored()); - } + if (src.hasAuthoredElement()) + tgt.setAuthoredElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_50.convertType(src.getAuthoredElement())); if (src.hasSource()) { tgt.setSource(VersionConvertor_10_50.convertReference(src.getSource())); } @@ -97,9 +93,8 @@ public class QuestionnaireResponse10_50 { if (src.hasAuthor()) { tgt.setAuthor(VersionConvertor_10_50.convertReference(src.getAuthor())); } - if (src.hasAuthored()) { - tgt.setAuthored(src.getAuthored()); - } + if (src.hasAuthoredElement()) + tgt.setAuthoredElement((org.hl7.fhir.r5.model.DateTimeType) VersionConvertor_10_50.convertType(src.getAuthoredElement())); if (src.hasSource()) { tgt.setSource(VersionConvertor_10_50.convertReference(src.getSource())); } @@ -116,12 +111,10 @@ public class QuestionnaireResponse10_50 { return null; org.hl7.fhir.r5.model.QuestionnaireResponse.QuestionnaireResponseItemComponent tgt = new org.hl7.fhir.r5.model.QuestionnaireResponse.QuestionnaireResponseItemComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasLinkId()) { - tgt.setLinkId(src.getLinkId()); - } - if (src.hasText()) { - tgt.setText(src.getText()); - } + if (src.hasLinkIdElement()) + tgt.setLinkIdElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getLinkIdElement())); + if (src.hasTextElement()) + tgt.setTextElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getTextElement())); if (src.hasGroup()) { for (org.hl7.fhir.dstu2.model.QuestionnaireResponse.GroupComponent t : src.getGroup()) tgt.addItem(convertQuestionnaireResponseGroupComponent(t)); } @@ -164,12 +157,10 @@ public class QuestionnaireResponse10_50 { return null; org.hl7.fhir.r5.model.QuestionnaireResponse.QuestionnaireResponseItemComponent tgt = new org.hl7.fhir.r5.model.QuestionnaireResponse.QuestionnaireResponseItemComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasLinkId()) { - tgt.setLinkId(src.getLinkId()); - } - if (src.hasText()) { - tgt.setText(src.getText()); - } + if (src.hasLinkIdElement()) + tgt.setLinkIdElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getLinkIdElement())); + if (src.hasTextElement()) + tgt.setTextElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getTextElement())); if (src.hasAnswer()) { for (org.hl7.fhir.dstu2.model.QuestionnaireResponse.QuestionAnswerComponent t : src.getAnswer()) tgt.addAnswer(convertQuestionnaireResponseItemAnswerComponent(t)); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/RiskAssessment10_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/RiskAssessment10_50.java index eca73d875..4a97cb874 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/RiskAssessment10_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/RiskAssessment10_50.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_50; import org.hl7.fhir.convertors.VersionConvertor_10_50; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class RiskAssessment10_50 { @@ -34,9 +35,8 @@ public class RiskAssessment10_50 { if (src.hasPrediction()) { for (org.hl7.fhir.dstu2.model.RiskAssessment.RiskAssessmentPredictionComponent t : src.getPrediction()) tgt.addPrediction(convertRiskAssessmentPredictionComponent(t)); } - if (src.hasMitigation()) { - tgt.setMitigation(src.getMitigation()); - } + if (src.hasMitigationElement()) + tgt.setMitigationElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getMitigationElement())); return tgt; } @@ -69,9 +69,8 @@ public class RiskAssessment10_50 { if (src.hasPrediction()) { for (org.hl7.fhir.r5.model.RiskAssessment.RiskAssessmentPredictionComponent t : src.getPrediction()) tgt.addPrediction(convertRiskAssessmentPredictionComponent(t)); } - if (src.hasMitigation()) { - tgt.setMitigation(src.getMitigation()); - } + if (src.hasMitigationElement()) + tgt.setMitigationElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getMitigationElement())); return tgt; } @@ -86,15 +85,13 @@ public class RiskAssessment10_50 { if (src.hasProbability()) { tgt.setProbability(VersionConvertor_10_50.convertType(src.getProbability())); } - if (src.hasRelativeRisk()) { - tgt.setRelativeRisk(src.getRelativeRisk()); - } + if (src.hasRelativeRiskElement()) + tgt.setRelativeRiskElement((org.hl7.fhir.r5.model.DecimalType) VersionConvertor_10_50.convertType(src.getRelativeRiskElement())); if (src.hasWhen()) { tgt.setWhen(VersionConvertor_10_50.convertType(src.getWhen())); } - if (src.hasRationale()) { - tgt.setRationale(src.getRationale()); - } + if (src.hasRationaleElement()) + tgt.setRationaleElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getRationaleElement())); return tgt; } @@ -109,15 +106,13 @@ public class RiskAssessment10_50 { if (src.hasProbability()) { tgt.setProbability(VersionConvertor_10_50.convertType(src.getProbability())); } - if (src.hasRelativeRisk()) { - tgt.setRelativeRisk(src.getRelativeRisk()); - } + if (src.hasRelativeRiskElement()) + tgt.setRelativeRiskElement((org.hl7.fhir.dstu2.model.DecimalType) VersionConvertor_10_50.convertType(src.getRelativeRiskElement())); if (src.hasWhen()) { tgt.setWhen(VersionConvertor_10_50.convertType(src.getWhen())); } - if (src.hasRationale()) { - tgt.setRationale(src.getRationale()); - } + if (src.hasRationaleElement()) + tgt.setRationaleElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getRationaleElement())); return tgt; } } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Schedule10_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Schedule10_50.java index b4804664d..eb7a30f95 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Schedule10_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Schedule10_50.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_50; import org.hl7.fhir.convertors.VersionConvertor_10_50; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Schedule10_50 { @@ -22,9 +23,8 @@ public class Schedule10_50 { if (src.hasPlanningHorizon()) { tgt.setPlanningHorizon(VersionConvertor_10_50.convertPeriod(src.getPlanningHorizon())); } - if (src.hasComment()) { - tgt.setComment(src.getComment()); - } + if (src.hasCommentElement()) + tgt.setCommentElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getCommentElement())); return tgt; } @@ -45,9 +45,8 @@ public class Schedule10_50 { if (src.hasPlanningHorizon()) { tgt.setPlanningHorizon(VersionConvertor_10_50.convertPeriod(src.getPlanningHorizon())); } - if (src.hasComment()) { - tgt.setComment(src.getComment()); - } + if (src.hasCommentElement()) + tgt.setCommentElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getCommentElement())); return tgt; } } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/SearchParameter10_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/SearchParameter10_50.java index 31c18b719..231e83a1e 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/SearchParameter10_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/SearchParameter10_50.java @@ -1,9 +1,13 @@ package org.hl7.fhir.convertors.conv10_50; import org.hl7.fhir.convertors.VersionConvertor_10_50; +import org.hl7.fhir.dstu2.model.StringType; import org.hl7.fhir.dstu2.utils.ToolingExtensions; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r5.model.CodeType; +import org.hl7.fhir.r5.model.MarkdownType; + +import java.util.Collections; public class SearchParameter10_50 { @@ -12,46 +16,40 @@ public class SearchParameter10_50 { return null; org.hl7.fhir.dstu2.model.SearchParameter tgt = new org.hl7.fhir.dstu2.model.SearchParameter(); VersionConvertor_10_50.copyDomainResource(src, tgt); - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_50.convertType(src.getUrlElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_10_50.convertConformanceResourceStatus(src.getStatus())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) { - tgt.setPublisher(src.getPublisher()); - } + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_50.convertType(src.getExperimentalElement())); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_50.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.r5.model.ContactDetail t : src.getContact()) tgt.addContact(convertSearchParameterContactComponent(t)); } - if (src.hasPurpose()) { - tgt.setRequirements(src.getPurpose()); - } - if (src.hasCode()) { - tgt.setCode(src.getCode()); + if (src.hasPurposeElement()) { + tgt.setRequirementsElement((StringType) VersionConvertor_10_50.convertType(src.getPurposeElement())); } + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu2.model.CodeType) VersionConvertor_10_50.convertType(src.getCodeElement())); if (src.hasBase()) { for (CodeType t : src.getBase()) tgt.setBase(t.asStringValue()); } if (src.hasType()) { tgt.setType(VersionConvertor_10_50.convertSearchParamType(src.getType())); } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getDescriptionElement())); if (src.hasExpression()) { org.hl7.fhir.dstu2.utils.ToolingExtensions.setStringExtension(tgt, ToolingExtensions.EXT_EXPRESSION, src.getExpression()); } - if (src.hasXpath()) { - tgt.setXpath(src.getXpath()); - } + if (src.hasXpathElement()) + tgt.setXpathElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getXpathElement())); if (src.hasXpathUsage()) { tgt.setXpathUsage(convertXPathUsageType(src.getXpathUsage())); } @@ -66,44 +64,37 @@ public class SearchParameter10_50 { return null; org.hl7.fhir.r5.model.SearchParameter tgt = new org.hl7.fhir.r5.model.SearchParameter(); VersionConvertor_10_50.copyDomainResource(src, tgt); - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r5.model.UriType) VersionConvertor_10_50.convertType(src.getUrlElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_10_50.convertConformanceResourceStatus(src.getStatus())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) { - tgt.setPublisher(src.getPublisher()); - } + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_10_50.convertType(src.getExperimentalElement())); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.r5.model.DateTimeType) VersionConvertor_10_50.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu2.model.SearchParameter.SearchParameterContactComponent t : src.getContact()) tgt.addContact(convertSearchParameterContactComponent(t)); } - if (src.hasRequirements()) { - tgt.setPurpose(src.getRequirements()); - } - if (src.hasCode()) { - tgt.setCode(src.getCode()); - } - if (src.hasBase()) { - tgt.addBase(src.getBase()); + if (src.hasRequirementsElement()) { + tgt.setPurposeElement((MarkdownType) VersionConvertor_10_50.convertType(src.getRequirementsElement())); } + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.r5.model.CodeType) VersionConvertor_10_50.convertType(src.getCodeElement())); + if (src.hasBaseElement()) + tgt.setBase(Collections.singletonList((org.hl7.fhir.r5.model.CodeType) VersionConvertor_10_50.convertType(src.getBaseElement()))); if (src.hasType()) { tgt.setType(VersionConvertor_10_50.convertSearchParamType(src.getType())); } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r5.model.MarkdownType) VersionConvertor_10_50.convertType(src.getDescriptionElement())); tgt.setExpression(ToolingExtensions.readStringExtension(src, ToolingExtensions.EXT_EXPRESSION)); - if (src.hasXpath()) { - tgt.setXpath(src.getXpath()); - } + if (src.hasXpathElement()) + tgt.setXpathElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getXpathElement())); if (src.hasXpathUsage()) { tgt.setXpathUsage(convertXPathUsageType(src.getXpathUsage())); } @@ -118,9 +109,8 @@ public class SearchParameter10_50 { return null; org.hl7.fhir.dstu2.model.SearchParameter.SearchParameterContactComponent tgt = new org.hl7.fhir.dstu2.model.SearchParameter.SearchParameterContactComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.r5.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_50.convertContactPoint(t)); } @@ -132,9 +122,8 @@ public class SearchParameter10_50 { return null; org.hl7.fhir.r5.model.ContactDetail tgt = new org.hl7.fhir.r5.model.ContactDetail(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_50.convertContactPoint(t)); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Slot10_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Slot10_50.java index eab37bf5d..2b9f30292 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Slot10_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Slot10_50.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_50; import org.hl7.fhir.convertors.VersionConvertor_10_50; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Slot10_50 { @@ -18,18 +19,14 @@ public class Slot10_50 { if (src.hasSchedule()) { tgt.setSchedule(VersionConvertor_10_50.convertReference(src.getSchedule())); } - if (src.hasStart()) { - tgt.setStart(src.getStart()); - } - if (src.hasEnd()) { - tgt.setEnd(src.getEnd()); - } - if (src.hasOverbooked()) { - tgt.setOverbooked(src.getOverbooked()); - } - if (src.hasComment()) { - tgt.setComment(src.getComment()); - } + if (src.hasStartElement()) + tgt.setStartElement((org.hl7.fhir.r5.model.InstantType) VersionConvertor_10_50.convertType(src.getStartElement())); + if (src.hasEndElement()) + tgt.setEndElement((org.hl7.fhir.r5.model.InstantType) VersionConvertor_10_50.convertType(src.getEndElement())); + if (src.hasOverbookedElement()) + tgt.setOverbookedElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_10_50.convertType(src.getOverbookedElement())); + if (src.hasCommentElement()) + tgt.setCommentElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getCommentElement())); return tgt; } @@ -47,18 +44,14 @@ public class Slot10_50 { if (src.hasSchedule()) { tgt.setSchedule(VersionConvertor_10_50.convertReference(src.getSchedule())); } - if (src.hasStart()) { - tgt.setStart(src.getStart()); - } - if (src.hasEnd()) { - tgt.setEnd(src.getEnd()); - } - if (src.hasOverbooked()) { - tgt.setOverbooked(src.getOverbooked()); - } - if (src.hasComment()) { - tgt.setComment(src.getComment()); - } + if (src.hasStartElement()) + tgt.setStartElement((org.hl7.fhir.dstu2.model.InstantType) VersionConvertor_10_50.convertType(src.getStartElement())); + if (src.hasEndElement()) + tgt.setEndElement((org.hl7.fhir.dstu2.model.InstantType) VersionConvertor_10_50.convertType(src.getEndElement())); + if (src.hasOverbookedElement()) + tgt.setOverbookedElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_50.convertType(src.getOverbookedElement())); + if (src.hasCommentElement()) + tgt.setCommentElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getCommentElement())); return tgt; } } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/StructureDefinition10_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/StructureDefinition10_50.java index 3bd716513..09b3c637c 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/StructureDefinition10_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/StructureDefinition10_50.java @@ -1,13 +1,17 @@ package org.hl7.fhir.convertors.conv10_50; import org.hl7.fhir.convertors.VersionConvertor_10_50; +import org.hl7.fhir.dstu2.model.StringType; import org.hl7.fhir.exceptions.FHIRException; +import org.hl7.fhir.r5.model.CanonicalType; import org.hl7.fhir.r5.model.ElementDefinition; import org.hl7.fhir.r5.model.StructureDefinition.StructureDefinitionKind; import org.hl7.fhir.r5.model.StructureDefinition.TypeDerivationRule; +import org.hl7.fhir.r5.model.UriType; import org.hl7.fhir.utilities.Utilities; import java.util.ArrayList; import java.util.List; +import java.util.Collections; public class StructureDefinition10_50 { @@ -51,48 +55,42 @@ public class StructureDefinition10_50 { return null; org.hl7.fhir.dstu2.model.StructureDefinition tgt = new org.hl7.fhir.dstu2.model.StructureDefinition(); VersionConvertor_10_50.copyDomainResource(src, tgt); - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_50.convertType(src.getUrlElement())); if (src.hasIdentifier()) { for (org.hl7.fhir.r5.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_50.convertIdentifier(t)); } - if (src.hasVersion()) { - tgt.setVersion(src.getVersion()); - } - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getNameElement())); if (src.hasTitle()) { tgt.setDisplay(src.getTitle()); } if (src.hasStatus()) { tgt.setStatus(VersionConvertor_10_50.convertConformanceResourceStatus(src.getStatus())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasPublisher()) { - tgt.setPublisher(src.getPublisher()); - } + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_50.convertType(src.getExperimentalElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.r5.model.ContactDetail t : src.getContact()) tgt.addContact(convertStructureDefinitionContactComponent(t)); } - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_50.convertType(src.getDateElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getDescriptionElement())); for (org.hl7.fhir.r5.model.UsageContext t : src.getUseContext()) if (t.hasValueCodeableConcept()) tgt.addUseContext(VersionConvertor_10_50.convertCodeableConcept(t.getValueCodeableConcept())); if (src.hasJurisdiction()) { for (org.hl7.fhir.r5.model.CodeableConcept t : src.getJurisdiction()) tgt.addUseContext(VersionConvertor_10_50.convertCodeableConcept(t)); } - if (src.hasPurpose()) { - tgt.setRequirements(src.getPurpose()); - } - if (src.hasCopyright()) { - tgt.setCopyright(src.getCopyright()); + if (src.hasPurposeElement()) { + tgt.setRequirementsElement((StringType) VersionConvertor_10_50.convertType(src.getPurposeElement())); } + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getCopyrightElement())); if (src.hasKeyword()) { for (org.hl7.fhir.r5.model.Coding t : src.getKeyword()) tgt.addCode(VersionConvertor_10_50.convertCoding(t)); } @@ -104,9 +102,8 @@ public class StructureDefinition10_50 { if (src.hasKind()) { tgt.setKind(convertStructureDefinitionKind(src.getKind())); } - if (src.hasAbstract()) { - tgt.setAbstract(src.getAbstract()); - } + if (src.hasAbstractElement()) + tgt.setAbstractElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_50.convertType(src.getAbstractElement())); for (org.hl7.fhir.r5.model.StructureDefinition.StructureDefinitionContextComponent t : src.getContext()) { if (!tgt.hasContextType()) tgt.setContextType(convertExtensionContext(t.getType(), t.getExpression())); @@ -138,37 +135,32 @@ public class StructureDefinition10_50 { return null; org.hl7.fhir.r5.model.StructureDefinition tgt = new org.hl7.fhir.r5.model.StructureDefinition(); VersionConvertor_10_50.copyDomainResource(src, tgt); - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r5.model.UriType) VersionConvertor_10_50.convertType(src.getUrlElement())); if (src.hasIdentifier()) { for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_50.convertIdentifier(t)); } - if (src.hasVersion()) { - tgt.setVersion(src.getVersion()); - } - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasDisplay()) { - tgt.setTitle(src.getDisplay()); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getNameElement())); + if (src.hasDisplayElement()) { + tgt.setTitleElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getDisplayElement())); } if (src.hasStatus()) { tgt.setStatus(VersionConvertor_10_50.convertConformanceResourceStatus(src.getStatus())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasPublisher()) { - tgt.setPublisher(src.getPublisher()); - } + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_10_50.convertType(src.getExperimentalElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu2.model.StructureDefinition.StructureDefinitionContactComponent t : src.getContact()) tgt.addContact(convertStructureDefinitionContactComponent(t)); } - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.r5.model.DateTimeType) VersionConvertor_10_50.convertType(src.getDateElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r5.model.MarkdownType) VersionConvertor_10_50.convertType(src.getDescriptionElement())); for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getUseContext()) if (VersionConvertor_10_50.isJurisdiction(t)) tgt.addJurisdiction(VersionConvertor_10_50.convertCodeableConcept(t)); else @@ -176,9 +168,8 @@ public class StructureDefinition10_50 { if (src.hasRequirements()) { tgt.setPurpose(src.getRequirements()); } - if (src.hasCopyright()) { - tgt.setCopyright(src.getCopyright()); - } + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.r5.model.MarkdownType) VersionConvertor_10_50.convertType(src.getCopyrightElement())); if (src.hasCode()) { for (org.hl7.fhir.dstu2.model.Coding t : src.getCode()) tgt.addKeyword(VersionConvertor_10_50.convertCoding(t)); } @@ -191,9 +182,8 @@ public class StructureDefinition10_50 { if (src.hasKind()) { tgt.setKind(convertStructureDefinitionKind(src.getKind(), tgt.getIdElement().getIdPart())); } - if (src.hasAbstract()) { - tgt.setAbstract(src.getAbstract()); - } + if (src.hasAbstractElement()) + tgt.setAbstractElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_10_50.convertType(src.getAbstractElement())); for (org.hl7.fhir.dstu2.model.StringType t : src.getContext()) { org.hl7.fhir.r5.model.StructureDefinition.StructureDefinitionContextComponent ec = tgt.addContext(); if (src.hasContextType()) { @@ -201,16 +191,16 @@ public class StructureDefinition10_50 { } ec.setExpression("*".equals(t.getValue()) ? "Element" : t.getValue()); } - if (src.hasConstrainedType()) - tgt.setType(src.getConstrainedType()); + if (src.hasConstrainedTypeElement()) + tgt.setTypeElement((UriType) VersionConvertor_10_50.convertType(src.getConstrainedTypeElement())); else if (src.getSnapshot().hasElement()) tgt.setType(src.getSnapshot().getElement().get(0).getPath()); else if (src.getDifferential().hasElement() && !src.getDifferential().getElement().get(0).getPath().contains(".")) tgt.setType(src.getDifferential().getElement().get(0).getPath()); else tgt.setType(src.getDifferential().getElement().get(0).getPath().substring(0, src.getDifferential().getElement().get(0).getPath().indexOf("."))); - if (src.hasBase()) { - tgt.setBaseDefinition(src.getBase()); + if (src.hasBaseElement()) { + tgt.setBaseDefinitionElement((CanonicalType) VersionConvertor_10_50.convertType(src.getBaseElement())); } tgt.setDerivation(src.hasConstrainedType() ? org.hl7.fhir.r5.model.StructureDefinition.TypeDerivationRule.CONSTRAINT : org.hl7.fhir.r5.model.StructureDefinition.TypeDerivationRule.SPECIALIZATION); if (src.hasSnapshot()) { @@ -243,9 +233,8 @@ public class StructureDefinition10_50 { return null; org.hl7.fhir.dstu2.model.StructureDefinition.StructureDefinitionContactComponent tgt = new org.hl7.fhir.dstu2.model.StructureDefinition.StructureDefinitionContactComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.r5.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_50.convertContactPoint(t)); } @@ -257,9 +246,8 @@ public class StructureDefinition10_50 { return null; org.hl7.fhir.r5.model.ContactDetail tgt = new org.hl7.fhir.r5.model.ContactDetail(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_50.convertContactPoint(t)); } @@ -333,17 +321,14 @@ public class StructureDefinition10_50 { return null; org.hl7.fhir.dstu2.model.StructureDefinition.StructureDefinitionMappingComponent tgt = new org.hl7.fhir.dstu2.model.StructureDefinition.StructureDefinitionMappingComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasIdentity()) { - tgt.setIdentity(src.getIdentity()); - } - if (src.hasUri()) { - tgt.setUri(src.getUri()); - } - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasComment()) { - tgt.setComments(src.getComment()); + if (src.hasIdentityElement()) + tgt.setIdentityElement((org.hl7.fhir.dstu2.model.IdType) VersionConvertor_10_50.convertType(src.getIdentityElement())); + if (src.hasUriElement()) + tgt.setUriElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_50.convertType(src.getUriElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getNameElement())); + if (src.hasCommentElement()) { + tgt.setCommentsElement((StringType) VersionConvertor_10_50.convertType(src.getCommentElement())); } return tgt; } @@ -353,17 +338,14 @@ public class StructureDefinition10_50 { return null; org.hl7.fhir.r5.model.StructureDefinition.StructureDefinitionMappingComponent tgt = new org.hl7.fhir.r5.model.StructureDefinition.StructureDefinitionMappingComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasIdentity()) { - tgt.setIdentity(src.getIdentity()); - } - if (src.hasUri()) { - tgt.setUri(src.getUri()); - } - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasComments()) { - tgt.setComment(src.getComments()); + if (src.hasIdentityElement()) + tgt.setIdentityElement((org.hl7.fhir.r5.model.IdType) VersionConvertor_10_50.convertType(src.getIdentityElement())); + if (src.hasUriElement()) + tgt.setUriElement((org.hl7.fhir.r5.model.UriType) VersionConvertor_10_50.convertType(src.getUriElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getNameElement())); + if (src.hasCommentsElement()) { + tgt.setCommentElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getCommentsElement())); } return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Substance10_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Substance10_50.java index d35724837..8e1f62bad 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Substance10_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/Substance10_50.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_50; import org.hl7.fhir.convertors.VersionConvertor_10_50; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Substance10_50 { @@ -19,9 +20,8 @@ public class Substance10_50 { if (src.hasCode()) { tgt.setCode(VersionConvertor_10_50.convertCodeableConcept(src.getCode())); } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getDescriptionElement())); if (src.hasInstance()) { for (org.hl7.fhir.dstu2.model.Substance.SubstanceInstanceComponent t : src.getInstance()) tgt.addInstance(convertSubstanceInstanceComponent(t)); } @@ -45,9 +45,8 @@ public class Substance10_50 { if (src.hasCode()) { tgt.setCode(VersionConvertor_10_50.convertCodeableConcept(src.getCode())); } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getDescriptionElement())); if (src.hasInstance()) { for (org.hl7.fhir.r5.model.Substance.SubstanceInstanceComponent t : src.getInstance()) tgt.addInstance(convertSubstanceInstanceComponent(t)); } @@ -90,9 +89,8 @@ public class Substance10_50 { if (src.hasIdentifier()) { tgt.setIdentifier(VersionConvertor_10_50.convertIdentifier(src.getIdentifier())); } - if (src.hasExpiry()) { - tgt.setExpiry(src.getExpiry()); - } + if (src.hasExpiryElement()) + tgt.setExpiryElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_50.convertType(src.getExpiryElement())); if (src.hasQuantity()) { tgt.setQuantity(VersionConvertor_10_50.convertSimpleQuantity(src.getQuantity())); } @@ -107,9 +105,8 @@ public class Substance10_50 { if (src.hasIdentifier()) { tgt.setIdentifier(VersionConvertor_10_50.convertIdentifier(src.getIdentifier())); } - if (src.hasExpiry()) { - tgt.setExpiry(src.getExpiry()); - } + if (src.hasExpiryElement()) + tgt.setExpiryElement((org.hl7.fhir.r5.model.DateTimeType) VersionConvertor_10_50.convertType(src.getExpiryElement())); if (src.hasQuantity()) { tgt.setQuantity(VersionConvertor_10_50.convertSimpleQuantity(src.getQuantity())); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/SupplyDelivery10_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/SupplyDelivery10_50.java index 3f520e370..bbb470dc1 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/SupplyDelivery10_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/SupplyDelivery10_50.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_50; import org.hl7.fhir.convertors.VersionConvertor_10_50; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class SupplyDelivery10_50 { diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/SupplyRequest10_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/SupplyRequest10_50.java index fb48a3669..5a84d82a3 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/SupplyRequest10_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/SupplyRequest10_50.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_50; import org.hl7.fhir.convertors.VersionConvertor_10_50; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class SupplyRequest10_50 { diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/TestScript10_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/TestScript10_50.java index 2716ddc96..72d4e98a5 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/TestScript10_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/TestScript10_50.java @@ -1,8 +1,10 @@ package org.hl7.fhir.convertors.conv10_50; import org.hl7.fhir.convertors.VersionConvertor_10_50; +import org.hl7.fhir.dstu2.model.IdType; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r5.model.TestScript; +import java.util.Collections; public class TestScript10_50 { @@ -184,60 +186,47 @@ public class TestScript10_50 { return null; org.hl7.fhir.r5.model.TestScript.SetupActionAssertComponent tgt = new org.hl7.fhir.r5.model.TestScript.SetupActionAssertComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasLabel()) { - tgt.setLabel(src.getLabel()); - } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasLabelElement()) + tgt.setLabelElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getLabelElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getDescriptionElement())); if (src.hasDirection()) { tgt.setDirection(convertAssertionDirectionType(src.getDirection())); } - if (src.hasCompareToSourceId()) { - tgt.setCompareToSourceId(src.getCompareToSourceId()); - } - if (src.hasCompareToSourcePath()) { - tgt.setCompareToSourcePath(src.getCompareToSourcePath()); - } + if (src.hasCompareToSourceIdElement()) + tgt.setCompareToSourceIdElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getCompareToSourceIdElement())); + if (src.hasCompareToSourcePathElement()) + tgt.setCompareToSourcePathElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getCompareToSourcePathElement())); if (src.hasContentType()) { tgt.setContentType(convertContentType(src.getContentType())); } - if (src.hasHeaderField()) { - tgt.setHeaderField(src.getHeaderField()); - } - if (src.hasMinimumId()) { - tgt.setMinimumId(src.getMinimumId()); - } - if (src.hasNavigationLinks()) { - tgt.setNavigationLinks(src.getNavigationLinks()); - } + if (src.hasHeaderFieldElement()) + tgt.setHeaderFieldElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getHeaderFieldElement())); + if (src.hasMinimumIdElement()) + tgt.setMinimumIdElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getMinimumIdElement())); + if (src.hasNavigationLinksElement()) + tgt.setNavigationLinksElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_10_50.convertType(src.getNavigationLinksElement())); if (src.hasOperator()) { tgt.setOperator(convertAssertionOperatorType(src.getOperator())); } - if (src.hasPath()) { - tgt.setPath(src.getPath()); - } + if (src.hasPathElement()) + tgt.setPathElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getPathElement())); if (src.hasResource()) { tgt.setResource(TestScript.FHIRDefinedType.fromCode(src.getResource())); } if (src.hasResponse()) { tgt.setResponse(convertAssertionResponseTypes(src.getResponse())); } - if (src.hasResponseCode()) { - tgt.setResponseCode(src.getResponseCode()); - } - if (src.hasSourceId()) { - tgt.setSourceId(src.getSourceId()); - } - if (src.hasValidateProfileId()) { - tgt.setValidateProfileId(src.getValidateProfileId()); - } - if (src.hasValue()) { - tgt.setValue(src.getValue()); - } - if (src.hasWarningOnly()) { - tgt.setWarningOnly(src.getWarningOnly()); - } + if (src.hasResponseCodeElement()) + tgt.setResponseCodeElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getResponseCodeElement())); + if (src.hasSourceIdElement()) + tgt.setSourceIdElement((org.hl7.fhir.r5.model.IdType) VersionConvertor_10_50.convertType(src.getSourceIdElement())); + if (src.hasValidateProfileIdElement()) + tgt.setValidateProfileIdElement((org.hl7.fhir.r5.model.IdType) VersionConvertor_10_50.convertType(src.getValidateProfileIdElement())); + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getValueElement())); + if (src.hasWarningOnlyElement()) + tgt.setWarningOnlyElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_10_50.convertType(src.getWarningOnlyElement())); return tgt; } @@ -246,60 +235,47 @@ public class TestScript10_50 { return null; org.hl7.fhir.dstu2.model.TestScript.TestScriptSetupActionAssertComponent tgt = new org.hl7.fhir.dstu2.model.TestScript.TestScriptSetupActionAssertComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasLabel()) { - tgt.setLabel(src.getLabel()); - } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasLabelElement()) + tgt.setLabelElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getLabelElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getDescriptionElement())); if (src.hasDirection()) { tgt.setDirection(convertAssertionDirectionType(src.getDirection())); } - if (src.hasCompareToSourceId()) { - tgt.setCompareToSourceId(src.getCompareToSourceId()); - } - if (src.hasCompareToSourcePath()) { - tgt.setCompareToSourcePath(src.getCompareToSourcePath()); - } + if (src.hasCompareToSourceIdElement()) + tgt.setCompareToSourceIdElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getCompareToSourceIdElement())); + if (src.hasCompareToSourcePathElement()) + tgt.setCompareToSourcePathElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getCompareToSourcePathElement())); if (src.hasContentType()) { - tgt.setContentType(convertContentType(src.getContentType())); - } - if (src.hasHeaderField()) { - tgt.setHeaderField(src.getHeaderField()); - } - if (src.hasMinimumId()) { - tgt.setMinimumId(src.getMinimumId()); - } - if (src.hasNavigationLinks()) { - tgt.setNavigationLinks(src.getNavigationLinks()); + tgt.setContentType(convertContentType(src.getContentType())); } + if (src.hasHeaderFieldElement()) + tgt.setHeaderFieldElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getHeaderFieldElement())); + if (src.hasMinimumIdElement()) + tgt.setMinimumIdElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getMinimumIdElement())); + if (src.hasNavigationLinksElement()) + tgt.setNavigationLinksElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_50.convertType(src.getNavigationLinksElement())); if (src.hasOperator()) { tgt.setOperator(convertAssertionOperatorType(src.getOperator())); } - if (src.hasPath()) { - tgt.setPath(src.getPath()); - } + if (src.hasPathElement()) + tgt.setPathElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getPathElement())); if (src.hasResource()) { tgt.setResource(src.getResource().toCode()); } if (src.hasResponse()) { tgt.setResponse(convertAssertionResponseTypes(src.getResponse())); } - if (src.hasResponseCode()) { - tgt.setResponseCode(src.getResponseCode()); - } - if (src.hasSourceId()) { - tgt.setSourceId(src.getSourceId()); - } - if (src.hasValidateProfileId()) { - tgt.setValidateProfileId(src.getValidateProfileId()); - } - if (src.hasValue()) { - tgt.setValue(src.getValue()); - } - if (src.hasWarningOnly()) { - tgt.setWarningOnly(src.getWarningOnly()); - } + if (src.hasResponseCodeElement()) + tgt.setResponseCodeElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getResponseCodeElement())); + if (src.hasSourceIdElement()) + tgt.setSourceIdElement((org.hl7.fhir.dstu2.model.IdType) VersionConvertor_10_50.convertType(src.getSourceIdElement())); + if (src.hasValidateProfileIdElement()) + tgt.setValidateProfileIdElement((org.hl7.fhir.dstu2.model.IdType) VersionConvertor_10_50.convertType(src.getValidateProfileIdElement())); + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getValueElement())); + if (src.hasWarningOnlyElement()) + tgt.setWarningOnlyElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_50.convertType(src.getWarningOnlyElement())); return tgt; } @@ -342,42 +318,34 @@ public class TestScript10_50 { if (src.hasResource()) { tgt.setResource(src.getResource().toCode()); } - if (src.hasLabel()) { - tgt.setLabel(src.getLabel()); - } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasLabelElement()) + tgt.setLabelElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getLabelElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getDescriptionElement())); if (src.hasAccept()) { - tgt.setAccept(convertContentType(src.getAccept())); + tgt.setAccept(convertContentType(src.getAccept())); } if (src.hasContentType()) { - tgt.setContentType(convertContentType(src.getContentType())); - } - if (src.hasDestination()) { - tgt.setDestination(src.getDestination()); - } - if (src.hasEncodeRequestUrl()) { - tgt.setEncodeRequestUrl(src.getEncodeRequestUrl()); - } - if (src.hasParams()) { - tgt.setParams(src.getParams()); + tgt.setContentType(convertContentType(src.getContentType())); } + if (src.hasDestinationElement()) + tgt.setDestinationElement((org.hl7.fhir.dstu2.model.IntegerType) VersionConvertor_10_50.convertType(src.getDestinationElement())); + if (src.hasEncodeRequestUrlElement()) + tgt.setEncodeRequestUrlElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_50.convertType(src.getEncodeRequestUrlElement())); + if (src.hasParamsElement()) + tgt.setParamsElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getParamsElement())); if (src.hasRequestHeader()) { for (org.hl7.fhir.r5.model.TestScript.SetupActionOperationRequestHeaderComponent t : src.getRequestHeader()) tgt.addRequestHeader(convertSetupActionOperationRequestHeaderComponent(t)); } - if (src.hasResponseId()) { - tgt.setResponseId(src.getResponseId()); - } - if (src.hasSourceId()) { - tgt.setSourceId(src.getSourceId()); - } - if (src.hasTargetId()) { - tgt.setTargetId(src.getTargetId()); - } - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); + if (src.hasResponseIdElement()) + tgt.setResponseIdElement((org.hl7.fhir.dstu2.model.IdType) VersionConvertor_10_50.convertType(src.getResponseIdElement())); + if (src.hasSourceIdElement()) + tgt.setSourceIdElement((org.hl7.fhir.dstu2.model.IdType) VersionConvertor_10_50.convertType(src.getSourceIdElement())); + if (src.hasTargetIdElement()) { + tgt.setTargetIdElement((IdType) VersionConvertor_10_50.convertType(src.getTargetIdElement())); } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getUrlElement())); return tgt; } @@ -390,44 +358,36 @@ public class TestScript10_50 { tgt.setType(VersionConvertor_10_50.convertCoding(src.getType())); } if (src.hasResource()) { - tgt.setResource(TestScript.FHIRDefinedType.fromCode(src.getResource())); - } - if (src.hasLabel()) { - tgt.setLabel(src.getLabel()); - } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); + tgt.setResource(TestScript.FHIRDefinedType.fromCode(src.getResource())); } + if (src.hasLabelElement()) + tgt.setLabelElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getLabelElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getDescriptionElement())); if (src.hasAccept()) { - tgt.setAccept(convertContentType(src.getAccept())); + tgt.setAccept(convertContentType(src.getAccept())); } if (src.hasContentType()) { - tgt.setContentType(convertContentType(src.getContentType())); - } - if (src.hasDestination()) { - tgt.setDestination(src.getDestination()); - } - if (src.hasEncodeRequestUrl()) { - tgt.setEncodeRequestUrl(src.getEncodeRequestUrl()); - } - if (src.hasParams()) { - tgt.setParams(src.getParams()); + tgt.setContentType(convertContentType(src.getContentType())); } + if (src.hasDestinationElement()) + tgt.setDestinationElement((org.hl7.fhir.r5.model.IntegerType) VersionConvertor_10_50.convertType(src.getDestinationElement())); + if (src.hasEncodeRequestUrlElement()) + tgt.setEncodeRequestUrlElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_10_50.convertType(src.getEncodeRequestUrlElement())); + if (src.hasParamsElement()) + tgt.setParamsElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getParamsElement())); if (src.hasRequestHeader()) { for (org.hl7.fhir.dstu2.model.TestScript.TestScriptSetupActionOperationRequestHeaderComponent t : src.getRequestHeader()) tgt.addRequestHeader(convertSetupActionOperationRequestHeaderComponent(t)); } - if (src.hasResponseId()) { - tgt.setResponseId(src.getResponseId()); - } - if (src.hasSourceId()) { - tgt.setSourceId(src.getSourceId()); - } - if (src.hasTargetId()) { - tgt.setTargetId(src.getTargetId()); - } - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); + if (src.hasResponseIdElement()) + tgt.setResponseIdElement((org.hl7.fhir.r5.model.IdType) VersionConvertor_10_50.convertType(src.getResponseIdElement())); + if (src.hasSourceIdElement()) + tgt.setSourceIdElement((org.hl7.fhir.r5.model.IdType) VersionConvertor_10_50.convertType(src.getSourceIdElement())); + if (src.hasTargetIdElement()) { + tgt.setTargetIdElement((org.hl7.fhir.r5.model.IdType) VersionConvertor_10_50.convertType(src.getTargetIdElement())); } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getUrlElement())); return tgt; } @@ -436,12 +396,10 @@ public class TestScript10_50 { return null; org.hl7.fhir.r5.model.TestScript.SetupActionOperationRequestHeaderComponent tgt = new org.hl7.fhir.r5.model.TestScript.SetupActionOperationRequestHeaderComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasField()) { - tgt.setField(src.getField()); - } - if (src.hasValue()) { - tgt.setValue(src.getValue()); - } + if (src.hasFieldElement()) + tgt.setFieldElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getFieldElement())); + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getValueElement())); return tgt; } @@ -450,12 +408,10 @@ public class TestScript10_50 { return null; org.hl7.fhir.dstu2.model.TestScript.TestScriptSetupActionOperationRequestHeaderComponent tgt = new org.hl7.fhir.dstu2.model.TestScript.TestScriptSetupActionOperationRequestHeaderComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasField()) { - tgt.setField(src.getField()); - } - if (src.hasValue()) { - tgt.setValue(src.getValue()); - } + if (src.hasFieldElement()) + tgt.setFieldElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getFieldElement())); + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getValueElement())); return tgt; } @@ -514,34 +470,29 @@ public class TestScript10_50 { return null; org.hl7.fhir.r5.model.TestScript tgt = new org.hl7.fhir.r5.model.TestScript(); VersionConvertor_10_50.copyDomainResource(src, tgt); - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } - if (src.hasVersion()) { - tgt.setVersion(src.getVersion()); - } - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r5.model.UriType) VersionConvertor_10_50.convertType(src.getUrlElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_10_50.convertConformanceResourceStatus(src.getStatus())); } if (src.hasIdentifier()) { tgt.addIdentifier(VersionConvertor_10_50.convertIdentifier(src.getIdentifier())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasPublisher()) { - tgt.setPublisher(src.getPublisher()); - } + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_10_50.convertType(src.getExperimentalElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu2.model.TestScript.TestScriptContactComponent t : src.getContact()) tgt.addContact(convertTestScriptContactComponent(t)); } - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.r5.model.DateTimeType) VersionConvertor_10_50.convertType(src.getDateElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r5.model.MarkdownType) VersionConvertor_10_50.convertType(src.getDescriptionElement())); for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getUseContext()) if (VersionConvertor_10_50.isJurisdiction(t)) tgt.addJurisdiction(VersionConvertor_10_50.convertCodeableConcept(t)); else @@ -549,9 +500,8 @@ public class TestScript10_50 { if (src.hasRequirements()) { tgt.setPurpose(src.getRequirements()); } - if (src.hasCopyright()) { - tgt.setCopyright(src.getCopyright()); - } + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.r5.model.MarkdownType) VersionConvertor_10_50.convertType(src.getCopyrightElement())); if (src.hasMetadata()) { tgt.setMetadata(convertTestScriptMetadataComponent(src.getMetadata())); } @@ -581,15 +531,12 @@ public class TestScript10_50 { return null; org.hl7.fhir.dstu2.model.TestScript tgt = new org.hl7.fhir.dstu2.model.TestScript(); VersionConvertor_10_50.copyDomainResource(src, tgt); - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } - if (src.hasVersion()) { - tgt.setVersion(src.getVersion()); - } - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_50.convertType(src.getUrlElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_10_50.convertConformanceResourceStatus(src.getStatus())); } @@ -598,19 +545,17 @@ public class TestScript10_50 { tgt.setIdentifier(VersionConvertor_10_50.convertIdentifier(src.getIdentifierFirstRep())); } } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasPublisher()) { - tgt.setPublisher(src.getPublisher()); - } + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_50.convertType(src.getExperimentalElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.r5.model.ContactDetail t : src.getContact()) tgt.addContact(convertTestScriptContactComponent(t)); } - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_50.convertType(src.getDateElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getDescriptionElement())); for (org.hl7.fhir.r5.model.UsageContext t : src.getUseContext()) if (t.hasValueCodeableConcept()) tgt.addUseContext(VersionConvertor_10_50.convertCodeableConcept(t.getValueCodeableConcept())); if (src.hasJurisdiction()) { @@ -619,9 +564,8 @@ public class TestScript10_50 { if (src.hasPurpose()) { tgt.setRequirements(src.getPurpose()); } - if (src.hasCopyright()) { - tgt.setCopyright(src.getCopyright()); - } + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getCopyrightElement())); if (src.hasMetadata()) { tgt.setMetadata(convertTestScriptMetadataComponent(src.getMetadata())); } @@ -651,9 +595,8 @@ public class TestScript10_50 { return null; org.hl7.fhir.r5.model.ContactDetail tgt = new org.hl7.fhir.r5.model.ContactDetail(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_50.convertContactPoint(t)); } @@ -665,9 +608,8 @@ public class TestScript10_50 { return null; org.hl7.fhir.dstu2.model.TestScript.TestScriptContactComponent tgt = new org.hl7.fhir.dstu2.model.TestScript.TestScriptContactComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.r5.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_50.convertContactPoint(t)); } @@ -679,12 +621,10 @@ public class TestScript10_50 { return null; org.hl7.fhir.r5.model.TestScript.TestScriptFixtureComponent tgt = new org.hl7.fhir.r5.model.TestScript.TestScriptFixtureComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasAutocreate()) { - tgt.setAutocreate(src.getAutocreate()); - } - if (src.hasAutodelete()) { - tgt.setAutodelete(src.getAutodelete()); - } + if (src.hasAutocreateElement()) + tgt.setAutocreateElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_10_50.convertType(src.getAutocreateElement())); + if (src.hasAutodeleteElement()) + tgt.setAutodeleteElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_10_50.convertType(src.getAutodeleteElement())); if (src.hasResource()) { tgt.setResource(VersionConvertor_10_50.convertReference(src.getResource())); } @@ -696,12 +636,10 @@ public class TestScript10_50 { return null; org.hl7.fhir.dstu2.model.TestScript.TestScriptFixtureComponent tgt = new org.hl7.fhir.dstu2.model.TestScript.TestScriptFixtureComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasAutocreate()) { - tgt.setAutocreate(src.getAutocreate()); - } - if (src.hasAutodelete()) { - tgt.setAutodelete(src.getAutodelete()); - } + if (src.hasAutocreateElement()) + tgt.setAutocreateElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_50.convertType(src.getAutocreateElement())); + if (src.hasAutodeleteElement()) + tgt.setAutodeleteElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_50.convertType(src.getAutodeleteElement())); if (src.hasResource()) { tgt.setResource(VersionConvertor_10_50.convertReference(src.getResource())); } @@ -713,18 +651,14 @@ public class TestScript10_50 { return null; org.hl7.fhir.dstu2.model.TestScript.TestScriptMetadataCapabilityComponent tgt = new org.hl7.fhir.dstu2.model.TestScript.TestScriptMetadataCapabilityComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasRequired()) { - tgt.setRequired(src.getRequired()); - } - if (src.hasValidated()) { - tgt.setValidated(src.getValidated()); - } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } - if (src.hasDestination()) { - tgt.setDestination(src.getDestination()); - } + if (src.hasRequiredElement()) + tgt.setRequiredElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_50.convertType(src.getRequiredElement())); + if (src.hasValidatedElement()) + tgt.setValidatedElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_50.convertType(src.getValidatedElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getDescriptionElement())); + if (src.hasDestinationElement()) + tgt.setDestinationElement((org.hl7.fhir.dstu2.model.IntegerType) VersionConvertor_10_50.convertType(src.getDestinationElement())); if (src.hasLink()) { for (org.hl7.fhir.r5.model.UriType t : src.getLink()) tgt.addLink(t.getValue()); } @@ -739,18 +673,14 @@ public class TestScript10_50 { return null; org.hl7.fhir.r5.model.TestScript.TestScriptMetadataCapabilityComponent tgt = new org.hl7.fhir.r5.model.TestScript.TestScriptMetadataCapabilityComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasRequired()) { - tgt.setRequired(src.getRequired()); - } - if (src.hasValidated()) { - tgt.setValidated(src.getValidated()); - } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } - if (src.hasDestination()) { - tgt.setDestination(src.getDestination()); - } + if (src.hasRequiredElement()) + tgt.setRequiredElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_10_50.convertType(src.getRequiredElement())); + if (src.hasValidatedElement()) + tgt.setValidatedElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_10_50.convertType(src.getValidatedElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getDescriptionElement())); + if (src.hasDestinationElement()) + tgt.setDestinationElement((org.hl7.fhir.r5.model.IntegerType) VersionConvertor_10_50.convertType(src.getDestinationElement())); if (src.hasLink()) { for (org.hl7.fhir.dstu2.model.UriType t : src.getLink()) tgt.addLink(t.getValue()); } @@ -793,12 +723,10 @@ public class TestScript10_50 { return null; org.hl7.fhir.dstu2.model.TestScript.TestScriptMetadataLinkComponent tgt = new org.hl7.fhir.dstu2.model.TestScript.TestScriptMetadataLinkComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_50.convertType(src.getUrlElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getDescriptionElement())); return tgt; } @@ -807,12 +735,10 @@ public class TestScript10_50 { return null; org.hl7.fhir.r5.model.TestScript.TestScriptMetadataLinkComponent tgt = new org.hl7.fhir.r5.model.TestScript.TestScriptMetadataLinkComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r5.model.UriType) VersionConvertor_10_50.convertType(src.getUrlElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getDescriptionElement())); return tgt; } @@ -865,12 +791,10 @@ public class TestScript10_50 { return null; org.hl7.fhir.r5.model.TestScript.TestScriptTestComponent tgt = new org.hl7.fhir.r5.model.TestScript.TestScriptTestComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getNameElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getDescriptionElement())); if (src.hasAction()) { for (org.hl7.fhir.dstu2.model.TestScript.TestScriptTestActionComponent t : src.getAction()) tgt.addAction(convertTestActionComponent(t)); } @@ -882,12 +806,10 @@ public class TestScript10_50 { return null; org.hl7.fhir.dstu2.model.TestScript.TestScriptTestComponent tgt = new org.hl7.fhir.dstu2.model.TestScript.TestScriptTestComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getNameElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getDescriptionElement())); if (src.hasAction()) { for (org.hl7.fhir.r5.model.TestScript.TestActionComponent t : src.getAction()) tgt.addAction(convertTestActionComponent(t)); } @@ -899,18 +821,14 @@ public class TestScript10_50 { return null; org.hl7.fhir.dstu2.model.TestScript.TestScriptVariableComponent tgt = new org.hl7.fhir.dstu2.model.TestScript.TestScriptVariableComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasHeaderField()) { - tgt.setHeaderField(src.getHeaderField()); - } - if (src.hasPath()) { - tgt.setPath(src.getPath()); - } - if (src.hasSourceId()) { - tgt.setSourceId(src.getSourceId()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getNameElement())); + if (src.hasHeaderFieldElement()) + tgt.setHeaderFieldElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getHeaderFieldElement())); + if (src.hasPathElement()) + tgt.setPathElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getPathElement())); + if (src.hasSourceIdElement()) + tgt.setSourceIdElement((org.hl7.fhir.dstu2.model.IdType) VersionConvertor_10_50.convertType(src.getSourceIdElement())); return tgt; } @@ -919,18 +837,14 @@ public class TestScript10_50 { return null; org.hl7.fhir.r5.model.TestScript.TestScriptVariableComponent tgt = new org.hl7.fhir.r5.model.TestScript.TestScriptVariableComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasHeaderField()) { - tgt.setHeaderField(src.getHeaderField()); - } - if (src.hasPath()) { - tgt.setPath(src.getPath()); - } - if (src.hasSourceId()) { - tgt.setSourceId(src.getSourceId()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getNameElement())); + if (src.hasHeaderFieldElement()) + tgt.setHeaderFieldElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getHeaderFieldElement())); + if (src.hasPathElement()) + tgt.setPathElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getPathElement())); + if (src.hasSourceIdElement()) + tgt.setSourceIdElement((org.hl7.fhir.r5.model.IdType) VersionConvertor_10_50.convertType(src.getSourceIdElement())); return tgt; } } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/ValueSet10_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/ValueSet10_50.java index cf360de9c..fa9fbf1f2 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/ValueSet10_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/ValueSet10_50.java @@ -2,13 +2,19 @@ package org.hl7.fhir.convertors.conv10_50; import org.hl7.fhir.convertors.VersionConvertorAdvisor50; import org.hl7.fhir.convertors.VersionConvertor_10_50; +import org.hl7.fhir.dstu2.model.DateType; +import org.hl7.fhir.dstu2.model.StringType; +import org.hl7.fhir.dstu2.model.UriType; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r5.model.BooleanType; import org.hl7.fhir.r5.model.CodeSystem; import org.hl7.fhir.r5.model.CodeSystem.CodeSystemContentMode; import org.hl7.fhir.r5.model.CodeSystem.ConceptDefinitionComponent; +import org.hl7.fhir.r5.model.DateTimeType; +import org.hl7.fhir.r5.model.MarkdownType; import org.hl7.fhir.r5.terminologies.CodeSystemUtilities; import java.util.List; +import java.util.Collections; public class ValueSet10_50 { @@ -17,12 +23,10 @@ public class ValueSet10_50 { return null; org.hl7.fhir.r5.model.ValueSet.ConceptReferenceComponent tgt = new org.hl7.fhir.r5.model.ValueSet.ConceptReferenceComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasCode()) { - tgt.setCode(src.getCode()); - } - if (src.hasDisplay()) { - tgt.setDisplay(src.getDisplay()); - } + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.r5.model.CodeType) VersionConvertor_10_50.convertType(src.getCodeElement())); + if (src.hasDisplayElement()) + tgt.setDisplayElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getDisplayElement())); if (src.hasDesignation()) { for (org.hl7.fhir.dstu2.model.ValueSet.ConceptDefinitionDesignationComponent t : src.getDesignation()) tgt.addDesignation(convertConceptReferenceDesignationComponent(t)); } @@ -34,12 +38,10 @@ public class ValueSet10_50 { return null; org.hl7.fhir.dstu2.model.ValueSet.ConceptReferenceComponent tgt = new org.hl7.fhir.dstu2.model.ValueSet.ConceptReferenceComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasCode()) { - tgt.setCode(src.getCode()); - } - if (src.hasDisplay()) { - tgt.setDisplay(src.getDisplay()); - } + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu2.model.CodeType) VersionConvertor_10_50.convertType(src.getCodeElement())); + if (src.hasDisplayElement()) + tgt.setDisplayElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getDisplayElement())); if (src.hasDesignation()) { for (org.hl7.fhir.r5.model.ValueSet.ConceptReferenceDesignationComponent t : src.getDesignation()) tgt.addDesignation(convertConceptReferenceDesignationComponent(t)); } @@ -51,15 +53,13 @@ public class ValueSet10_50 { return null; org.hl7.fhir.r5.model.ValueSet.ConceptReferenceDesignationComponent tgt = new org.hl7.fhir.r5.model.ValueSet.ConceptReferenceDesignationComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasLanguage()) { - tgt.setLanguage(src.getLanguage()); - } + if (src.hasLanguageElement()) + tgt.setLanguageElement((org.hl7.fhir.r5.model.CodeType) VersionConvertor_10_50.convertType(src.getLanguageElement())); if (src.hasUse()) { tgt.setUse(VersionConvertor_10_50.convertCoding(src.getUse())); } - if (src.hasValue()) { - tgt.setValue(src.getValue()); - } + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getValueElement())); return tgt; } @@ -68,15 +68,13 @@ public class ValueSet10_50 { return null; org.hl7.fhir.dstu2.model.ValueSet.ConceptDefinitionDesignationComponent tgt = new org.hl7.fhir.dstu2.model.ValueSet.ConceptDefinitionDesignationComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasLanguage()) { - tgt.setLanguage(src.getLanguage()); - } + if (src.hasLanguageElement()) + tgt.setLanguageElement((org.hl7.fhir.dstu2.model.CodeType) VersionConvertor_10_50.convertType(src.getLanguageElement())); if (src.hasUse()) { tgt.setUse(VersionConvertor_10_50.convertCoding(src.getUse())); } - if (src.hasValue()) { - tgt.setValue(src.getValue()); - } + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getValueElement())); return tgt; } @@ -85,12 +83,10 @@ public class ValueSet10_50 { return null; org.hl7.fhir.r5.model.ValueSet.ConceptSetComponent tgt = new org.hl7.fhir.r5.model.ValueSet.ConceptSetComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasSystem()) { - tgt.setSystem(src.getSystem()); - } - if (src.hasVersion()) { - tgt.setVersion(src.getVersion()); - } + if (src.hasSystemElement()) + tgt.setSystemElement((org.hl7.fhir.r5.model.UriType) VersionConvertor_10_50.convertType(src.getSystemElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getVersionElement())); if (src.hasConcept()) { for (org.hl7.fhir.dstu2.model.ValueSet.ConceptReferenceComponent t : src.getConcept()) tgt.addConcept(convertConceptReferenceComponent(t)); } @@ -105,12 +101,10 @@ public class ValueSet10_50 { return null; org.hl7.fhir.dstu2.model.ValueSet.ConceptSetComponent tgt = new org.hl7.fhir.dstu2.model.ValueSet.ConceptSetComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasSystem()) { - tgt.setSystem(src.getSystem()); - } - if (src.hasVersion()) { - tgt.setVersion(src.getVersion()); - } + if (src.hasSystemElement()) + tgt.setSystemElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_50.convertType(src.getSystemElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getVersionElement())); if (src.hasConcept()) { for (org.hl7.fhir.r5.model.ValueSet.ConceptReferenceComponent t : src.getConcept()) tgt.addConcept(convertConceptReferenceComponent(t)); } @@ -125,15 +119,13 @@ public class ValueSet10_50 { return null; org.hl7.fhir.dstu2.model.ValueSet.ConceptSetFilterComponent tgt = new org.hl7.fhir.dstu2.model.ValueSet.ConceptSetFilterComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasProperty()) { - tgt.setProperty(src.getProperty()); - } + if (src.hasPropertyElement()) + tgt.setPropertyElement((org.hl7.fhir.dstu2.model.CodeType) VersionConvertor_10_50.convertType(src.getPropertyElement())); if (src.hasOp()) { tgt.setOp(convertFilterOperator(src.getOp())); } - if (src.hasValue()) { - tgt.setValue(src.getValue()); - } + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.dstu2.model.CodeType) VersionConvertor_10_50.convertType(src.getValueElement())); return tgt; } @@ -142,15 +134,13 @@ public class ValueSet10_50 { return null; org.hl7.fhir.r5.model.ValueSet.ConceptSetFilterComponent tgt = new org.hl7.fhir.r5.model.ValueSet.ConceptSetFilterComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasProperty()) { - tgt.setProperty(src.getProperty()); - } + if (src.hasPropertyElement()) + tgt.setPropertyElement((org.hl7.fhir.r5.model.CodeType) VersionConvertor_10_50.convertType(src.getPropertyElement())); if (src.hasOp()) { tgt.setOp(convertFilterOperator(src.getOp())); } - if (src.hasValue()) { - tgt.setValue(src.getValue()); - } + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getValueElement())); return tgt; } @@ -201,25 +191,25 @@ public class ValueSet10_50 { return null; org.hl7.fhir.dstu2.model.ValueSet tgt = new org.hl7.fhir.dstu2.model.ValueSet(); VersionConvertor_10_50.copyDomainResource(src, tgt); - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) tgt.setUrlElement((UriType) VersionConvertor_10_50.convertType(src.getUrlElement())); for (org.hl7.fhir.r5.model.Identifier i : src.getIdentifier()) tgt.setIdentifier(VersionConvertor_10_50.convertIdentifier(i)); - tgt.setVersion(src.getVersion()); - tgt.setName(src.getName()); - tgt.setStatus(VersionConvertor_10_50.convertConformanceResourceStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - tgt.setPublisher(src.getPublisher()); + if (src.hasVersion()) tgt.setVersionElement((StringType) VersionConvertor_10_50.convertType(src.getVersionElement())); + if (src.hasNameElement()) tgt.setNameElement((StringType) VersionConvertor_10_50.convertType(src.getNameElement())); + if (src.hasStatus()) tgt.setStatus(VersionConvertor_10_50.convertConformanceResourceStatus(src.getStatus())); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_50.convertType(src.getExperimentalElement())); + if (src.hasPublisherElement()) tgt.setPublisherElement((StringType) VersionConvertor_10_50.convertType(src.getPublisherElement())); for (org.hl7.fhir.r5.model.ContactDetail t : src.getContact()) tgt.addContact(convertValueSetContactComponent(t)); - if (src.hasDate()) - tgt.setDate(src.getDate()); - tgt.setLockedDate(src.getCompose().getLockedDate()); - tgt.setDescription(src.getDescription()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_50.convertType(src.getDateElement())); + if (src.getCompose().hasLockedDateElement()) tgt.setLockedDateElement((DateType) VersionConvertor_10_50.convertType(src.getCompose().getLockedDateElement())); + if (src.hasDescriptionElement()) tgt.setDescriptionElement((StringType) VersionConvertor_10_50.convertType(src.getDescriptionElement())); for (org.hl7.fhir.r5.model.UsageContext t : src.getUseContext()) if (t.hasValueCodeableConcept()) tgt.addUseContext(VersionConvertor_10_50.convertCodeableConcept(t.getValueCodeableConcept())); for (org.hl7.fhir.r5.model.CodeableConcept t : src.getJurisdiction()) tgt.addUseContext(VersionConvertor_10_50.convertCodeableConcept(t)); - tgt.setImmutable(src.getImmutable()); - tgt.setRequirements(src.getPurpose()); - tgt.setCopyright(src.getCopyright()); + if (src.hasImmutableElement()) tgt.setImmutableElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_50.convertType(src.getImmutableElement())); + if (src.hasPurposeElement()) tgt.setRequirementsElement((StringType) VersionConvertor_10_50.convertType(src.getPurposeElement())); + if (src.hasCopyright()) tgt.setCopyright(src.getCopyright()); if (src.hasExtension("http://hl7.org/fhir/StructureDefinition/valueset-extensible")) tgt.setExtensible(((BooleanType) src.getExtensionByUrl("http://hl7.org/fhir/StructureDefinition/valueset-extensible").getValue()).booleanValue()); org.hl7.fhir.r5.model.CodeSystem srcCS = (CodeSystem) src.getUserData("r2-cs"); @@ -231,8 +221,8 @@ public class ValueSet10_50 { tgt.getCodeSystem().setCaseSensitive(srcCS.getCaseSensitive()); for (org.hl7.fhir.r5.model.CodeSystem.ConceptDefinitionComponent cs : srcCS.getConcept()) processConcept(tgt.getCodeSystem().getConcept(), cs, srcCS); } - tgt.setCompose(convertValueSetComposeComponent(src.getCompose(), srcCS == null ? null : srcCS.getUrl())); - tgt.setExpansion(convertValueSetExpansionComponent(src.getExpansion())); + if (src.hasCompose()) tgt.setCompose(convertValueSetComposeComponent(src.getCompose(), srcCS == null ? null : srcCS.getUrl())); + if (src.hasExpansion()) tgt.setExpansion(convertValueSetExpansionComponent(src.getExpansion())); return tgt; } @@ -245,47 +235,40 @@ public class ValueSet10_50 { return null; org.hl7.fhir.r5.model.ValueSet tgt = new org.hl7.fhir.r5.model.ValueSet(); VersionConvertor_10_50.copyDomainResource(src, tgt); - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r5.model.UriType) VersionConvertor_10_50.convertType(src.getUrlElement())); if (src.hasIdentifier()) { tgt.addIdentifier(VersionConvertor_10_50.convertIdentifier(src.getIdentifier())); } - if (src.hasVersion()) { - tgt.setVersion(src.getVersion()); - } - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_10_50.convertConformanceResourceStatus(src.getStatus())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasPublisher()) { - tgt.setPublisher(src.getPublisher()); - } + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_10_50.convertType(src.getExperimentalElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu2.model.ValueSet.ValueSetContactComponent t : src.getContact()) tgt.addContact(convertValueSetContactComponent(t)); } - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.r5.model.DateTimeType) VersionConvertor_10_50.convertType(src.getDateElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r5.model.MarkdownType) VersionConvertor_10_50.convertType(src.getDescriptionElement())); for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getUseContext()) if (VersionConvertor_10_50.isJurisdiction(t)) tgt.addJurisdiction(VersionConvertor_10_50.convertCodeableConcept(t)); else tgt.addUseContext(VersionConvertor_10_50.convertCodeableConceptToUsageContext(t)); - if (src.hasImmutable()) { - tgt.setImmutable(src.getImmutable()); - } + if (src.hasImmutableElement()) + tgt.setImmutableElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_10_50.convertType(src.getImmutableElement())); if (src.hasRequirements()) { tgt.setPurpose(src.getRequirements()); } - if (src.hasCopyright()) { - tgt.setCopyright(src.getCopyright()); - } + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.r5.model.MarkdownType) VersionConvertor_10_50.convertType(src.getCopyrightElement())); if (src.hasExtensible()) tgt.addExtension("http://hl7.org/fhir/StructureDefinition/valueset-extensible", new BooleanType(src.getExtensible())); if (src.hasCompose()) { @@ -314,18 +297,18 @@ public class ValueSet10_50 { if (src.hasStatus()) { tgtcs.setStatus(VersionConvertor_10_50.convertConformanceResourceStatus(src.getStatus())); } - if (src.hasExperimental()) - tgtcs.setExperimental(src.getExperimental()); - if (src.hasPublisher()) { - tgtcs.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgtcs.setExperimentalElement((BooleanType) VersionConvertor_10_50.convertType(src.getExperimentalElement())); + if (src.hasPublisherElement()) { + tgtcs.setPublisherElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getPublisherElement())); } if (src.hasContact()) { for (org.hl7.fhir.dstu2.model.ValueSet.ValueSetContactComponent t : src.getContact()) tgtcs.addContact(convertValueSetContactComponent(t)); } - if (src.hasDate()) - tgtcs.setDate(src.getDate()); - if (src.hasDescription()) { - tgtcs.setDescription(src.getDescription()); + if (src.hasDateElement()) + tgtcs.setDateElement((DateTimeType) VersionConvertor_10_50.convertType(src.getDateElement())); + if (src.hasDescriptionElement()) { + tgtcs.setDescriptionElement((MarkdownType) VersionConvertor_10_50.convertType(src.getDescriptionElement())); } for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getUseContext()) if (VersionConvertor_10_50.isJurisdiction(t)) tgtcs.addJurisdiction(VersionConvertor_10_50.convertCodeableConcept(t)); @@ -396,9 +379,8 @@ public class ValueSet10_50 { return null; org.hl7.fhir.r5.model.ContactDetail tgt = new org.hl7.fhir.r5.model.ContactDetail(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_50.convertContactPoint(t)); } @@ -410,9 +392,8 @@ public class ValueSet10_50 { return null; org.hl7.fhir.dstu2.model.ValueSet.ValueSetContactComponent tgt = new org.hl7.fhir.dstu2.model.ValueSet.ValueSetContactComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.r5.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_50.convertContactPoint(t)); } @@ -424,18 +405,14 @@ public class ValueSet10_50 { return null; org.hl7.fhir.r5.model.ValueSet.ValueSetExpansionComponent tgt = new org.hl7.fhir.r5.model.ValueSet.ValueSetExpansionComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasIdentifier()) { - tgt.setIdentifier(src.getIdentifier()); - } - if (src.hasTimestamp()) { - tgt.setTimestamp(src.getTimestamp()); - } - if (src.hasTotal()) { - tgt.setTotal(src.getTotal()); - } - if (src.hasOffset()) { - tgt.setOffset(src.getOffset()); - } + if (src.hasIdentifierElement()) + tgt.setIdentifierElement((org.hl7.fhir.r5.model.UriType) VersionConvertor_10_50.convertType(src.getIdentifierElement())); + if (src.hasTimestampElement()) + tgt.setTimestampElement((org.hl7.fhir.r5.model.DateTimeType) VersionConvertor_10_50.convertType(src.getTimestampElement())); + if (src.hasTotalElement()) + tgt.setTotalElement((org.hl7.fhir.r5.model.IntegerType) VersionConvertor_10_50.convertType(src.getTotalElement())); + if (src.hasOffsetElement()) + tgt.setOffsetElement((org.hl7.fhir.r5.model.IntegerType) VersionConvertor_10_50.convertType(src.getOffsetElement())); if (src.hasParameter()) { for (org.hl7.fhir.dstu2.model.ValueSet.ValueSetExpansionParameterComponent t : src.getParameter()) tgt.addParameter(convertValueSetExpansionParameterComponent(t)); } @@ -450,18 +427,14 @@ public class ValueSet10_50 { return null; org.hl7.fhir.dstu2.model.ValueSet.ValueSetExpansionComponent tgt = new org.hl7.fhir.dstu2.model.ValueSet.ValueSetExpansionComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasIdentifier()) { - tgt.setIdentifier(src.getIdentifier()); - } - if (src.hasTimestamp()) { - tgt.setTimestamp(src.getTimestamp()); - } - if (src.hasTotal()) { - tgt.setTotal(src.getTotal()); - } - if (src.hasOffset()) { - tgt.setOffset(src.getOffset()); - } + if (src.hasIdentifierElement()) + tgt.setIdentifierElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_50.convertType(src.getIdentifierElement())); + if (src.hasTimestampElement()) + tgt.setTimestampElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_50.convertType(src.getTimestampElement())); + if (src.hasTotalElement()) + tgt.setTotalElement((org.hl7.fhir.dstu2.model.IntegerType) VersionConvertor_10_50.convertType(src.getTotalElement())); + if (src.hasOffsetElement()) + tgt.setOffsetElement((org.hl7.fhir.dstu2.model.IntegerType) VersionConvertor_10_50.convertType(src.getOffsetElement())); if (src.hasParameter()) { for (org.hl7.fhir.r5.model.ValueSet.ValueSetExpansionParameterComponent t : src.getParameter()) tgt.addParameter(convertValueSetExpansionParameterComponent(t)); } @@ -476,21 +449,16 @@ public class ValueSet10_50 { return null; org.hl7.fhir.dstu2.model.ValueSet.ValueSetExpansionContainsComponent tgt = new org.hl7.fhir.dstu2.model.ValueSet.ValueSetExpansionContainsComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasSystem()) { - tgt.setSystem(src.getSystem()); - } - if (src.hasAbstract()) { - tgt.setAbstract(src.getAbstract()); - } - if (src.hasVersion()) { - tgt.setVersion(src.getVersion()); - } - if (src.hasCode()) { - tgt.setCode(src.getCode()); - } - if (src.hasDisplay()) { - tgt.setDisplay(src.getDisplay()); - } + if (src.hasSystemElement()) + tgt.setSystemElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_50.convertType(src.getSystemElement())); + if (src.hasAbstractElement()) + tgt.setAbstractElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_50.convertType(src.getAbstractElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getVersionElement())); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu2.model.CodeType) VersionConvertor_10_50.convertType(src.getCodeElement())); + if (src.hasDisplayElement()) + tgt.setDisplayElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getDisplayElement())); if (src.hasContains()) { for (org.hl7.fhir.r5.model.ValueSet.ValueSetExpansionContainsComponent t : src.getContains()) tgt.addContains(convertValueSetExpansionContainsComponent(t)); } @@ -502,21 +470,16 @@ public class ValueSet10_50 { return null; org.hl7.fhir.r5.model.ValueSet.ValueSetExpansionContainsComponent tgt = new org.hl7.fhir.r5.model.ValueSet.ValueSetExpansionContainsComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasSystem()) { - tgt.setSystem(src.getSystem()); - } - if (src.hasAbstract()) { - tgt.setAbstract(src.getAbstract()); - } - if (src.hasVersion()) { - tgt.setVersion(src.getVersion()); - } - if (src.hasCode()) { - tgt.setCode(src.getCode()); - } - if (src.hasDisplay()) { - tgt.setDisplay(src.getDisplay()); - } + if (src.hasSystemElement()) + tgt.setSystemElement((org.hl7.fhir.r5.model.UriType) VersionConvertor_10_50.convertType(src.getSystemElement())); + if (src.hasAbstractElement()) + tgt.setAbstractElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_10_50.convertType(src.getAbstractElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getVersionElement())); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.r5.model.CodeType) VersionConvertor_10_50.convertType(src.getCodeElement())); + if (src.hasDisplayElement()) + tgt.setDisplayElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getDisplayElement())); if (src.hasContains()) { for (org.hl7.fhir.dstu2.model.ValueSet.ValueSetExpansionContainsComponent t : src.getContains()) tgt.addContains(convertValueSetExpansionContainsComponent(t)); } @@ -528,9 +491,8 @@ public class ValueSet10_50 { return null; org.hl7.fhir.dstu2.model.ValueSet.ValueSetExpansionParameterComponent tgt = new org.hl7.fhir.dstu2.model.ValueSet.ValueSetExpansionParameterComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getNameElement())); if (src.hasValue()) { tgt.setValue(VersionConvertor_10_50.convertType(src.getValue())); } @@ -542,9 +504,8 @@ public class ValueSet10_50 { return null; org.hl7.fhir.r5.model.ValueSet.ValueSetExpansionParameterComponent tgt = new org.hl7.fhir.r5.model.ValueSet.ValueSetExpansionParameterComponent(); VersionConvertor_10_50.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getNameElement())); if (src.hasValue()) { tgt.setValue(VersionConvertor_10_50.convertType(src.getValue())); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/parser/Parser.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/parser/Parser.java index 75711c42c..0a325bc5a 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/parser/Parser.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/parser/Parser.java @@ -92,22 +92,22 @@ public class Parser { // VERSION_FILES.forEach(version -> { -// String version = "10_40"; -// List filenames = listAllJavaFilesInDirectory(new File("").getAbsolutePath() + "/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv" + version + "/"); -// System.out.println("Checking the following files:"); -// Collections.sort(filenames); -// filenames.forEach(System.out::println); -// filenames.forEach(name -> { -// try { -// modifyElementNotField("/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv" + version + "/", name, ".java", listOfPrimitiveTypes, version); -// } catch (FileNotFoundException e) { -// e.printStackTrace(); -// } -// }); + String version = "10_50"; + List filenames = listAllJavaFilesInDirectory(new File("").getAbsolutePath() + "/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv" + version + "/"); + System.out.println("Checking the following files:"); + Collections.sort(filenames); + filenames.forEach(System.out::println); + filenames.forEach(name -> { + try { + modifyElementNotField("/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv" + version + "/", name, ".java", listOfPrimitiveTypes, version); + } catch (FileNotFoundException e) { + e.printStackTrace(); + } + }); // }); // try { - modifyElementNotField("/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/", "DataElement10_40", ".java", listOfPrimitiveTypes, "10_40"); +// modifyElementNotField("/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/", "DataElement10_40", ".java", listOfPrimitiveTypes, "10_40"); // modifyElementNotField("/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/", "AuditEvent10_30", ".java", listOfPrimitiveTypes, "10_30"); // modifyElementNotField("/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/", "Binary10_30", ".java", listOfPrimitiveTypes, "10_30"); // modifyElementNotField("/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/", "Bundle10_30", ".java", listOfPrimitiveTypes, "10_30"); From ecb9d1b9e60b215cd18cabadf03a86f9a64fa1cc Mon Sep 17 00:00:00 2001 From: markiantorno Date: Fri, 7 Feb 2020 11:10:56 -0500 Subject: [PATCH 07/12] conv14_30 updated --- .../convertors/conv14_30/Bundle14_30.java | 121 ++--- .../convertors/conv14_30/CodeSystem14_30.java | 217 ++++---- .../conv14_30/CompartmentDefinition14_30.java | 99 ++-- .../convertors/conv14_30/ConceptMap14_30.java | 144 ++--- .../conv14_30/Conformance14_30.java | 290 +++++----- .../conv14_30/DataElement14_30.java | 99 ++-- .../conv14_30/ImplementationGuide14_30.java | 184 +++---- .../conv14_30/NamingSystem14_30.java | 80 ++- .../conv14_30/OperationDefinition14_30.java | 177 +++--- .../conv14_30/OperationOutcome14_30.java | 9 +- .../convertors/conv14_30/Parameters14_30.java | 11 +- .../conv14_30/Questionnaire14_30.java | 116 ++-- .../conv14_30/QuestionnaireResponse14_30.java | 25 +- .../conv14_30/SearchParameter14_30.java | 95 ++-- .../conv14_30/StructureDefinition14_30.java | 157 +++--- .../convertors/conv14_30/TestScript14_30.java | 506 +++++++++--------- .../convertors/conv14_30/ValueSet14_30.java | 254 +++++---- .../hl7/fhir/convertors/parser/Parser.java | 10 +- 18 files changed, 1245 insertions(+), 1349 deletions(-) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_30/Bundle14_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_30/Bundle14_30.java index eef10bc5b..5bfb081bc 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_30/Bundle14_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_30/Bundle14_30.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv14_30; import org.hl7.fhir.convertors.VersionConvertor_14_30; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Bundle14_30 { @@ -13,8 +14,8 @@ public class Bundle14_30 { if (src.hasType()) { tgt.setType(convertBundleType(src.getType())); } - if (src.hasTotal()) - tgt.setTotal(src.getTotal()); + if (src.hasTotalElement()) + tgt.setTotalElement((org.hl7.fhir.dstu3.model.UnsignedIntType) VersionConvertor_14_30.convertType(src.getTotalElement())); if (src.hasLink()) { for (org.hl7.fhir.dstu2016may.model.Bundle.BundleLinkComponent t : src.getLink()) tgt.addLink(convertBundleLinkComponent(t)); } @@ -35,8 +36,8 @@ public class Bundle14_30 { if (src.hasType()) { tgt.setType(convertBundleType(src.getType())); } - if (src.hasTotal()) - tgt.setTotal(src.getTotal()); + if (src.hasTotalElement()) + tgt.setTotalElement((org.hl7.fhir.dstu2016may.model.UnsignedIntType) VersionConvertor_14_30.convertType(src.getTotalElement())); if (src.hasLink()) { for (org.hl7.fhir.dstu3.model.Bundle.BundleLinkComponent t : src.getLink()) tgt.addLink(convertBundleLinkComponent(t)); } @@ -57,8 +58,8 @@ public class Bundle14_30 { if (src.hasLink()) { for (org.hl7.fhir.dstu2016may.model.Bundle.BundleLinkComponent t : src.getLink()) tgt.addLink(convertBundleLinkComponent(t)); } - if (src.hasFullUrl()) - tgt.setFullUrl(src.getFullUrl()); + if (src.hasFullUrlElement()) + tgt.setFullUrlElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_14_30.convertType(src.getFullUrlElement())); if (src.hasResource()) { tgt.setResource(VersionConvertor_14_30.convertResource(src.getResource())); } @@ -82,8 +83,8 @@ public class Bundle14_30 { if (src.hasLink()) { for (org.hl7.fhir.dstu3.model.Bundle.BundleLinkComponent t : src.getLink()) tgt.addLink(convertBundleLinkComponent(t)); } - if (src.hasFullUrl()) - tgt.setFullUrl(src.getFullUrl()); + if (src.hasFullUrlElement()) + tgt.setFullUrlElement((org.hl7.fhir.dstu2016may.model.UriType) VersionConvertor_14_30.convertType(src.getFullUrlElement())); if (src.hasResource()) { tgt.setResource(VersionConvertor_14_30.convertResource(src.getResource())); } @@ -107,17 +108,16 @@ public class Bundle14_30 { if (src.hasMethod()) { tgt.setMethod(convertHTTPVerb(src.getMethod())); } - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } - if (src.hasIfNoneMatch()) - tgt.setIfNoneMatch(src.getIfNoneMatch()); - if (src.hasIfModifiedSince()) - tgt.setIfModifiedSince(src.getIfModifiedSince()); - if (src.hasIfMatch()) - tgt.setIfMatch(src.getIfMatch()); - if (src.hasIfNoneExist()) - tgt.setIfNoneExist(src.getIfNoneExist()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_14_30.convertType(src.getUrlElement())); + if (src.hasIfNoneMatchElement()) + tgt.setIfNoneMatchElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getIfNoneMatchElement())); + if (src.hasIfModifiedSinceElement()) + tgt.setIfModifiedSinceElement((org.hl7.fhir.dstu3.model.InstantType) VersionConvertor_14_30.convertType(src.getIfModifiedSinceElement())); + if (src.hasIfMatchElement()) + tgt.setIfMatchElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getIfMatchElement())); + if (src.hasIfNoneExistElement()) + tgt.setIfNoneExistElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getIfNoneExistElement())); return tgt; } @@ -129,17 +129,16 @@ public class Bundle14_30 { if (src.hasMethod()) { tgt.setMethod(convertHTTPVerb(src.getMethod())); } - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } - if (src.hasIfNoneMatch()) - tgt.setIfNoneMatch(src.getIfNoneMatch()); - if (src.hasIfModifiedSince()) - tgt.setIfModifiedSince(src.getIfModifiedSince()); - if (src.hasIfMatch()) - tgt.setIfMatch(src.getIfMatch()); - if (src.hasIfNoneExist()) - tgt.setIfNoneExist(src.getIfNoneExist()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu2016may.model.UriType) VersionConvertor_14_30.convertType(src.getUrlElement())); + if (src.hasIfNoneMatchElement()) + tgt.setIfNoneMatchElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getIfNoneMatchElement())); + if (src.hasIfModifiedSinceElement()) + tgt.setIfModifiedSinceElement((org.hl7.fhir.dstu2016may.model.InstantType) VersionConvertor_14_30.convertType(src.getIfModifiedSinceElement())); + if (src.hasIfMatchElement()) + tgt.setIfMatchElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getIfMatchElement())); + if (src.hasIfNoneExistElement()) + tgt.setIfNoneExistElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getIfNoneExistElement())); return tgt; } @@ -148,15 +147,14 @@ public class Bundle14_30 { return null; org.hl7.fhir.dstu3.model.Bundle.BundleEntryResponseComponent tgt = new org.hl7.fhir.dstu3.model.Bundle.BundleEntryResponseComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasStatus()) { - tgt.setStatus(src.getStatus()); - } - if (src.hasLocation()) - tgt.setLocation(src.getLocation()); - if (src.hasEtag()) - tgt.setEtag(src.getEtag()); - if (src.hasLastModified()) - tgt.setLastModified(src.getLastModified()); + if (src.hasStatusElement()) + tgt.setStatusElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getStatusElement())); + if (src.hasLocationElement()) + tgt.setLocationElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_14_30.convertType(src.getLocationElement())); + if (src.hasEtagElement()) + tgt.setEtagElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getEtagElement())); + if (src.hasLastModifiedElement()) + tgt.setLastModifiedElement((org.hl7.fhir.dstu3.model.InstantType) VersionConvertor_14_30.convertType(src.getLastModifiedElement())); return tgt; } @@ -165,15 +163,14 @@ public class Bundle14_30 { return null; org.hl7.fhir.dstu2016may.model.Bundle.BundleEntryResponseComponent tgt = new org.hl7.fhir.dstu2016may.model.Bundle.BundleEntryResponseComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasStatus()) { - tgt.setStatus(src.getStatus()); - } - if (src.hasLocation()) - tgt.setLocation(src.getLocation()); - if (src.hasEtag()) - tgt.setEtag(src.getEtag()); - if (src.hasLastModified()) - tgt.setLastModified(src.getLastModified()); + if (src.hasStatusElement()) + tgt.setStatusElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getStatusElement())); + if (src.hasLocationElement()) + tgt.setLocationElement((org.hl7.fhir.dstu2016may.model.UriType) VersionConvertor_14_30.convertType(src.getLocationElement())); + if (src.hasEtagElement()) + tgt.setEtagElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getEtagElement())); + if (src.hasLastModifiedElement()) + tgt.setLastModifiedElement((org.hl7.fhir.dstu2016may.model.InstantType) VersionConvertor_14_30.convertType(src.getLastModifiedElement())); return tgt; } @@ -185,8 +182,8 @@ public class Bundle14_30 { if (src.hasMode()) { tgt.setMode(convertSearchEntryMode(src.getMode())); } - if (src.hasScore()) - tgt.setScore(src.getScore()); + if (src.hasScoreElement()) + tgt.setScoreElement((org.hl7.fhir.dstu3.model.DecimalType) VersionConvertor_14_30.convertType(src.getScoreElement())); return tgt; } @@ -198,8 +195,8 @@ public class Bundle14_30 { if (src.hasMode()) { tgt.setMode(convertSearchEntryMode(src.getMode())); } - if (src.hasScore()) - tgt.setScore(src.getScore()); + if (src.hasScoreElement()) + tgt.setScoreElement((org.hl7.fhir.dstu2016may.model.DecimalType) VersionConvertor_14_30.convertType(src.getScoreElement())); return tgt; } @@ -208,12 +205,10 @@ public class Bundle14_30 { return null; org.hl7.fhir.dstu2016may.model.Bundle.BundleLinkComponent tgt = new org.hl7.fhir.dstu2016may.model.Bundle.BundleLinkComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasRelation()) { - tgt.setRelation(src.getRelation()); - } - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } + if (src.hasRelationElement()) + tgt.setRelationElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getRelationElement())); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu2016may.model.UriType) VersionConvertor_14_30.convertType(src.getUrlElement())); return tgt; } @@ -222,12 +217,10 @@ public class Bundle14_30 { return null; org.hl7.fhir.dstu3.model.Bundle.BundleLinkComponent tgt = new org.hl7.fhir.dstu3.model.Bundle.BundleLinkComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasRelation()) { - tgt.setRelation(src.getRelation()); - } - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } + if (src.hasRelationElement()) + tgt.setRelationElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getRelationElement())); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_14_30.convertType(src.getUrlElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_30/CodeSystem14_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_30/CodeSystem14_30.java index fb3dfc930..922825577 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_30/CodeSystem14_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_30/CodeSystem14_30.java @@ -5,7 +5,9 @@ import org.hl7.fhir.dstu2016may.model.CodeSystem.ConceptDefinitionPropertyCompon import org.hl7.fhir.dstu3.model.CodeSystem; import org.hl7.fhir.dstu3.model.CodeSystem.FilterOperator; import org.hl7.fhir.dstu3.model.Enumeration; +import org.hl7.fhir.dstu3.model.StringType; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class CodeSystem14_30 { @@ -14,50 +16,50 @@ public class CodeSystem14_30 { return null; org.hl7.fhir.dstu3.model.CodeSystem tgt = new org.hl7.fhir.dstu3.model.CodeSystem(); VersionConvertor_14_30.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_14_30.convertType(src.getUrlElement())); if (src.hasIdentifier()) { tgt.setIdentifier(VersionConvertor_14_30.convertIdentifier(src.getIdentifier())); } - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_14_30.convertConformanceResourceStatus(src.getStatus())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_14_30.convertType(src.getExperimentalElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu2016may.model.CodeSystem.CodeSystemContactComponent t : src.getContact()) tgt.addContact(convertCodeSystemContactComponent(t)); } - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_14_30.convertType(src.getDateElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_14_30.convertType(src.getDescriptionElement())); for (org.hl7.fhir.dstu2016may.model.CodeableConcept t : src.getUseContext()) if (VersionConvertor_14_30.isJurisdiction(t)) tgt.addJurisdiction(VersionConvertor_14_30.convertCodeableConcept(t)); else tgt.addUseContext(VersionConvertor_14_30.convertCodeableConceptToUsageContext(t)); if (src.hasRequirements()) tgt.setPurpose(src.getRequirements()); - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); - if (src.hasCaseSensitive()) - tgt.setCaseSensitive(src.getCaseSensitive()); - if (src.hasValueSet()) - tgt.setValueSet(src.getValueSet()); - if (src.hasCompositional()) - tgt.setCompositional(src.getCompositional()); - if (src.hasVersionNeeded()) - tgt.setVersionNeeded(src.getVersionNeeded()); + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_14_30.convertType(src.getCopyrightElement())); + if (src.hasCaseSensitiveElement()) + tgt.setCaseSensitiveElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_14_30.convertType(src.getCaseSensitiveElement())); + if (src.hasValueSetElement()) + tgt.setValueSetElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_14_30.convertType(src.getValueSetElement())); + if (src.hasCompositionalElement()) + tgt.setCompositionalElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_14_30.convertType(src.getCompositionalElement())); + if (src.hasVersionNeededElement()) + tgt.setVersionNeededElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_14_30.convertType(src.getVersionNeededElement())); if (src.hasContent()) { tgt.setContent(convertCodeSystemContentMode(src.getContent())); } - if (src.hasCount()) - tgt.setCount(src.getCount()); + if (src.hasCountElement()) + tgt.setCountElement((org.hl7.fhir.dstu3.model.UnsignedIntType) VersionConvertor_14_30.convertType(src.getCountElement())); if (src.hasFilter()) { for (org.hl7.fhir.dstu2016may.model.CodeSystem.CodeSystemFilterComponent t : src.getFilter()) tgt.addFilter(convertCodeSystemFilterComponent(t)); } @@ -75,29 +77,29 @@ public class CodeSystem14_30 { return null; org.hl7.fhir.dstu2016may.model.CodeSystem tgt = new org.hl7.fhir.dstu2016may.model.CodeSystem(); VersionConvertor_14_30.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu2016may.model.UriType) VersionConvertor_14_30.convertType(src.getUrlElement())); if (src.hasIdentifier()) { tgt.setIdentifier(VersionConvertor_14_30.convertIdentifier(src.getIdentifier())); } - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_14_30.convertConformanceResourceStatus(src.getStatus())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu2016may.model.BooleanType) VersionConvertor_14_30.convertType(src.getExperimentalElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) tgt.addContact(convertCodeSystemContactComponent(t)); } - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu2016may.model.DateTimeType) VersionConvertor_14_30.convertType(src.getDateElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getDescriptionElement())); for (org.hl7.fhir.dstu3.model.UsageContext t : src.getUseContext()) if (t.hasValueCodeableConcept()) tgt.addUseContext(VersionConvertor_14_30.convertCodeableConcept(t.getValueCodeableConcept())); if (src.hasJurisdiction()) { @@ -105,21 +107,21 @@ public class CodeSystem14_30 { } if (src.hasPurpose()) tgt.setRequirements(src.getPurpose()); - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); - if (src.hasCaseSensitive()) - tgt.setCaseSensitive(src.getCaseSensitive()); - if (src.hasValueSet()) - tgt.setValueSet(src.getValueSet()); - if (src.hasCompositional()) - tgt.setCompositional(src.getCompositional()); - if (src.hasVersionNeeded()) - tgt.setVersionNeeded(src.getVersionNeeded()); + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getCopyrightElement())); + if (src.hasCaseSensitiveElement()) + tgt.setCaseSensitiveElement((org.hl7.fhir.dstu2016may.model.BooleanType) VersionConvertor_14_30.convertType(src.getCaseSensitiveElement())); + if (src.hasValueSetElement()) + tgt.setValueSetElement((org.hl7.fhir.dstu2016may.model.UriType) VersionConvertor_14_30.convertType(src.getValueSetElement())); + if (src.hasCompositionalElement()) + tgt.setCompositionalElement((org.hl7.fhir.dstu2016may.model.BooleanType) VersionConvertor_14_30.convertType(src.getCompositionalElement())); + if (src.hasVersionNeededElement()) + tgt.setVersionNeededElement((org.hl7.fhir.dstu2016may.model.BooleanType) VersionConvertor_14_30.convertType(src.getVersionNeededElement())); if (src.hasContent()) { tgt.setContent(convertCodeSystemContentMode(src.getContent())); } - if (src.hasCount()) - tgt.setCount(src.getCount()); + if (src.hasCountElement()) + tgt.setCountElement((org.hl7.fhir.dstu2016may.model.UnsignedIntType) VersionConvertor_14_30.convertType(src.getCountElement())); if (src.hasFilter()) { for (org.hl7.fhir.dstu3.model.CodeSystem.CodeSystemFilterComponent t : src.getFilter()) tgt.addFilter(convertCodeSystemFilterComponent(t)); } @@ -137,8 +139,8 @@ public class CodeSystem14_30 { return null; org.hl7.fhir.dstu2016may.model.CodeSystem.CodeSystemContactComponent tgt = new org.hl7.fhir.dstu2016may.model.CodeSystem.CodeSystemContactComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu3.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_14_30.convertContactPoint(t)); } @@ -150,8 +152,8 @@ public class CodeSystem14_30 { return null; org.hl7.fhir.dstu3.model.ContactDetail tgt = new org.hl7.fhir.dstu3.model.ContactDetail(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu2016may.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_14_30.convertContactPoint(t)); } @@ -197,18 +199,17 @@ public class CodeSystem14_30 { return null; org.hl7.fhir.dstu3.model.CodeSystem.CodeSystemFilterComponent tgt = new org.hl7.fhir.dstu3.model.CodeSystem.CodeSystemFilterComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasCode()) { - tgt.setCode(src.getCode()); - } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_14_30.convertType(src.getCodeElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getDescriptionElement())); for (org.hl7.fhir.dstu2016may.model.CodeType t : src.getOperator()) try { tgt.addOperator(CodeSystem.FilterOperator.fromCode(t.getValue())); } catch (org.hl7.fhir.exceptions.FHIRException e) { throw new FHIRException(e); } - if (src.hasValue()) { - tgt.setValue(src.getValue()); + if (src.hasValueElement()) { + tgt.setValueElement((StringType) VersionConvertor_14_30.convertType(src.getValueElement())); } return tgt; } @@ -218,16 +219,14 @@ public class CodeSystem14_30 { return null; org.hl7.fhir.dstu2016may.model.CodeSystem.CodeSystemFilterComponent tgt = new org.hl7.fhir.dstu2016may.model.CodeSystem.CodeSystemFilterComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasCode()) { - tgt.setCode(src.getCode()); - } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - if (src.hasOperator()) { - for (Enumeration t : src.getOperator()) tgt.addOperator(t.getValue().toCode()); - } - if (src.hasValue()) { - tgt.setValue(src.getValue()); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu2016may.model.CodeType) VersionConvertor_14_30.convertType(src.getCodeElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getDescriptionElement())); + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getValueElement())); + if (src.hasValueElement()) { + tgt.setValueElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getValueElement())); } return tgt; } @@ -237,13 +236,12 @@ public class CodeSystem14_30 { return null; org.hl7.fhir.dstu2016may.model.CodeSystem.ConceptDefinitionComponent tgt = new org.hl7.fhir.dstu2016may.model.CodeSystem.ConceptDefinitionComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasCode()) { - tgt.setCode(src.getCode()); - } - if (src.hasDisplay()) - tgt.setDisplay(src.getDisplay()); - if (src.hasDefinition()) - tgt.setDefinition(src.getDefinition()); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu2016may.model.CodeType) VersionConvertor_14_30.convertType(src.getCodeElement())); + if (src.hasDisplayElement()) + tgt.setDisplayElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getDisplayElement())); + if (src.hasDefinitionElement()) + tgt.setDefinitionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getDefinitionElement())); if (src.hasDesignation()) { for (org.hl7.fhir.dstu3.model.CodeSystem.ConceptDefinitionDesignationComponent t : src.getDesignation()) tgt.addDesignation(convertConceptDefinitionDesignationComponent(t)); } @@ -261,13 +259,12 @@ public class CodeSystem14_30 { return null; org.hl7.fhir.dstu3.model.CodeSystem.ConceptDefinitionComponent tgt = new org.hl7.fhir.dstu3.model.CodeSystem.ConceptDefinitionComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasCode()) { - tgt.setCode(src.getCode()); - } - if (src.hasDisplay()) - tgt.setDisplay(src.getDisplay()); - if (src.hasDefinition()) - tgt.setDefinition(src.getDefinition()); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_14_30.convertType(src.getCodeElement())); + if (src.hasDisplayElement()) + tgt.setDisplayElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getDisplayElement())); + if (src.hasDefinitionElement()) + tgt.setDefinitionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getDefinitionElement())); if (src.hasDesignation()) { for (org.hl7.fhir.dstu2016may.model.CodeSystem.ConceptDefinitionDesignationComponent t : src.getDesignation()) tgt.addDesignation(convertConceptDefinitionDesignationComponent(t)); } @@ -285,14 +282,13 @@ public class CodeSystem14_30 { return null; org.hl7.fhir.dstu2016may.model.CodeSystem.ConceptDefinitionDesignationComponent tgt = new org.hl7.fhir.dstu2016may.model.CodeSystem.ConceptDefinitionDesignationComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasLanguage()) - tgt.setLanguage(src.getLanguage()); + if (src.hasLanguageElement()) + tgt.setLanguageElement((org.hl7.fhir.dstu2016may.model.CodeType) VersionConvertor_14_30.convertType(src.getLanguageElement())); if (src.hasUse()) { tgt.setUse(VersionConvertor_14_30.convertCoding(src.getUse())); } - if (src.hasValue()) { - tgt.setValue(src.getValue()); - } + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getValueElement())); return tgt; } @@ -301,14 +297,13 @@ public class CodeSystem14_30 { return null; org.hl7.fhir.dstu3.model.CodeSystem.ConceptDefinitionDesignationComponent tgt = new org.hl7.fhir.dstu3.model.CodeSystem.ConceptDefinitionDesignationComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasLanguage()) - tgt.setLanguage(src.getLanguage()); + if (src.hasLanguageElement()) + tgt.setLanguageElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_14_30.convertType(src.getLanguageElement())); if (src.hasUse()) { tgt.setUse(VersionConvertor_14_30.convertCoding(src.getUse())); } - if (src.hasValue()) { - tgt.setValue(src.getValue()); - } + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getValueElement())); return tgt; } @@ -317,9 +312,8 @@ public class CodeSystem14_30 { return null; org.hl7.fhir.dstu2016may.model.CodeSystem.ConceptDefinitionPropertyComponent tgt = new org.hl7.fhir.dstu2016may.model.CodeSystem.ConceptDefinitionPropertyComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasCode()) { - tgt.setCode(src.getCode()); - } + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu2016may.model.CodeType) VersionConvertor_14_30.convertType(src.getCodeElement())); if (src.hasValue()) { tgt.setValue(VersionConvertor_14_30.convertType(src.getValue())); } @@ -331,9 +325,8 @@ public class CodeSystem14_30 { return null; org.hl7.fhir.dstu3.model.CodeSystem.ConceptPropertyComponent tgt = new org.hl7.fhir.dstu3.model.CodeSystem.ConceptPropertyComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasCode()) { - tgt.setCode(src.getCode()); - } + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_14_30.convertType(src.getCodeElement())); if (src.hasValue()) { tgt.setValue(VersionConvertor_14_30.convertType(src.getValue())); } @@ -345,11 +338,10 @@ public class CodeSystem14_30 { return null; org.hl7.fhir.dstu3.model.CodeSystem.PropertyComponent tgt = new org.hl7.fhir.dstu3.model.CodeSystem.PropertyComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasCode()) { - tgt.setCode(src.getCode()); - } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_14_30.convertType(src.getCodeElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getDescriptionElement())); if (src.hasType()) { tgt.setType(convertPropertyType(src.getType())); } @@ -361,11 +353,10 @@ public class CodeSystem14_30 { return null; org.hl7.fhir.dstu2016may.model.CodeSystem.CodeSystemPropertyComponent tgt = new org.hl7.fhir.dstu2016may.model.CodeSystem.CodeSystemPropertyComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasCode()) { - tgt.setCode(src.getCode()); - } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu2016may.model.CodeType) VersionConvertor_14_30.convertType(src.getCodeElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getDescriptionElement())); if (src.hasType()) { tgt.setType(convertPropertyType(src.getType())); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_30/CompartmentDefinition14_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_30/CompartmentDefinition14_30.java index e1bcdb376..50be0af08 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_30/CompartmentDefinition14_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_30/CompartmentDefinition14_30.java @@ -1,7 +1,10 @@ package org.hl7.fhir.convertors.conv14_30; import org.hl7.fhir.convertors.VersionConvertor_14_30; +import org.hl7.fhir.dstu2016may.model.StringType; +import org.hl7.fhir.dstu3.model.MarkdownType; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class CompartmentDefinition14_30 { @@ -10,34 +13,31 @@ public class CompartmentDefinition14_30 { return null; org.hl7.fhir.dstu3.model.CompartmentDefinition tgt = new org.hl7.fhir.dstu3.model.CompartmentDefinition(); VersionConvertor_14_30.copyDomainResource(src, tgt); - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_14_30.convertType(src.getUrlElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_14_30.convertConformanceResourceStatus(src.getStatus())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_14_30.convertType(src.getExperimentalElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu2016may.model.CompartmentDefinition.CompartmentDefinitionContactComponent t : src.getContact()) tgt.addContact(convertCompartmentDefinitionContactComponent(t)); } - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - if (src.hasRequirements()) - tgt.setPurpose(src.getRequirements()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_14_30.convertType(src.getDateElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_14_30.convertType(src.getDescriptionElement())); + if (src.hasRequirementsElement()) + tgt.setPurposeElement((MarkdownType) VersionConvertor_14_30.convertType(src.getRequirementsElement())); if (src.hasCode()) { tgt.setCode(convertCompartmentType(src.getCode())); } - if (src.hasSearch()) { - tgt.setSearch(src.getSearch()); - } + if (src.hasSearchElement()) + tgt.setSearchElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_14_30.convertType(src.getSearchElement())); if (src.hasResource()) { for (org.hl7.fhir.dstu2016may.model.CompartmentDefinition.CompartmentDefinitionResourceComponent t : src.getResource()) tgt.addResource(convertCompartmentDefinitionResourceComponent(t)); } @@ -49,34 +49,31 @@ public class CompartmentDefinition14_30 { return null; org.hl7.fhir.dstu2016may.model.CompartmentDefinition tgt = new org.hl7.fhir.dstu2016may.model.CompartmentDefinition(); VersionConvertor_14_30.copyDomainResource(src, tgt); - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu2016may.model.UriType) VersionConvertor_14_30.convertType(src.getUrlElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_14_30.convertConformanceResourceStatus(src.getStatus())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu2016may.model.BooleanType) VersionConvertor_14_30.convertType(src.getExperimentalElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) tgt.addContact(convertCompartmentDefinitionContactComponent(t)); } - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - if (src.hasPurpose()) - tgt.setRequirements(src.getPurpose()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu2016may.model.DateTimeType) VersionConvertor_14_30.convertType(src.getDateElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getDescriptionElement())); + if (src.hasPurposeElement()) + tgt.setRequirementsElement((StringType) VersionConvertor_14_30.convertType(src.getPurposeElement())); if (src.hasCode()) { tgt.setCode(convertCompartmentType(src.getCode())); } - if (src.hasSearch()) { - tgt.setSearch(src.getSearch()); - } + if (src.hasSearchElement()) + tgt.setSearchElement((org.hl7.fhir.dstu2016may.model.BooleanType) VersionConvertor_14_30.convertType(src.getSearchElement())); if (src.hasResource()) { for (org.hl7.fhir.dstu3.model.CompartmentDefinition.CompartmentDefinitionResourceComponent t : src.getResource()) tgt.addResource(convertCompartmentDefinitionResourceComponent(t)); } @@ -88,8 +85,8 @@ public class CompartmentDefinition14_30 { return null; org.hl7.fhir.dstu2016may.model.CompartmentDefinition.CompartmentDefinitionContactComponent tgt = new org.hl7.fhir.dstu2016may.model.CompartmentDefinition.CompartmentDefinitionContactComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((StringType) VersionConvertor_14_30.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu3.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_14_30.convertContactPoint(t)); } @@ -101,8 +98,8 @@ public class CompartmentDefinition14_30 { return null; org.hl7.fhir.dstu3.model.ContactDetail tgt = new org.hl7.fhir.dstu3.model.ContactDetail(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu2016may.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_14_30.convertContactPoint(t)); } @@ -114,14 +111,13 @@ public class CompartmentDefinition14_30 { return null; org.hl7.fhir.dstu3.model.CompartmentDefinition.CompartmentDefinitionResourceComponent tgt = new org.hl7.fhir.dstu3.model.CompartmentDefinition.CompartmentDefinitionResourceComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasCode()) { - tgt.setCode(src.getCode()); - } + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_14_30.convertType(src.getCodeElement())); if (src.hasParam()) { for (org.hl7.fhir.dstu2016may.model.StringType t : src.getParam()) tgt.addParam(t.getValue()); } - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getDocumentationElement())); return tgt; } @@ -130,14 +126,13 @@ public class CompartmentDefinition14_30 { return null; org.hl7.fhir.dstu2016may.model.CompartmentDefinition.CompartmentDefinitionResourceComponent tgt = new org.hl7.fhir.dstu2016may.model.CompartmentDefinition.CompartmentDefinitionResourceComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasCode()) { - tgt.setCode(src.getCode()); - } + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu2016may.model.CodeType) VersionConvertor_14_30.convertType(src.getCodeElement())); if (src.hasParam()) { for (org.hl7.fhir.dstu3.model.StringType t : src.getParam()) tgt.addParam(t.getValue()); } - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getDocumentationElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_30/ConceptMap14_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_30/ConceptMap14_30.java index 5f7128dcb..41514780f 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_30/ConceptMap14_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_30/ConceptMap14_30.java @@ -1,11 +1,15 @@ package org.hl7.fhir.convertors.conv14_30; import org.hl7.fhir.convertors.VersionConvertor_14_30; +import org.hl7.fhir.dstu2016may.model.StringType; +import org.hl7.fhir.dstu2016may.model.UriType; import org.hl7.fhir.dstu3.model.ConceptMap; import org.hl7.fhir.dstu3.model.ConceptMap.ConceptMapGroupComponent; +import org.hl7.fhir.dstu3.model.MarkdownType; import org.hl7.fhir.exceptions.FHIRException; import java.util.ArrayList; import java.util.List; +import java.util.Collections; public class ConceptMap14_30 { @@ -14,38 +18,38 @@ public class ConceptMap14_30 { return null; org.hl7.fhir.dstu2016may.model.ConceptMap tgt = new org.hl7.fhir.dstu2016may.model.ConceptMap(); VersionConvertor_14_30.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu2016may.model.UriType) VersionConvertor_14_30.convertType(src.getUrlElement())); if (src.hasIdentifier()) { tgt.setIdentifier(VersionConvertor_14_30.convertIdentifier(src.getIdentifier())); } - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_14_30.convertConformanceResourceStatus(src.getStatus())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu2016may.model.BooleanType) VersionConvertor_14_30.convertType(src.getExperimentalElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) tgt.addContact(convertConceptMapContactComponent(t)); } - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu2016may.model.DateTimeType) VersionConvertor_14_30.convertType(src.getDateElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getDescriptionElement())); for (org.hl7.fhir.dstu3.model.UsageContext t : src.getUseContext()) if (t.hasValueCodeableConcept()) tgt.addUseContext(VersionConvertor_14_30.convertCodeableConcept(t.getValueCodeableConcept())); if (src.hasJurisdiction()) { for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getJurisdiction()) tgt.addUseContext(VersionConvertor_14_30.convertCodeableConcept(t)); } - if (src.hasPurpose()) - tgt.setRequirements(src.getPurpose()); - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); + if (src.hasPurposeElement()) + tgt.setRequirementsElement((StringType) VersionConvertor_14_30.convertType(src.getPurposeElement())); + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getCopyrightElement())); if (src.hasSource()) { tgt.setSource(VersionConvertor_14_30.convertType(src.getSource())); } @@ -63,37 +67,37 @@ public class ConceptMap14_30 { return null; org.hl7.fhir.dstu3.model.ConceptMap tgt = new org.hl7.fhir.dstu3.model.ConceptMap(); VersionConvertor_14_30.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_14_30.convertType(src.getUrlElement())); if (src.hasIdentifier()) { tgt.setIdentifier(VersionConvertor_14_30.convertIdentifier(src.getIdentifier())); } - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_14_30.convertConformanceResourceStatus(src.getStatus())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_14_30.convertType(src.getExperimentalElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu2016may.model.ConceptMap.ConceptMapContactComponent t : src.getContact()) tgt.addContact(convertConceptMapContactComponent(t)); } - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_14_30.convertType(src.getDateElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_14_30.convertType(src.getDescriptionElement())); for (org.hl7.fhir.dstu2016may.model.CodeableConcept t : src.getUseContext()) if (VersionConvertor_14_30.isJurisdiction(t)) tgt.addJurisdiction(VersionConvertor_14_30.convertCodeableConcept(t)); else tgt.addUseContext(VersionConvertor_14_30.convertCodeableConceptToUsageContext(t)); - if (src.hasRequirements()) - tgt.setPurpose(src.getRequirements()); - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); + if (src.hasRequirementsElement()) + tgt.setPurposeElement((MarkdownType) VersionConvertor_14_30.convertType(src.getRequirementsElement())); + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_14_30.convertType(src.getCopyrightElement())); if (src.hasSource()) { tgt.setSource(VersionConvertor_14_30.convertType(src.getSource())); } @@ -112,8 +116,8 @@ public class ConceptMap14_30 { return null; org.hl7.fhir.dstu2016may.model.ConceptMap.ConceptMapContactComponent tgt = new org.hl7.fhir.dstu2016may.model.ConceptMap.ConceptMapContactComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu3.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_14_30.convertContactPoint(t)); } @@ -125,8 +129,8 @@ public class ConceptMap14_30 { return null; org.hl7.fhir.dstu3.model.ContactDetail tgt = new org.hl7.fhir.dstu3.model.ContactDetail(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu2016may.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_14_30.convertContactPoint(t)); } @@ -192,15 +196,13 @@ public class ConceptMap14_30 { return null; org.hl7.fhir.dstu2016may.model.ConceptMap.OtherElementComponent tgt = new org.hl7.fhir.dstu2016may.model.ConceptMap.OtherElementComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasProperty()) { - tgt.setElement(src.getProperty()); - } - if (src.hasSystem()) { - tgt.setSystem(src.getSystem()); - } - if (src.hasCode()) { - tgt.setCode(src.getCode()); + if (src.hasPropertyElement()) { + tgt.setElementElement((UriType) VersionConvertor_14_30.convertType(src.getPropertyElement())); } + if (src.hasSystemElement()) + tgt.setSystemElement((org.hl7.fhir.dstu2016may.model.UriType) VersionConvertor_14_30.convertType(src.getSystemElement())); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getCodeElement())); return tgt; } @@ -209,15 +211,13 @@ public class ConceptMap14_30 { return null; org.hl7.fhir.dstu3.model.ConceptMap.OtherElementComponent tgt = new org.hl7.fhir.dstu3.model.ConceptMap.OtherElementComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasElement()) { - tgt.setProperty(src.getElement()); - } - if (src.hasSystem()) { - tgt.setSystem(src.getSystem()); - } - if (src.hasCode()) { - tgt.setCode(src.getCode()); + if (src.hasElementElement()) { + tgt.setPropertyElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_14_30.convertType(src.getElementElement())); } + if (src.hasSystemElement()) + tgt.setSystemElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_14_30.convertType(src.getSystemElement())); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getCodeElement())); return tgt; } @@ -226,10 +226,10 @@ public class ConceptMap14_30 { return null; org.hl7.fhir.dstu2016may.model.ConceptMap.SourceElementComponent tgt = new org.hl7.fhir.dstu2016may.model.ConceptMap.SourceElementComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (g.hasSource()) - tgt.setSystem(g.getSource()); - if (src.hasCode()) - tgt.setCode(src.getCode()); + if (g.hasSourceElement()) + tgt.setSystemElement((UriType) VersionConvertor_14_30.convertType(g.getSourceElement())); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu2016may.model.CodeType) VersionConvertor_14_30.convertType(src.getCodeElement())); if (src.hasTarget()) { for (org.hl7.fhir.dstu3.model.ConceptMap.TargetElementComponent t : src.getTarget()) tgt.addTarget(convertTargetElementComponent(t, g)); } @@ -243,8 +243,8 @@ public class ConceptMap14_30 { for (org.hl7.fhir.dstu2016may.model.ConceptMap.TargetElementComponent t : src.getTarget()) { org.hl7.fhir.dstu3.model.ConceptMap.SourceElementComponent tgt = new org.hl7.fhir.dstu3.model.ConceptMap.SourceElementComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasCode()) - tgt.setCode(src.getCode()); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_14_30.convertType(src.getCodeElement())); tgt.addTarget(convertTargetElementComponent(t)); if (src.hasSystem()) { res.add(new VersionConvertor_14_30.SourceElementComponentWrapper(tgt, src.getSystem(), t.getSystem())); @@ -258,15 +258,15 @@ public class ConceptMap14_30 { return null; org.hl7.fhir.dstu2016may.model.ConceptMap.TargetElementComponent tgt = new org.hl7.fhir.dstu2016may.model.ConceptMap.TargetElementComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (g.hasTarget()) - tgt.setSystem(g.getTarget()); - if (src.hasCode()) - tgt.setCode(src.getCode()); + if (g.hasTargetElement()) + tgt.setSystemElement((UriType) VersionConvertor_14_30.convertType(g.getTargetElement())); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu2016may.model.CodeType) VersionConvertor_14_30.convertType(src.getCodeElement())); if (src.hasEquivalence()) { tgt.setEquivalence(convertConceptMapEquivalence(src.getEquivalence())); } - if (src.hasComment()) - tgt.setComments(src.getComment()); + if (src.hasCommentElement()) + tgt.setCommentsElement((StringType) VersionConvertor_14_30.convertType(src.getCommentElement())); if (src.hasDependsOn()) { for (org.hl7.fhir.dstu3.model.ConceptMap.OtherElementComponent t : src.getDependsOn()) tgt.addDependsOn(convertOtherElementComponent(t)); } @@ -281,13 +281,13 @@ public class ConceptMap14_30 { return null; org.hl7.fhir.dstu3.model.ConceptMap.TargetElementComponent tgt = new org.hl7.fhir.dstu3.model.ConceptMap.TargetElementComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasCode()) - tgt.setCode(src.getCode()); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_14_30.convertType(src.getCodeElement())); if (src.hasEquivalence()) { tgt.setEquivalence(convertConceptMapEquivalence(src.getEquivalence())); } - if (src.hasComments()) - tgt.setComment(src.getComments()); + if (src.hasCommentsElement()) + tgt.setCommentElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getCommentsElement())); if (src.hasDependsOn()) { for (org.hl7.fhir.dstu2016may.model.ConceptMap.OtherElementComponent t : src.getDependsOn()) tgt.addDependsOn(convertOtherElementComponent(t)); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_30/Conformance14_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_30/Conformance14_30.java index 2e4927016..8207fe4b9 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_30/Conformance14_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_30/Conformance14_30.java @@ -1,7 +1,11 @@ package org.hl7.fhir.convertors.conv14_30; import org.hl7.fhir.convertors.VersionConvertor_14_30; +import org.hl7.fhir.dstu2016may.model.BooleanType; +import org.hl7.fhir.dstu2016may.model.StringType; +import org.hl7.fhir.dstu3.model.*; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Conformance14_30 { @@ -40,33 +44,33 @@ public class Conformance14_30 { return null; org.hl7.fhir.dstu2016may.model.Conformance tgt = new org.hl7.fhir.dstu2016may.model.Conformance(); VersionConvertor_14_30.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu2016may.model.UriType) VersionConvertor_14_30.convertType(src.getUrlElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_14_30.convertConformanceResourceStatus(src.getStatus())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu2016may.model.BooleanType) VersionConvertor_14_30.convertType(src.getExperimentalElement())); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu2016may.model.DateTimeType) VersionConvertor_14_30.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) tgt.addContact(convertConformanceContactComponent(t)); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getDescriptionElement())); for (org.hl7.fhir.dstu3.model.UsageContext t : src.getUseContext()) if (t.hasValueCodeableConcept()) tgt.addUseContext(VersionConvertor_14_30.convertCodeableConcept(t.getValueCodeableConcept())); if (src.hasJurisdiction()) { for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getJurisdiction()) tgt.addUseContext(VersionConvertor_14_30.convertCodeableConcept(t)); } - if (src.hasPurpose()) - tgt.setRequirements(src.getPurpose()); + if (src.hasPurposeElement()) + tgt.setRequirementsElement((StringType) VersionConvertor_14_30.convertType(src.getPurposeElement())); if (src.hasCopyright()) tgt.setCopyright(src.getCopyright()); if (src.hasKind()) { @@ -78,9 +82,8 @@ public class Conformance14_30 { if (src.hasImplementation()) { tgt.setImplementation(convertConformanceImplementationComponent(src.getImplementation())); } - if (src.hasFhirVersion()) { - tgt.setFhirVersion(src.getFhirVersion()); - } + if (src.hasFhirVersionElement()) + tgt.setFhirVersionElement((org.hl7.fhir.dstu2016may.model.IdType) VersionConvertor_14_30.convertType(src.getFhirVersionElement())); if (src.hasAcceptUnknown()) { tgt.setAcceptUnknown(convertUnknownContentCode(src.getAcceptUnknown())); } @@ -107,21 +110,21 @@ public class Conformance14_30 { return null; org.hl7.fhir.dstu3.model.CapabilityStatement tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement(); VersionConvertor_14_30.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_14_30.convertType(src.getUrlElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_14_30.convertConformanceResourceStatus(src.getStatus())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_14_30.convertType(src.getExperimentalElement())); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_14_30.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu2016may.model.Conformance.ConformanceContactComponent t : src.getContact()) tgt.addContact(convertConformanceContactComponent(t)); } @@ -144,9 +147,8 @@ public class Conformance14_30 { if (src.hasImplementation()) { tgt.setImplementation(convertConformanceImplementationComponent(src.getImplementation())); } - if (src.hasFhirVersion()) { - tgt.setFhirVersion(src.getFhirVersion()); - } + if (src.hasFhirVersionElement()) + tgt.setFhirVersionElement((org.hl7.fhir.dstu3.model.IdType) VersionConvertor_14_30.convertType(src.getFhirVersionElement())); if (src.hasAcceptUnknown()) { tgt.setAcceptUnknown(convertUnknownContentCode(src.getAcceptUnknown())); } @@ -173,8 +175,8 @@ public class Conformance14_30 { return null; org.hl7.fhir.dstu3.model.ContactDetail tgt = new org.hl7.fhir.dstu3.model.ContactDetail(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu2016may.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_14_30.convertContactPoint(t)); } @@ -186,8 +188,8 @@ public class Conformance14_30 { return null; org.hl7.fhir.dstu2016may.model.Conformance.ConformanceContactComponent tgt = new org.hl7.fhir.dstu2016may.model.Conformance.ConformanceContactComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu3.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_14_30.convertContactPoint(t)); } @@ -202,8 +204,8 @@ public class Conformance14_30 { if (src.hasMode()) { tgt.setMode(convertDocumentMode(src.getMode())); } - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((StringType) VersionConvertor_14_30.convertType(src.getDocumentationElement())); if (src.hasProfile()) { tgt.setProfile(VersionConvertor_14_30.convertReference(src.getProfile())); } @@ -218,8 +220,8 @@ public class Conformance14_30 { if (src.hasMode()) { tgt.setMode(convertDocumentMode(src.getMode())); } - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getDocumentationElement())); if (src.hasProfile()) { tgt.setProfile(VersionConvertor_14_30.convertReference(src.getProfile())); } @@ -257,11 +259,11 @@ public class Conformance14_30 { return null; org.hl7.fhir.dstu2016may.model.Conformance.ConformanceImplementationComponent tgt = new org.hl7.fhir.dstu2016may.model.Conformance.ConformanceImplementationComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) { + tgt.setDescriptionElement((StringType) VersionConvertor_14_30.convertType(src.getDescriptionElement())); } - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu2016may.model.UriType) VersionConvertor_14_30.convertType(src.getUrlElement())); return tgt; } @@ -270,11 +272,11 @@ public class Conformance14_30 { return null; org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementImplementationComponent tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementImplementationComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) { + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getDescriptionElement())); } - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_14_30.convertType(src.getUrlElement())); return tgt; } @@ -286,10 +288,10 @@ public class Conformance14_30 { if (src.hasEndpoint()) { for (org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingEndpointComponent t : src.getEndpoint()) tgt.addEndpoint(convertConformanceMessagingEndpointComponent(t)); } - if (src.hasReliableCache()) - tgt.setReliableCache(src.getReliableCache()); - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasReliableCacheElement()) + tgt.setReliableCacheElement((org.hl7.fhir.dstu2016may.model.UnsignedIntType) VersionConvertor_14_30.convertType(src.getReliableCacheElement())); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((StringType) VersionConvertor_14_30.convertType(src.getDocumentationElement())); if (src.hasEvent()) { for (org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingEventComponent t : src.getEvent()) tgt.addEvent(convertConformanceMessagingEventComponent(t)); } @@ -304,10 +306,10 @@ public class Conformance14_30 { if (src.hasEndpoint()) { for (org.hl7.fhir.dstu2016may.model.Conformance.ConformanceMessagingEndpointComponent t : src.getEndpoint()) tgt.addEndpoint(convertConformanceMessagingEndpointComponent(t)); } - if (src.hasReliableCache()) - tgt.setReliableCache(src.getReliableCache()); - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasReliableCacheElement()) + tgt.setReliableCacheElement((UnsignedIntType) VersionConvertor_14_30.convertType(src.getReliableCacheElement())); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getDocumentationElement())); if (src.hasEvent()) { for (org.hl7.fhir.dstu2016may.model.Conformance.ConformanceMessagingEventComponent t : src.getEvent()) tgt.addEvent(convertConformanceMessagingEventComponent(t)); } @@ -322,8 +324,8 @@ public class Conformance14_30 { if (src.hasProtocol()) { tgt.setProtocol(VersionConvertor_14_30.convertCoding(src.getProtocol())); } - if (src.hasAddress()) { - tgt.setAddress(src.getAddress()); + if (src.hasAddressElement()) { + tgt.setAddressElement((UriType) VersionConvertor_14_30.convertType(src.getAddressElement())); } return tgt; } @@ -336,8 +338,8 @@ public class Conformance14_30 { if (src.hasProtocol()) { tgt.setProtocol(VersionConvertor_14_30.convertCoding(src.getProtocol())); } - if (src.hasAddress()) { - tgt.setAddress(src.getAddress()); + if (src.hasAddressElement()) { + tgt.setAddressElement((org.hl7.fhir.dstu2016may.model.UriType) VersionConvertor_14_30.convertType(src.getAddressElement())); } return tgt; } @@ -356,8 +358,8 @@ public class Conformance14_30 { if (src.hasMode()) { tgt.setMode(convertConformanceEventMode(src.getMode())); } - if (src.hasFocus()) { - tgt.setFocus(src.getFocus()); + if (src.hasFocusElement()) { + tgt.setFocusElement((CodeType) VersionConvertor_14_30.convertType(src.getFocusElement())); } if (src.hasRequest()) { tgt.setRequest(VersionConvertor_14_30.convertReference(src.getRequest())); @@ -365,8 +367,8 @@ public class Conformance14_30 { if (src.hasResponse()) { tgt.setResponse(VersionConvertor_14_30.convertReference(src.getResponse())); } - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getDocumentationElement())); return tgt; } @@ -384,8 +386,8 @@ public class Conformance14_30 { if (src.hasMode()) { tgt.setMode(convertConformanceEventMode(src.getMode())); } - if (src.hasFocus()) { - tgt.setFocus(src.getFocus()); + if (src.hasFocusElement()) { + tgt.setFocusElement((org.hl7.fhir.dstu2016may.model.CodeType) VersionConvertor_14_30.convertType(src.getFocusElement())); } if (src.hasRequest()) { tgt.setRequest(VersionConvertor_14_30.convertReference(src.getRequest())); @@ -393,8 +395,8 @@ public class Conformance14_30 { if (src.hasResponse()) { tgt.setResponse(VersionConvertor_14_30.convertReference(src.getResponse())); } - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((StringType) VersionConvertor_14_30.convertType(src.getDocumentationElement())); return tgt; } @@ -406,8 +408,8 @@ public class Conformance14_30 { if (src.hasMode()) { tgt.setMode(convertRestfulConformanceMode(src.getMode())); } - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getDocumentationElement())); if (src.hasSecurity()) { tgt.setSecurity(convertConformanceRestSecurityComponent(src.getSecurity())); } @@ -437,8 +439,8 @@ public class Conformance14_30 { if (src.hasMode()) { tgt.setMode(convertRestfulConformanceMode(src.getMode())); } - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((StringType) VersionConvertor_14_30.convertType(src.getDocumentationElement())); if (src.hasSecurity()) { tgt.setSecurity(convertConformanceRestSecurityComponent(src.getSecurity())); } @@ -465,8 +467,8 @@ public class Conformance14_30 { return null; org.hl7.fhir.dstu2016may.model.Conformance.ConformanceRestOperationComponent tgt = new org.hl7.fhir.dstu2016may.model.Conformance.ConformanceRestOperationComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); + if (src.hasNameElement()) { + tgt.setNameElement((StringType) VersionConvertor_14_30.convertType(src.getNameElement())); } if (src.hasDefinition()) { tgt.setDefinition(VersionConvertor_14_30.convertReference(src.getDefinition())); @@ -479,8 +481,8 @@ public class Conformance14_30 { return null; org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestOperationComponent tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestOperationComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); + if (src.hasNameElement()) { + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getNameElement())); } if (src.hasDefinition()) { tgt.setDefinition(VersionConvertor_14_30.convertReference(src.getDefinition())); @@ -493,8 +495,8 @@ public class Conformance14_30 { return null; org.hl7.fhir.dstu2016may.model.Conformance.ConformanceRestResourceComponent tgt = new org.hl7.fhir.dstu2016may.model.Conformance.ConformanceRestResourceComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasType()) { - tgt.setType(src.getType()); + if (src.hasTypeElement()) { + tgt.setTypeElement((org.hl7.fhir.dstu2016may.model.CodeType) VersionConvertor_14_30.convertType(src.getTypeElement())); } if (src.hasProfile()) { tgt.setProfile(VersionConvertor_14_30.convertReference(src.getProfile())); @@ -505,14 +507,14 @@ public class Conformance14_30 { if (src.hasVersioning()) { tgt.setVersioning(convertResourceVersionPolicy(src.getVersioning())); } - if (src.hasReadHistory()) - tgt.setReadHistory(src.getReadHistory()); - if (src.hasUpdateCreate()) - tgt.setUpdateCreate(src.getUpdateCreate()); - if (src.hasConditionalCreate()) - tgt.setConditionalCreate(src.getConditionalCreate()); - if (src.hasConditionalUpdate()) - tgt.setConditionalUpdate(src.getConditionalUpdate()); + if (src.hasReadHistoryElement()) + tgt.setReadHistoryElement((BooleanType) VersionConvertor_14_30.convertType(src.getReadHistoryElement())); + if (src.hasUpdateCreateElement()) + tgt.setUpdateCreateElement((BooleanType) VersionConvertor_14_30.convertType(src.getUpdateCreateElement())); + if (src.hasConditionalCreateElement()) + tgt.setConditionalCreateElement((BooleanType) VersionConvertor_14_30.convertType(src.getConditionalCreateElement())); + if (src.hasConditionalUpdateElement()) + tgt.setConditionalUpdateElement((BooleanType) VersionConvertor_14_30.convertType(src.getConditionalUpdateElement())); if (src.hasConditionalDelete()) { tgt.setConditionalDelete(convertConditionalDeleteStatus(src.getConditionalDelete())); } @@ -545,14 +547,14 @@ public class Conformance14_30 { if (src.hasVersioning()) { tgt.setVersioning(convertResourceVersionPolicy(src.getVersioning())); } - if (src.hasReadHistory()) - tgt.setReadHistory(src.getReadHistory()); - if (src.hasUpdateCreate()) - tgt.setUpdateCreate(src.getUpdateCreate()); - if (src.hasConditionalCreate()) - tgt.setConditionalCreate(src.getConditionalCreate()); - if (src.hasConditionalUpdate()) - tgt.setConditionalUpdate(src.getConditionalUpdate()); + if (src.hasReadHistoryElement()) + tgt.setReadHistoryElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_14_30.convertType(src.getReadHistoryElement())); + if (src.hasUpdateCreateElement()) + tgt.setUpdateCreateElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_14_30.convertType(src.getUpdateCreateElement())); + if (src.hasConditionalCreateElement()) + tgt.setConditionalCreateElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_14_30.convertType(src.getConditionalCreateElement())); + if (src.hasConditionalUpdateElement()) + tgt.setConditionalUpdateElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_14_30.convertType(src.getConditionalUpdateElement())); if (src.hasConditionalDelete()) { tgt.setConditionalDelete(convertConditionalDeleteStatus(src.getConditionalDelete())); } @@ -573,16 +575,16 @@ public class Conformance14_30 { return null; org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); + if (src.hasNameElement()) { + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getNameElement())); } - if (src.hasDefinition()) - tgt.setDefinition(src.getDefinition()); + if (src.hasDefinitionElement()) + tgt.setDefinitionElement((UriType) VersionConvertor_14_30.convertType(src.getDefinitionElement())); if (src.hasType()) { tgt.setType(VersionConvertor_14_30.convertSearchParamType(src.getType())); } - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getDocumentationElement())); return tgt; } @@ -591,16 +593,16 @@ public class Conformance14_30 { return null; org.hl7.fhir.dstu2016may.model.Conformance.ConformanceRestResourceSearchParamComponent tgt = new org.hl7.fhir.dstu2016may.model.Conformance.ConformanceRestResourceSearchParamComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); + if (src.hasNameElement()) { + tgt.setNameElement((StringType) VersionConvertor_14_30.convertType(src.getNameElement())); } - if (src.hasDefinition()) - tgt.setDefinition(src.getDefinition()); + if (src.hasDefinitionElement()) + tgt.setDefinitionElement((org.hl7.fhir.dstu2016may.model.UriType) VersionConvertor_14_30.convertType(src.getDefinitionElement())); if (src.hasType()) { tgt.setType(VersionConvertor_14_30.convertSearchParamType(src.getType())); } - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((StringType) VersionConvertor_14_30.convertType(src.getDocumentationElement())); return tgt; } @@ -609,10 +611,10 @@ public class Conformance14_30 { return null; org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestSecurityCertificateComponent tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestSecurityCertificateComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasType()) - tgt.setType(src.getType()); - if (src.hasBlob()) - tgt.setBlob(src.getBlob()); + if (src.hasTypeElement()) + tgt.setTypeElement((CodeType) VersionConvertor_14_30.convertType(src.getTypeElement())); + if (src.hasBlobElement()) + tgt.setBlobElement((Base64BinaryType) VersionConvertor_14_30.convertType(src.getBlobElement())); return tgt; } @@ -621,10 +623,10 @@ public class Conformance14_30 { return null; org.hl7.fhir.dstu2016may.model.Conformance.ConformanceRestSecurityCertificateComponent tgt = new org.hl7.fhir.dstu2016may.model.Conformance.ConformanceRestSecurityCertificateComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasType()) - tgt.setType(src.getType()); - if (src.hasBlob()) - tgt.setBlob(src.getBlob()); + if (src.hasTypeElement()) + tgt.setTypeElement((org.hl7.fhir.dstu2016may.model.CodeType) VersionConvertor_14_30.convertType(src.getTypeElement())); + if (src.hasBlobElement()) + tgt.setBlobElement((org.hl7.fhir.dstu2016may.model.Base64BinaryType) VersionConvertor_14_30.convertType(src.getBlobElement())); return tgt; } @@ -633,13 +635,13 @@ public class Conformance14_30 { return null; org.hl7.fhir.dstu2016may.model.Conformance.ConformanceRestSecurityComponent tgt = new org.hl7.fhir.dstu2016may.model.Conformance.ConformanceRestSecurityComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasCors()) - tgt.setCors(src.getCors()); + if (src.hasCorsElement()) + tgt.setCorsElement((BooleanType) VersionConvertor_14_30.convertType(src.getCorsElement())); if (src.hasService()) { for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getService()) tgt.addService(VersionConvertor_14_30.convertCodeableConcept(t)); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getDescriptionElement())); if (src.hasCertificate()) { for (org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestSecurityCertificateComponent t : src.getCertificate()) tgt.addCertificate(convertConformanceRestSecurityCertificateComponent(t)); } @@ -651,13 +653,13 @@ public class Conformance14_30 { return null; org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestSecurityComponent tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestSecurityComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasCors()) - tgt.setCors(src.getCors()); + if (src.hasCorsElement()) + tgt.setCorsElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_14_30.convertType(src.getCorsElement())); if (src.hasService()) { for (org.hl7.fhir.dstu2016may.model.CodeableConcept t : src.getService()) tgt.addService(VersionConvertor_14_30.convertCodeableConcept(t)); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getDescriptionElement())); if (src.hasCertificate()) { for (org.hl7.fhir.dstu2016may.model.Conformance.ConformanceRestSecurityCertificateComponent t : src.getCertificate()) tgt.addCertificate(convertConformanceRestSecurityCertificateComponent(t)); } @@ -669,13 +671,13 @@ public class Conformance14_30 { return null; org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementSoftwareComponent tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementSoftwareComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); + if (src.hasNameElement()) { + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getNameElement())); } - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasReleaseDate()) - tgt.setReleaseDate(src.getReleaseDate()); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getVersionElement())); + if (src.hasReleaseDateElement()) + tgt.setReleaseDateElement((DateTimeType) VersionConvertor_14_30.convertType(src.getReleaseDateElement())); return tgt; } @@ -684,13 +686,13 @@ public class Conformance14_30 { return null; org.hl7.fhir.dstu2016may.model.Conformance.ConformanceSoftwareComponent tgt = new org.hl7.fhir.dstu2016may.model.Conformance.ConformanceSoftwareComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); + if (src.hasNameElement()) { + tgt.setNameElement((StringType) VersionConvertor_14_30.convertType(src.getNameElement())); } - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasReleaseDate()) - tgt.setReleaseDate(src.getReleaseDate()); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getVersionElement())); + if (src.hasReleaseDateElement()) + tgt.setReleaseDateElement((org.hl7.fhir.dstu2016may.model.DateTimeType) VersionConvertor_14_30.convertType(src.getReleaseDateElement())); return tgt; } @@ -788,8 +790,8 @@ public class Conformance14_30 { if (src.hasCode()) { tgt.setCode(convertTypeRestfulInteraction(src.getCode())); } - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getDocumentationElement())); return tgt; } @@ -801,8 +803,8 @@ public class Conformance14_30 { if (src.hasCode()) { tgt.setCode(convertTypeRestfulInteraction(src.getCode())); } - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((StringType) VersionConvertor_14_30.convertType(src.getDocumentationElement())); return tgt; } @@ -870,8 +872,8 @@ public class Conformance14_30 { if (src.hasCode()) { tgt.setCode(convertSystemRestfulInteraction(src.getCode())); } - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((StringType) VersionConvertor_14_30.convertType(src.getDocumentationElement())); return tgt; } @@ -883,8 +885,8 @@ public class Conformance14_30 { if (src.hasCode()) { tgt.setCode(convertSystemRestfulInteraction(src.getCode())); } - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getDocumentationElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_30/DataElement14_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_30/DataElement14_30.java index 58574a76f..50ea4a474 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_30/DataElement14_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_30/DataElement14_30.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv14_30; import org.hl7.fhir.convertors.VersionConvertor_14_30; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class DataElement14_30 { @@ -10,24 +11,24 @@ public class DataElement14_30 { return null; org.hl7.fhir.dstu3.model.DataElement tgt = new org.hl7.fhir.dstu3.model.DataElement(); VersionConvertor_14_30.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_14_30.convertType(src.getUrlElement())); if (src.hasIdentifier()) { for (org.hl7.fhir.dstu2016may.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_14_30.convertIdentifier(t)); } - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getVersionElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_14_30.convertConformanceResourceStatus(src.getStatus())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_14_30.convertType(src.getExperimentalElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getPublisherElement())); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_14_30.convertType(src.getDateElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getNameElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu2016may.model.DataElement.DataElementContactComponent t : src.getContact()) tgt.addContact(convertDataElementContactComponent(t)); } @@ -35,8 +36,8 @@ public class DataElement14_30 { tgt.addJurisdiction(VersionConvertor_14_30.convertCodeableConcept(t)); else tgt.addUseContext(VersionConvertor_14_30.convertCodeableConceptToUsageContext(t)); - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_14_30.convertType(src.getCopyrightElement())); if (src.hasStringency()) { tgt.setStringency(convertDataElementStringency(src.getStringency())); } @@ -54,24 +55,24 @@ public class DataElement14_30 { return null; org.hl7.fhir.dstu2016may.model.DataElement tgt = new org.hl7.fhir.dstu2016may.model.DataElement(); VersionConvertor_14_30.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu2016may.model.UriType) VersionConvertor_14_30.convertType(src.getUrlElement())); if (src.hasIdentifier()) { for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_14_30.convertIdentifier(t)); } - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getVersionElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_14_30.convertConformanceResourceStatus(src.getStatus())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu2016may.model.BooleanType) VersionConvertor_14_30.convertType(src.getExperimentalElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getPublisherElement())); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu2016may.model.DateTimeType) VersionConvertor_14_30.convertType(src.getDateElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getNameElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) tgt.addContact(convertDataElementContactComponent(t)); } @@ -80,8 +81,8 @@ public class DataElement14_30 { if (src.hasJurisdiction()) { for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getJurisdiction()) tgt.addUseContext(VersionConvertor_14_30.convertCodeableConcept(t)); } - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getCopyrightElement())); if (src.hasStringency()) { tgt.setStringency(convertDataElementStringency(src.getStringency())); } @@ -99,8 +100,8 @@ public class DataElement14_30 { return null; org.hl7.fhir.dstu3.model.ContactDetail tgt = new org.hl7.fhir.dstu3.model.ContactDetail(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu2016may.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_14_30.convertContactPoint(t)); } @@ -112,8 +113,8 @@ public class DataElement14_30 { return null; org.hl7.fhir.dstu2016may.model.DataElement.DataElementContactComponent tgt = new org.hl7.fhir.dstu2016may.model.DataElement.DataElementContactComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu3.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_14_30.convertContactPoint(t)); } @@ -125,15 +126,14 @@ public class DataElement14_30 { return null; org.hl7.fhir.dstu3.model.DataElement.DataElementMappingComponent tgt = new org.hl7.fhir.dstu3.model.DataElement.DataElementMappingComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasIdentity()) { - tgt.setIdentity(src.getIdentity()); - } - if (src.hasUri()) - tgt.setUri(src.getUri()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasComment()) - tgt.setComment(src.getComment()); + if (src.hasIdentityElement()) + tgt.setIdentityElement((org.hl7.fhir.dstu3.model.IdType) VersionConvertor_14_30.convertType(src.getIdentityElement())); + if (src.hasUriElement()) + tgt.setUriElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_14_30.convertType(src.getUriElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getNameElement())); + if (src.hasCommentElement()) + tgt.setCommentElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getCommentElement())); return tgt; } @@ -142,15 +142,14 @@ public class DataElement14_30 { return null; org.hl7.fhir.dstu2016may.model.DataElement.DataElementMappingComponent tgt = new org.hl7.fhir.dstu2016may.model.DataElement.DataElementMappingComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasIdentity()) { - tgt.setIdentity(src.getIdentity()); - } - if (src.hasUri()) - tgt.setUri(src.getUri()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasComment()) - tgt.setComment(src.getComment()); + if (src.hasIdentityElement()) + tgt.setIdentityElement((org.hl7.fhir.dstu2016may.model.IdType) VersionConvertor_14_30.convertType(src.getIdentityElement())); + if (src.hasUriElement()) + tgt.setUriElement((org.hl7.fhir.dstu2016may.model.UriType) VersionConvertor_14_30.convertType(src.getUriElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getNameElement())); + if (src.hasCommentElement()) + tgt.setCommentElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getCommentElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_30/ImplementationGuide14_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_30/ImplementationGuide14_30.java index 29521334a..01f01eaf2 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_30/ImplementationGuide14_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_30/ImplementationGuide14_30.java @@ -1,7 +1,9 @@ package org.hl7.fhir.convertors.conv14_30; import org.hl7.fhir.convertors.VersionConvertor_14_30; +import org.hl7.fhir.dstu2016may.model.StringType; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class ImplementationGuide14_30 { @@ -86,37 +88,35 @@ public class ImplementationGuide14_30 { return null; org.hl7.fhir.dstu2016may.model.ImplementationGuide tgt = new org.hl7.fhir.dstu2016may.model.ImplementationGuide(); VersionConvertor_14_30.copyDomainResource(src, tgt); - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu2016may.model.UriType) VersionConvertor_14_30.convertType(src.getUrlElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_14_30.convertConformanceResourceStatus(src.getStatus())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu2016may.model.BooleanType) VersionConvertor_14_30.convertType(src.getExperimentalElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) tgt.addContact(convertImplementationGuideContactComponent(t)); } - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu2016may.model.DateTimeType) VersionConvertor_14_30.convertType(src.getDateElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getDescriptionElement())); for (org.hl7.fhir.dstu3.model.UsageContext t : src.getUseContext()) if (t.hasValueCodeableConcept()) tgt.addUseContext(VersionConvertor_14_30.convertCodeableConcept(t.getValueCodeableConcept())); if (src.hasJurisdiction()) { for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getJurisdiction()) tgt.addUseContext(VersionConvertor_14_30.convertCodeableConcept(t)); } - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); - if (src.hasFhirVersion()) - tgt.setFhirVersion(src.getFhirVersion()); + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getCopyrightElement())); + if (src.hasFhirVersionElement()) + tgt.setFhirVersionElement((org.hl7.fhir.dstu2016may.model.IdType) VersionConvertor_14_30.convertType(src.getFhirVersionElement())); if (src.hasDependency()) { for (org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuideDependencyComponent t : src.getDependency()) tgt.addDependency(convertImplementationGuideDependencyComponent(t)); } @@ -140,36 +140,34 @@ public class ImplementationGuide14_30 { return null; org.hl7.fhir.dstu3.model.ImplementationGuide tgt = new org.hl7.fhir.dstu3.model.ImplementationGuide(); VersionConvertor_14_30.copyDomainResource(src, tgt); - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_14_30.convertType(src.getUrlElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_14_30.convertConformanceResourceStatus(src.getStatus())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_14_30.convertType(src.getExperimentalElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu2016may.model.ImplementationGuide.ImplementationGuideContactComponent t : src.getContact()) tgt.addContact(convertImplementationGuideContactComponent(t)); } - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_14_30.convertType(src.getDateElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_14_30.convertType(src.getDescriptionElement())); for (org.hl7.fhir.dstu2016may.model.CodeableConcept t : src.getUseContext()) if (VersionConvertor_14_30.isJurisdiction(t)) tgt.addJurisdiction(VersionConvertor_14_30.convertCodeableConcept(t)); else tgt.addUseContext(VersionConvertor_14_30.convertCodeableConceptToUsageContext(t)); - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); - if (src.hasFhirVersion()) - tgt.setFhirVersion(src.getFhirVersion()); + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_14_30.convertType(src.getCopyrightElement())); + if (src.hasFhirVersionElement()) + tgt.setFhirVersionElement((org.hl7.fhir.dstu3.model.IdType) VersionConvertor_14_30.convertType(src.getFhirVersionElement())); if (src.hasDependency()) { for (org.hl7.fhir.dstu2016may.model.ImplementationGuide.ImplementationGuideDependencyComponent t : src.getDependency()) tgt.addDependency(convertImplementationGuideDependencyComponent(t)); } @@ -193,8 +191,8 @@ public class ImplementationGuide14_30 { return null; org.hl7.fhir.dstu2016may.model.ImplementationGuide.ImplementationGuideContactComponent tgt = new org.hl7.fhir.dstu2016may.model.ImplementationGuide.ImplementationGuideContactComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((StringType) VersionConvertor_14_30.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu3.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_14_30.convertContactPoint(t)); } @@ -206,8 +204,8 @@ public class ImplementationGuide14_30 { return null; org.hl7.fhir.dstu3.model.ContactDetail tgt = new org.hl7.fhir.dstu3.model.ContactDetail(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu2016may.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_14_30.convertContactPoint(t)); } @@ -222,9 +220,8 @@ public class ImplementationGuide14_30 { if (src.hasType()) { tgt.setType(convertGuideDependencyType(src.getType())); } - if (src.hasUri()) { - tgt.setUri(src.getUri()); - } + if (src.hasUriElement()) + tgt.setUriElement((org.hl7.fhir.dstu2016may.model.UriType) VersionConvertor_14_30.convertType(src.getUriElement())); return tgt; } @@ -236,9 +233,8 @@ public class ImplementationGuide14_30 { if (src.hasType()) { tgt.setType(convertGuideDependencyType(src.getType())); } - if (src.hasUri()) { - tgt.setUri(src.getUri()); - } + if (src.hasUriElement()) + tgt.setUriElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_14_30.convertType(src.getUriElement())); return tgt; } @@ -247,9 +243,8 @@ public class ImplementationGuide14_30 { return null; org.hl7.fhir.dstu2016may.model.ImplementationGuide.ImplementationGuideGlobalComponent tgt = new org.hl7.fhir.dstu2016may.model.ImplementationGuide.ImplementationGuideGlobalComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasType()) { - tgt.setType(src.getType()); - } + if (src.hasTypeElement()) + tgt.setTypeElement((org.hl7.fhir.dstu2016may.model.CodeType) VersionConvertor_14_30.convertType(src.getTypeElement())); if (src.hasProfile()) { tgt.setProfile(VersionConvertor_14_30.convertReference(src.getProfile())); } @@ -261,9 +256,8 @@ public class ImplementationGuide14_30 { return null; org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuideGlobalComponent tgt = new org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuideGlobalComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasType()) { - tgt.setType(src.getType()); - } + if (src.hasTypeElement()) + tgt.setTypeElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_14_30.convertType(src.getTypeElement())); if (src.hasProfile()) { tgt.setProfile(VersionConvertor_14_30.convertReference(src.getProfile())); } @@ -275,11 +269,10 @@ public class ImplementationGuide14_30 { return null; org.hl7.fhir.dstu2016may.model.ImplementationGuide.ImplementationGuidePackageComponent tgt = new org.hl7.fhir.dstu2016may.model.ImplementationGuide.ImplementationGuidePackageComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getNameElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getDescriptionElement())); if (src.hasResource()) { for (org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuidePackageResourceComponent t : src.getResource()) tgt.addResource(convertImplementationGuidePackageResourceComponent(t)); } @@ -291,11 +284,10 @@ public class ImplementationGuide14_30 { return null; org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuidePackageComponent tgt = new org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuidePackageComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getNameElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getDescriptionElement())); if (src.hasResource()) { for (org.hl7.fhir.dstu2016may.model.ImplementationGuide.ImplementationGuidePackageResourceComponent t : src.getResource()) tgt.addResource(convertImplementationGuidePackageResourceComponent(t)); } @@ -307,15 +299,14 @@ public class ImplementationGuide14_30 { return null; org.hl7.fhir.dstu2016may.model.ImplementationGuide.ImplementationGuidePackageResourceComponent tgt = new org.hl7.fhir.dstu2016may.model.ImplementationGuide.ImplementationGuidePackageResourceComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasExample()) { - tgt.setExample(src.getExample()); - } - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - if (src.hasAcronym()) - tgt.setAcronym(src.getAcronym()); + if (src.hasExampleElement()) + tgt.setExampleElement((org.hl7.fhir.dstu2016may.model.BooleanType) VersionConvertor_14_30.convertType(src.getExampleElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getNameElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getDescriptionElement())); + if (src.hasAcronymElement()) + tgt.setAcronymElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getAcronymElement())); if (src.hasSource()) { tgt.setSource(VersionConvertor_14_30.convertType(src.getSource())); } @@ -329,15 +320,14 @@ public class ImplementationGuide14_30 { return null; org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuidePackageResourceComponent tgt = new org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuidePackageResourceComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasExample()) { - tgt.setExample(src.getExample()); - } - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - if (src.hasAcronym()) - tgt.setAcronym(src.getAcronym()); + if (src.hasExampleElement()) + tgt.setExampleElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_14_30.convertType(src.getExampleElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getNameElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getDescriptionElement())); + if (src.hasAcronymElement()) + tgt.setAcronymElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getAcronymElement())); if (src.hasSource()) { tgt.setSource(VersionConvertor_14_30.convertType(src.getSource())); } @@ -351,11 +341,10 @@ public class ImplementationGuide14_30 { return null; org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuidePageComponent tgt = new org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuidePageComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasSource()) { - tgt.setSource(src.getSource()); - } - if (src.hasName()) { - tgt.setTitle(src.getName()); + if (src.hasSourceElement()) + tgt.setSourceElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_14_30.convertType(src.getSourceElement())); + if (src.hasNameElement()) { + tgt.setTitleElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getNameElement())); } if (src.hasKind()) { tgt.setKind(convertGuidePageKind(src.getKind())); @@ -366,8 +355,8 @@ public class ImplementationGuide14_30 { if (src.hasPackage()) { for (org.hl7.fhir.dstu2016may.model.StringType t : src.getPackage()) tgt.addPackage(t.getValue()); } - if (src.hasFormat()) - tgt.setFormat(src.getFormat()); + if (src.hasFormatElement()) + tgt.setFormatElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_14_30.convertType(src.getFormatElement())); if (src.hasPage()) { for (org.hl7.fhir.dstu2016may.model.ImplementationGuide.ImplementationGuidePageComponent t : src.getPage()) tgt.addPage(convertImplementationGuidePageComponent(t)); } @@ -379,11 +368,10 @@ public class ImplementationGuide14_30 { return null; org.hl7.fhir.dstu2016may.model.ImplementationGuide.ImplementationGuidePageComponent tgt = new org.hl7.fhir.dstu2016may.model.ImplementationGuide.ImplementationGuidePageComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasSource()) { - tgt.setSource(src.getSource()); - } - if (src.hasTitle()) { - tgt.setName(src.getTitle()); + if (src.hasSourceElement()) + tgt.setSourceElement((org.hl7.fhir.dstu2016may.model.UriType) VersionConvertor_14_30.convertType(src.getSourceElement())); + if (src.hasTitleElement()) { + tgt.setNameElement((StringType) VersionConvertor_14_30.convertType(src.getTitleElement())); } if (src.hasKind()) { tgt.setKind(convertGuidePageKind(src.getKind())); @@ -394,8 +382,8 @@ public class ImplementationGuide14_30 { if (src.hasPackage()) { for (org.hl7.fhir.dstu3.model.StringType t : src.getPackage()) tgt.addPackage(t.getValue()); } - if (src.hasFormat()) - tgt.setFormat(src.getFormat()); + if (src.hasFormatElement()) + tgt.setFormatElement((org.hl7.fhir.dstu2016may.model.CodeType) VersionConvertor_14_30.convertType(src.getFormatElement())); if (src.hasPage()) { for (org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuidePageComponent t : src.getPage()) tgt.addPage(convertImplementationGuidePageComponent(t)); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_30/NamingSystem14_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_30/NamingSystem14_30.java index 9882f0d9b..3d445066e 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_30/NamingSystem14_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_30/NamingSystem14_30.java @@ -1,7 +1,9 @@ package org.hl7.fhir.convertors.conv14_30; import org.hl7.fhir.convertors.VersionConvertor_14_30; +import org.hl7.fhir.dstu2016may.model.StringType; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class NamingSystem14_30 { @@ -10,37 +12,35 @@ public class NamingSystem14_30 { return null; org.hl7.fhir.dstu2016may.model.NamingSystem tgt = new org.hl7.fhir.dstu2016may.model.NamingSystem(); VersionConvertor_14_30.copyDomainResource(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_14_30.convertConformanceResourceStatus(src.getStatus())); } if (src.hasKind()) { tgt.setKind(convertNamingSystemType(src.getKind())); } - if (src.hasDate()) { - tgt.setDate(src.getDate()); - } - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu2016may.model.DateTimeType) VersionConvertor_14_30.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) tgt.addContact(convertNamingSystemContactComponent(t)); } - if (src.hasResponsible()) - tgt.setResponsible(src.getResponsible()); + if (src.hasResponsibleElement()) + tgt.setResponsibleElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getResponsibleElement())); if (src.hasType()) { tgt.setType(VersionConvertor_14_30.convertCodeableConcept(src.getType())); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getDescriptionElement())); for (org.hl7.fhir.dstu3.model.UsageContext t : src.getUseContext()) if (t.hasValueCodeableConcept()) tgt.addUseContext(VersionConvertor_14_30.convertCodeableConcept(t.getValueCodeableConcept())); if (src.hasJurisdiction()) { for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getJurisdiction()) tgt.addUseContext(VersionConvertor_14_30.convertCodeableConcept(t)); } - if (src.hasUsage()) - tgt.setUsage(src.getUsage()); + if (src.hasUsageElement()) + tgt.setUsageElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getUsageElement())); if (src.hasUniqueId()) { for (org.hl7.fhir.dstu3.model.NamingSystem.NamingSystemUniqueIdComponent t : src.getUniqueId()) tgt.addUniqueId(convertNamingSystemUniqueIdComponent(t)); } @@ -55,36 +55,34 @@ public class NamingSystem14_30 { return null; org.hl7.fhir.dstu3.model.NamingSystem tgt = new org.hl7.fhir.dstu3.model.NamingSystem(); VersionConvertor_14_30.copyDomainResource(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_14_30.convertConformanceResourceStatus(src.getStatus())); } if (src.hasKind()) { tgt.setKind(convertNamingSystemType(src.getKind())); } - if (src.hasDate()) { - tgt.setDate(src.getDate()); - } - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_14_30.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu2016may.model.NamingSystem.NamingSystemContactComponent t : src.getContact()) tgt.addContact(convertNamingSystemContactComponent(t)); } - if (src.hasResponsible()) - tgt.setResponsible(src.getResponsible()); + if (src.hasResponsibleElement()) + tgt.setResponsibleElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getResponsibleElement())); if (src.hasType()) { tgt.setType(VersionConvertor_14_30.convertCodeableConcept(src.getType())); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_14_30.convertType(src.getDescriptionElement())); for (org.hl7.fhir.dstu2016may.model.CodeableConcept t : src.getUseContext()) if (VersionConvertor_14_30.isJurisdiction(t)) tgt.addJurisdiction(VersionConvertor_14_30.convertCodeableConcept(t)); else tgt.addUseContext(VersionConvertor_14_30.convertCodeableConceptToUsageContext(t)); - if (src.hasUsage()) - tgt.setUsage(src.getUsage()); + if (src.hasUsageElement()) + tgt.setUsageElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getUsageElement())); if (src.hasUniqueId()) { for (org.hl7.fhir.dstu2016may.model.NamingSystem.NamingSystemUniqueIdComponent t : src.getUniqueId()) tgt.addUniqueId(convertNamingSystemUniqueIdComponent(t)); } @@ -99,8 +97,8 @@ public class NamingSystem14_30 { return null; org.hl7.fhir.dstu2016may.model.NamingSystem.NamingSystemContactComponent tgt = new org.hl7.fhir.dstu2016may.model.NamingSystem.NamingSystemContactComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((StringType) VersionConvertor_14_30.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu3.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_14_30.convertContactPoint(t)); } @@ -112,8 +110,8 @@ public class NamingSystem14_30 { return null; org.hl7.fhir.dstu3.model.ContactDetail tgt = new org.hl7.fhir.dstu3.model.ContactDetail(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu2016may.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_14_30.convertContactPoint(t)); } @@ -192,11 +190,10 @@ public class NamingSystem14_30 { if (src.hasType()) { tgt.setType(convertNamingSystemIdentifierType(src.getType())); } - if (src.hasValue()) { - tgt.setValue(src.getValue()); - } - if (src.hasPreferred()) - tgt.setPreferred(src.getPreferred()); + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getValueElement())); + if (src.hasPreferredElement()) + tgt.setPreferredElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_14_30.convertType(src.getPreferredElement())); if (src.hasPeriod()) { tgt.setPeriod(VersionConvertor_14_30.convertPeriod(src.getPeriod())); } @@ -211,11 +208,10 @@ public class NamingSystem14_30 { if (src.hasType()) { tgt.setType(convertNamingSystemIdentifierType(src.getType())); } - if (src.hasValue()) { - tgt.setValue(src.getValue()); - } - if (src.hasPreferred()) - tgt.setPreferred(src.getPreferred()); + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getValueElement())); + if (src.hasPreferredElement()) + tgt.setPreferredElement((org.hl7.fhir.dstu2016may.model.BooleanType) VersionConvertor_14_30.convertType(src.getPreferredElement())); if (src.hasPeriod()) { tgt.setPeriod(VersionConvertor_14_30.convertPeriod(src.getPeriod())); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_30/OperationDefinition14_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_30/OperationDefinition14_30.java index e65b8394b..7e1d2c9de 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_30/OperationDefinition14_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_30/OperationDefinition14_30.java @@ -1,9 +1,12 @@ package org.hl7.fhir.convertors.conv14_30; import org.hl7.fhir.convertors.VersionConvertor_14_30; +import org.hl7.fhir.dstu2016may.model.StringType; import org.hl7.fhir.dstu3.model.Enumerations.SearchParamType; +import org.hl7.fhir.dstu3.model.MarkdownType; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.utilities.Utilities; +import java.util.Collections; public class OperationDefinition14_30 { @@ -12,56 +15,52 @@ public class OperationDefinition14_30 { return null; org.hl7.fhir.dstu3.model.OperationDefinition tgt = new org.hl7.fhir.dstu3.model.OperationDefinition(); VersionConvertor_14_30.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_14_30.convertType(src.getUrlElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_14_30.convertConformanceResourceStatus(src.getStatus())); } if (src.hasKind()) { tgt.setKind(convertOperationKind(src.getKind())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_14_30.convertType(src.getExperimentalElement())); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_14_30.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu2016may.model.OperationDefinition.OperationDefinitionContactComponent t : src.getContact()) tgt.addContact(convertOperationDefinitionContactComponent(t)); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_14_30.convertType(src.getDescriptionElement())); for (org.hl7.fhir.dstu2016may.model.CodeableConcept t : src.getUseContext()) if (VersionConvertor_14_30.isJurisdiction(t)) tgt.addJurisdiction(VersionConvertor_14_30.convertCodeableConcept(t)); else tgt.addUseContext(VersionConvertor_14_30.convertCodeableConceptToUsageContext(t)); - if (src.hasRequirements()) - tgt.setPurpose(src.getRequirements()); - if (src.hasIdempotent()) - tgt.setIdempotent(src.getIdempotent()); - if (src.hasCode()) { - tgt.setCode(src.getCode()); - } - if (src.hasComment()) - tgt.setComment(src.getComment()); + if (src.hasRequirementsElement()) + tgt.setPurposeElement((MarkdownType) VersionConvertor_14_30.convertType(src.getRequirementsElement())); + if (src.hasIdempotentElement()) + tgt.setIdempotentElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_14_30.convertType(src.getIdempotentElement())); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_14_30.convertType(src.getCodeElement())); + if (src.hasCommentElement()) + tgt.setCommentElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getCommentElement())); if (src.hasBase()) { tgt.setBase(VersionConvertor_14_30.convertReference(src.getBase())); } - if (src.hasSystem()) { - tgt.setSystem(src.getSystem()); - } + if (src.hasSystemElement()) + tgt.setSystemElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_14_30.convertType(src.getSystemElement())); if (src.hasType()) { for (org.hl7.fhir.dstu2016may.model.CodeType t : src.getType()) tgt.addResource(t.getValue()); } tgt.setType(tgt.hasResource()); - if (src.hasInstance()) { - tgt.setInstance(src.getInstance()); - } + if (src.hasInstanceElement()) + tgt.setInstanceElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_14_30.convertType(src.getInstanceElement())); if (src.hasParameter()) { for (org.hl7.fhir.dstu2016may.model.OperationDefinition.OperationDefinitionParameterComponent t : src.getParameter()) tgt.addParameter(convertOperationDefinitionParameterComponent(t)); } @@ -73,57 +72,53 @@ public class OperationDefinition14_30 { return null; org.hl7.fhir.dstu2016may.model.OperationDefinition tgt = new org.hl7.fhir.dstu2016may.model.OperationDefinition(); VersionConvertor_14_30.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu2016may.model.UriType) VersionConvertor_14_30.convertType(src.getUrlElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_14_30.convertConformanceResourceStatus(src.getStatus())); } if (src.hasKind()) { tgt.setKind(convertOperationKind(src.getKind())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu2016may.model.BooleanType) VersionConvertor_14_30.convertType(src.getExperimentalElement())); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu2016may.model.DateTimeType) VersionConvertor_14_30.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) tgt.addContact(convertOperationDefinitionContactComponent(t)); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getDescriptionElement())); for (org.hl7.fhir.dstu3.model.UsageContext t : src.getUseContext()) if (t.hasValueCodeableConcept()) tgt.addUseContext(VersionConvertor_14_30.convertCodeableConcept(t.getValueCodeableConcept())); if (src.hasJurisdiction()) { for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getJurisdiction()) tgt.addUseContext(VersionConvertor_14_30.convertCodeableConcept(t)); } - if (src.hasPurpose()) - tgt.setRequirements(src.getPurpose()); - if (src.hasIdempotent()) - tgt.setIdempotent(src.getIdempotent()); - if (src.hasCode()) { - tgt.setCode(src.getCode()); - } - if (src.hasComment()) - tgt.setComment(src.getComment()); + if (src.hasPurposeElement()) + tgt.setRequirementsElement((StringType) VersionConvertor_14_30.convertType(src.getPurposeElement())); + if (src.hasIdempotentElement()) + tgt.setIdempotentElement((org.hl7.fhir.dstu2016may.model.BooleanType) VersionConvertor_14_30.convertType(src.getIdempotentElement())); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu2016may.model.CodeType) VersionConvertor_14_30.convertType(src.getCodeElement())); + if (src.hasCommentElement()) + tgt.setCommentElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getCommentElement())); if (src.hasBase()) { tgt.setBase(VersionConvertor_14_30.convertReference(src.getBase())); } - if (src.hasSystem()) { - tgt.setSystem(src.getSystem()); - } + if (src.hasSystemElement()) + tgt.setSystemElement((org.hl7.fhir.dstu2016may.model.BooleanType) VersionConvertor_14_30.convertType(src.getSystemElement())); if (src.getType()) if (src.hasResource()) { for (org.hl7.fhir.dstu3.model.CodeType t : src.getResource()) tgt.addType(t.getValue()); } - if (src.hasInstance()) { - tgt.setInstance(src.getInstance()); - } + if (src.hasInstanceElement()) + tgt.setInstanceElement((org.hl7.fhir.dstu2016may.model.BooleanType) VersionConvertor_14_30.convertType(src.getInstanceElement())); if (src.hasParameter()) { for (org.hl7.fhir.dstu3.model.OperationDefinition.OperationDefinitionParameterComponent t : src.getParameter()) tgt.addParameter(convertOperationDefinitionParameterComponent(t)); } @@ -135,8 +130,8 @@ public class OperationDefinition14_30 { return null; org.hl7.fhir.dstu2016may.model.OperationDefinition.OperationDefinitionContactComponent tgt = new org.hl7.fhir.dstu2016may.model.OperationDefinition.OperationDefinitionContactComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((StringType) VersionConvertor_14_30.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu3.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_14_30.convertContactPoint(t)); } @@ -148,8 +143,8 @@ public class OperationDefinition14_30 { return null; org.hl7.fhir.dstu3.model.ContactDetail tgt = new org.hl7.fhir.dstu3.model.ContactDetail(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu2016may.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_14_30.convertContactPoint(t)); } @@ -189,22 +184,19 @@ public class OperationDefinition14_30 { return null; org.hl7.fhir.dstu2016may.model.OperationDefinition.OperationDefinitionParameterComponent tgt = new org.hl7.fhir.dstu2016may.model.OperationDefinition.OperationDefinitionParameterComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.CodeType) VersionConvertor_14_30.convertType(src.getNameElement())); if (src.hasUse()) { tgt.setUse(convertOperationParameterUse(src.getUse())); } - if (src.hasMin()) { - tgt.setMin(src.getMin()); - } - if (src.hasMax()) { - tgt.setMax(src.getMax()); - } - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); - if (src.hasType()) - tgt.setType(src.getType()); + if (src.hasMinElement()) + tgt.setMinElement((org.hl7.fhir.dstu2016may.model.IntegerType) VersionConvertor_14_30.convertType(src.getMinElement())); + if (src.hasMaxElement()) + tgt.setMaxElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getMaxElement())); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getDocumentationElement())); + if (src.hasTypeElement()) + tgt.setTypeElement((org.hl7.fhir.dstu2016may.model.CodeType) VersionConvertor_14_30.convertType(src.getTypeElement())); if (src.hasSearchType()) { tgt.setSearchType(VersionConvertor_14_30.convertSearchParamType(src.getSearchType())); } @@ -225,30 +217,19 @@ public class OperationDefinition14_30 { return null; org.hl7.fhir.dstu3.model.OperationDefinition.OperationDefinitionParameterComponent tgt = new org.hl7.fhir.dstu3.model.OperationDefinition.OperationDefinitionParameterComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_14_30.convertType(src.getNameElement())); if (src.hasUse()) { tgt.setUse(convertOperationParameterUse(src.getUse())); } - if (src.hasMin()) { - tgt.setMin(src.getMin()); - } - if (src.hasMax()) { - tgt.setMax(src.getMax()); - } - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); - if (Utilities.existsInList(src.getType(), "token", "reference", "composite", "number", "date", "quantity", "uri")) { - tgt.setType("string"); - if (src.hasType()) { - tgt.setSearchType(SearchParamType.fromCode(src.getType())); - } - } else { - if (src.hasType()) { - tgt.setType(src.getType()); - } - } + if (src.hasMinElement()) + tgt.setMinElement((org.hl7.fhir.dstu3.model.IntegerType) VersionConvertor_14_30.convertType(src.getMinElement())); + if (src.hasMaxElement()) + tgt.setMaxElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getMaxElement())); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getDocumentationElement())); + if (Utilities.existsInList(src.getType(), "token", "reference", "composite", "number", "date", "quantity", "uri")) + tgt.setTypeElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_14_30.convertType(src.getTypeElement())); if (src.hasSearchType()) { tgt.setSearchType(VersionConvertor_14_30.convertSearchParamType(src.getSearchType())); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_30/OperationOutcome14_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_30/OperationOutcome14_30.java index 9e1d6a964..15fd027ca 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_30/OperationOutcome14_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_30/OperationOutcome14_30.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv14_30; import org.hl7.fhir.convertors.VersionConvertor_14_30; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class OperationOutcome14_30 { @@ -209,8 +210,8 @@ public class OperationOutcome14_30 { if (src.hasDetails()) { tgt.setDetails(VersionConvertor_14_30.convertCodeableConcept(src.getDetails())); } - if (src.hasDiagnostics()) - tgt.setDiagnostics(src.getDiagnostics()); + if (src.hasDiagnosticsElement()) + tgt.setDiagnosticsElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getDiagnosticsElement())); if (src.hasLocation()) { for (org.hl7.fhir.dstu3.model.StringType t : src.getLocation()) tgt.addLocation(t.getValue()); } @@ -234,8 +235,8 @@ public class OperationOutcome14_30 { if (src.hasDetails()) { tgt.setDetails(VersionConvertor_14_30.convertCodeableConcept(src.getDetails())); } - if (src.hasDiagnostics()) - tgt.setDiagnostics(src.getDiagnostics()); + if (src.hasDiagnosticsElement()) + tgt.setDiagnosticsElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getDiagnosticsElement())); if (src.hasLocation()) { for (org.hl7.fhir.dstu2016may.model.StringType t : src.getLocation()) tgt.addLocation(t.getValue()); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_30/Parameters14_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_30/Parameters14_30.java index 798ba3eb2..41eb46b1a 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_30/Parameters14_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_30/Parameters14_30.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv14_30; import org.hl7.fhir.convertors.VersionConvertor_14_30; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Parameters14_30 { @@ -32,9 +33,8 @@ public class Parameters14_30 { return null; org.hl7.fhir.dstu3.model.Parameters.ParametersParameterComponent tgt = new org.hl7.fhir.dstu3.model.Parameters.ParametersParameterComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getNameElement())); if (src.hasValue()) { tgt.setValue(VersionConvertor_14_30.convertType(src.getValue())); } @@ -52,9 +52,8 @@ public class Parameters14_30 { return null; org.hl7.fhir.dstu2016may.model.Parameters.ParametersParameterComponent tgt = new org.hl7.fhir.dstu2016may.model.Parameters.ParametersParameterComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getNameElement())); if (src.hasValue()) { tgt.setValue(VersionConvertor_14_30.convertType(src.getValue())); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_30/Questionnaire14_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_30/Questionnaire14_30.java index 95506365b..324d0a188 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_30/Questionnaire14_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_30/Questionnaire14_30.java @@ -1,9 +1,11 @@ package org.hl7.fhir.convertors.conv14_30; import org.hl7.fhir.convertors.VersionConvertor_14_30; +import org.hl7.fhir.dstu2016may.model.BooleanType; import org.hl7.fhir.dstu3.model.ContactDetail; import org.hl7.fhir.dstu3.model.UsageContext; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Questionnaire14_30 { @@ -12,20 +14,20 @@ public class Questionnaire14_30 { return null; org.hl7.fhir.dstu2016may.model.Questionnaire tgt = new org.hl7.fhir.dstu2016may.model.Questionnaire(); VersionConvertor_14_30.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu2016may.model.UriType) VersionConvertor_14_30.convertType(src.getUrlElement())); if (src.hasIdentifier()) { for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_14_30.convertIdentifier(t)); } - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getVersionElement())); if (src.hasStatus()) { tgt.setStatus(convertQuestionnaireStatus(src.getStatus())); } - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu2016may.model.DateTimeType) VersionConvertor_14_30.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getPublisherElement())); if (src.hasContact()) { for (ContactDetail t : src.getContact()) for (org.hl7.fhir.dstu3.model.ContactPoint t1 : t.getTelecom()) tgt.addTelecom(VersionConvertor_14_30.convertContactPoint(t1)); } @@ -35,8 +37,8 @@ public class Questionnaire14_30 { if (src.hasJurisdiction()) { for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getJurisdiction()) tgt.addUseContext(VersionConvertor_14_30.convertCodeableConcept(t)); } - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getTitleElement())); if (src.hasCode()) { for (org.hl7.fhir.dstu3.model.Coding t : src.getCode()) tgt.addConcept(VersionConvertor_14_30.convertCoding(t)); } @@ -54,20 +56,20 @@ public class Questionnaire14_30 { return null; org.hl7.fhir.dstu3.model.Questionnaire tgt = new org.hl7.fhir.dstu3.model.Questionnaire(); VersionConvertor_14_30.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_14_30.convertType(src.getUrlElement())); if (src.hasIdentifier()) { for (org.hl7.fhir.dstu2016may.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_14_30.convertIdentifier(t)); } - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getVersionElement())); if (src.hasStatus()) { tgt.setStatus(convertQuestionnaireStatus(src.getStatus())); } - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_14_30.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getPublisherElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu2016may.model.ContactPoint t : src.getTelecom()) tgt.addContact(convertQuestionnaireContactComponent(t)); } @@ -75,8 +77,8 @@ public class Questionnaire14_30 { tgt.addJurisdiction(VersionConvertor_14_30.convertCodeableConcept(t)); else tgt.addUseContext(VersionConvertor_14_30.convertCodeableConceptToUsageContext(t)); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getTitleElement())); if (src.hasConcept()) { for (org.hl7.fhir.dstu2016may.model.Coding t : src.getConcept()) tgt.addCode(VersionConvertor_14_30.convertCoding(t)); } @@ -103,29 +105,29 @@ public class Questionnaire14_30 { return null; org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemComponent tgt = new org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasLinkId()) - tgt.setLinkId(src.getLinkId()); + if (src.hasLinkIdElement()) + tgt.setLinkIdElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getLinkIdElement())); if (src.hasConcept()) { for (org.hl7.fhir.dstu2016may.model.Coding t : src.getConcept()) tgt.addCode(VersionConvertor_14_30.convertCoding(t)); } - if (src.hasPrefix()) - tgt.setPrefix(src.getPrefix()); - if (src.hasText()) - tgt.setText(src.getText()); + if (src.hasPrefixElement()) + tgt.setPrefixElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getPrefixElement())); + if (src.hasTextElement()) + tgt.setTextElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getTextElement())); if (src.hasType()) { tgt.setType(convertQuestionnaireItemType(src.getType())); } if (src.hasEnableWhen()) { for (org.hl7.fhir.dstu2016may.model.Questionnaire.QuestionnaireItemEnableWhenComponent t : src.getEnableWhen()) tgt.addEnableWhen(convertQuestionnaireItemEnableWhenComponent(t)); } - if (src.hasRequired()) - tgt.setRequired(src.getRequired()); - if (src.hasRepeats()) - tgt.setRepeats(src.getRepeats()); - if (src.hasReadOnly()) - tgt.setReadOnly(src.getReadOnly()); - if (src.hasMaxLength()) - tgt.setMaxLength(src.getMaxLength()); + if (src.hasRequiredElement()) + tgt.setRequiredElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_14_30.convertType(src.getRequiredElement())); + if (src.hasRepeatsElement()) + tgt.setRepeatsElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_14_30.convertType(src.getRepeatsElement())); + if (src.hasReadOnlyElement()) + tgt.setReadOnlyElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_14_30.convertType(src.getReadOnlyElement())); + if (src.hasMaxLengthElement()) + tgt.setMaxLengthElement((org.hl7.fhir.dstu3.model.IntegerType) VersionConvertor_14_30.convertType(src.getMaxLengthElement())); if (src.hasOptions()) { tgt.setOptions(VersionConvertor_14_30.convertReference(src.getOptions())); } @@ -146,29 +148,29 @@ public class Questionnaire14_30 { return null; org.hl7.fhir.dstu2016may.model.Questionnaire.QuestionnaireItemComponent tgt = new org.hl7.fhir.dstu2016may.model.Questionnaire.QuestionnaireItemComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasLinkId()) - tgt.setLinkId(src.getLinkId()); + if (src.hasLinkIdElement()) + tgt.setLinkIdElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getLinkIdElement())); if (src.hasCode()) { for (org.hl7.fhir.dstu3.model.Coding t : src.getCode()) tgt.addConcept(VersionConvertor_14_30.convertCoding(t)); } - if (src.hasPrefix()) - tgt.setPrefix(src.getPrefix()); - if (src.hasText()) - tgt.setText(src.getText()); + if (src.hasPrefixElement()) + tgt.setPrefixElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getPrefixElement())); + if (src.hasTextElement()) + tgt.setTextElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getTextElement())); if (src.hasType()) { tgt.setType(convertQuestionnaireItemType(src.getType())); } if (src.hasEnableWhen()) { for (org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemEnableWhenComponent t : src.getEnableWhen()) tgt.addEnableWhen(convertQuestionnaireItemEnableWhenComponent(t)); } - if (src.hasRequired()) - tgt.setRequired(src.getRequired()); - if (src.hasRepeats()) - tgt.setRepeats(src.getRepeats()); - if (src.hasReadOnly()) - tgt.setReadOnly(src.getReadOnly()); - if (src.hasMaxLength()) - tgt.setMaxLength(src.getMaxLength()); + if (src.hasRequiredElement()) + tgt.setRequiredElement((org.hl7.fhir.dstu2016may.model.BooleanType) VersionConvertor_14_30.convertType(src.getRequiredElement())); + if (src.hasRepeatsElement()) + tgt.setRepeatsElement((org.hl7.fhir.dstu2016may.model.BooleanType) VersionConvertor_14_30.convertType(src.getRepeatsElement())); + if (src.hasReadOnlyElement()) + tgt.setReadOnlyElement((org.hl7.fhir.dstu2016may.model.BooleanType) VersionConvertor_14_30.convertType(src.getReadOnlyElement())); + if (src.hasMaxLengthElement()) + tgt.setMaxLengthElement((org.hl7.fhir.dstu2016may.model.IntegerType) VersionConvertor_14_30.convertType(src.getMaxLengthElement())); if (src.hasOptions()) { tgt.setOptions(VersionConvertor_14_30.convertReference(src.getOptions())); } @@ -189,11 +191,10 @@ public class Questionnaire14_30 { return null; org.hl7.fhir.dstu2016may.model.Questionnaire.QuestionnaireItemEnableWhenComponent tgt = new org.hl7.fhir.dstu2016may.model.Questionnaire.QuestionnaireItemEnableWhenComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasQuestion()) { - tgt.setQuestion(src.getQuestion()); - } - if (src.hasHasAnswer()) - tgt.setAnswered(src.getHasAnswer()); + if (src.hasQuestionElement()) + tgt.setQuestionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getQuestionElement())); + if (src.hasHasAnswerElement()) + tgt.setAnsweredElement((BooleanType) VersionConvertor_14_30.convertType(src.getHasAnswerElement())); if (src.hasAnswer()) { tgt.setAnswer(VersionConvertor_14_30.convertType(src.getAnswer())); } @@ -205,11 +206,10 @@ public class Questionnaire14_30 { return null; org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemEnableWhenComponent tgt = new org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemEnableWhenComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasQuestion()) { - tgt.setQuestion(src.getQuestion()); - } - if (src.hasAnswered()) - tgt.setHasAnswer(src.getAnswered()); + if (src.hasQuestionElement()) + tgt.setQuestionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getQuestionElement())); + if (src.hasAnsweredElement()) + tgt.setHasAnswerElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_14_30.convertType(src.getAnsweredElement())); if (src.hasAnswer()) { tgt.setAnswer(VersionConvertor_14_30.convertType(src.getAnswer())); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_30/QuestionnaireResponse14_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_30/QuestionnaireResponse14_30.java index 44a9e2659..1e22e6d71 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_30/QuestionnaireResponse14_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_30/QuestionnaireResponse14_30.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv14_30; import org.hl7.fhir.convertors.VersionConvertor_14_30; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class QuestionnaireResponse14_30 { @@ -28,8 +29,8 @@ public class QuestionnaireResponse14_30 { if (src.hasAuthor()) { tgt.setAuthor(VersionConvertor_14_30.convertReference(src.getAuthor())); } - if (src.hasAuthored()) - tgt.setAuthored(src.getAuthored()); + if (src.hasAuthoredElement()) + tgt.setAuthoredElement((org.hl7.fhir.dstu2016may.model.DateTimeType) VersionConvertor_14_30.convertType(src.getAuthoredElement())); if (src.hasSource()) { tgt.setSource(VersionConvertor_14_30.convertReference(src.getSource())); } @@ -62,8 +63,8 @@ public class QuestionnaireResponse14_30 { if (src.hasAuthor()) { tgt.setAuthor(VersionConvertor_14_30.convertReference(src.getAuthor())); } - if (src.hasAuthored()) - tgt.setAuthored(src.getAuthored()); + if (src.hasAuthoredElement()) + tgt.setAuthoredElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_14_30.convertType(src.getAuthoredElement())); if (src.hasSource()) { tgt.setSource(VersionConvertor_14_30.convertReference(src.getSource())); } @@ -106,10 +107,10 @@ public class QuestionnaireResponse14_30 { return null; org.hl7.fhir.dstu2016may.model.QuestionnaireResponse.QuestionnaireResponseItemComponent tgt = new org.hl7.fhir.dstu2016may.model.QuestionnaireResponse.QuestionnaireResponseItemComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasLinkId()) - tgt.setLinkId(src.getLinkId()); - if (src.hasText()) - tgt.setText(src.getText()); + if (src.hasLinkIdElement()) + tgt.setLinkIdElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getLinkIdElement())); + if (src.hasTextElement()) + tgt.setTextElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getTextElement())); if (src.hasSubject()) { tgt.setSubject(VersionConvertor_14_30.convertReference(src.getSubject())); } @@ -127,10 +128,10 @@ public class QuestionnaireResponse14_30 { return null; org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseItemComponent tgt = new org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseItemComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasLinkId()) - tgt.setLinkId(src.getLinkId()); - if (src.hasText()) - tgt.setText(src.getText()); + if (src.hasLinkIdElement()) + tgt.setLinkIdElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getLinkIdElement())); + if (src.hasTextElement()) + tgt.setTextElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getTextElement())); if (src.hasSubject()) { tgt.setSubject(VersionConvertor_14_30.convertReference(src.getSubject())); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_30/SearchParameter14_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_30/SearchParameter14_30.java index 4ad293ef6..1d820fbc8 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_30/SearchParameter14_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_30/SearchParameter14_30.java @@ -1,7 +1,9 @@ package org.hl7.fhir.convertors.conv14_30; import org.hl7.fhir.convertors.VersionConvertor_14_30; +import org.hl7.fhir.dstu2016may.model.StringType; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class SearchParameter14_30 { @@ -10,21 +12,19 @@ public class SearchParameter14_30 { return null; org.hl7.fhir.dstu2016may.model.SearchParameter tgt = new org.hl7.fhir.dstu2016may.model.SearchParameter(); VersionConvertor_14_30.copyDomainResource(src, tgt); - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu2016may.model.UriType) VersionConvertor_14_30.convertType(src.getUrlElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_14_30.convertConformanceResourceStatus(src.getStatus())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu2016may.model.BooleanType) VersionConvertor_14_30.convertType(src.getExperimentalElement())); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu2016may.model.DateTimeType) VersionConvertor_14_30.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) tgt.addContact(convertSearchParameterContactComponent(t)); } @@ -35,22 +35,20 @@ public class SearchParameter14_30 { } if (src.hasPurpose()) tgt.setRequirements(src.getPurpose()); - if (src.hasCode()) { - tgt.setCode(src.getCode()); - } + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu2016may.model.CodeType) VersionConvertor_14_30.convertType(src.getCodeElement())); if (src.hasBase()) { for (org.hl7.fhir.dstu3.model.CodeType t : src.getBase()) tgt.setBase(t.asStringValue()); } if (src.hasType()) { tgt.setType(VersionConvertor_14_30.convertSearchParamType(src.getType())); } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } - if (src.hasExpression()) - tgt.setExpression(src.getExpression()); - if (src.hasXpath()) - tgt.setXpath(src.getXpath()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getDescriptionElement())); + if (src.hasExpressionElement()) + tgt.setExpressionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getExpressionElement())); + if (src.hasXpathElement()) + tgt.setXpathElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getXpathElement())); if (src.hasXpathUsage()) { tgt.setXpathUsage(convertXPathUsageType(src.getXpathUsage())); } @@ -65,21 +63,19 @@ public class SearchParameter14_30 { return null; org.hl7.fhir.dstu3.model.SearchParameter tgt = new org.hl7.fhir.dstu3.model.SearchParameter(); VersionConvertor_14_30.copyDomainResource(src, tgt); - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_14_30.convertType(src.getUrlElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_14_30.convertConformanceResourceStatus(src.getStatus())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_14_30.convertType(src.getExperimentalElement())); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_14_30.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu2016may.model.SearchParameter.SearchParameterContactComponent t : src.getContact()) tgt.addContact(convertSearchParameterContactComponent(t)); } @@ -89,22 +85,19 @@ public class SearchParameter14_30 { tgt.addUseContext(VersionConvertor_14_30.convertCodeableConceptToUsageContext(t)); if (src.hasRequirements()) tgt.setPurpose(src.getRequirements()); - if (src.hasCode()) { - tgt.setCode(src.getCode()); - } - if (src.hasBase()) { - tgt.addBase(src.getBase()); - } + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_14_30.convertType(src.getCodeElement())); + if (src.hasBaseElement()) + tgt.setBase(Collections.singletonList((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_14_30.convertType(src.getBaseElement()))); if (src.hasType()) { tgt.setType(VersionConvertor_14_30.convertSearchParamType(src.getType())); } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } - if (src.hasExpression()) - tgt.setExpression(src.getExpression()); - if (src.hasXpath()) - tgt.setXpath(src.getXpath()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_14_30.convertType(src.getDescriptionElement())); + if (src.hasExpressionElement()) + tgt.setExpressionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getExpressionElement())); + if (src.hasXpathElement()) + tgt.setXpathElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getXpathElement())); if (src.hasXpathUsage()) { tgt.setXpathUsage(convertXPathUsageType(src.getXpathUsage())); } @@ -119,8 +112,8 @@ public class SearchParameter14_30 { return null; org.hl7.fhir.dstu2016may.model.SearchParameter.SearchParameterContactComponent tgt = new org.hl7.fhir.dstu2016may.model.SearchParameter.SearchParameterContactComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((StringType) VersionConvertor_14_30.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu3.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_14_30.convertContactPoint(t)); } @@ -132,8 +125,8 @@ public class SearchParameter14_30 { return null; org.hl7.fhir.dstu3.model.ContactDetail tgt = new org.hl7.fhir.dstu3.model.ContactDetail(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu2016may.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_14_30.convertContactPoint(t)); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_30/StructureDefinition14_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_30/StructureDefinition14_30.java index 6f994dfd9..e5f857593 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_30/StructureDefinition14_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_30/StructureDefinition14_30.java @@ -1,8 +1,11 @@ package org.hl7.fhir.convertors.conv14_30; import org.hl7.fhir.convertors.VersionConvertor_14_30; +import org.hl7.fhir.dstu2016may.model.StringType; import org.hl7.fhir.dstu2016may.model.StructureDefinition.TypeDerivationRule; +import org.hl7.fhir.dstu3.model.CodeType; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class StructureDefinition14_30 { @@ -41,32 +44,31 @@ public class StructureDefinition14_30 { return null; org.hl7.fhir.dstu2016may.model.StructureDefinition tgt = new org.hl7.fhir.dstu2016may.model.StructureDefinition(); VersionConvertor_14_30.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu2016may.model.UriType) VersionConvertor_14_30.convertType(src.getUrlElement())); if (src.hasIdentifier()) { for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_14_30.convertIdentifier(t)); } - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasTitle()) - tgt.setDisplay(src.getTitle()); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getNameElement())); + if (src.hasTitleElement()) + tgt.setDisplayElement((StringType) VersionConvertor_14_30.convertType(src.getTitleElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_14_30.convertConformanceResourceStatus(src.getStatus())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu2016may.model.BooleanType) VersionConvertor_14_30.convertType(src.getExperimentalElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) tgt.addContact(convertStructureDefinitionContactComponent(t)); } - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu2016may.model.DateTimeType) VersionConvertor_14_30.convertType(src.getDateElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getDescriptionElement())); for (org.hl7.fhir.dstu3.model.UsageContext t : src.getUseContext()) if (t.hasValueCodeableConcept()) tgt.addUseContext(VersionConvertor_14_30.convertCodeableConcept(t.getValueCodeableConcept())); if (src.hasJurisdiction()) { @@ -74,30 +76,29 @@ public class StructureDefinition14_30 { } if (src.hasPurpose()) tgt.setRequirements(src.getPurpose()); - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getCopyrightElement())); if (src.hasKeyword()) { for (org.hl7.fhir.dstu3.model.Coding t : src.getKeyword()) tgt.addCode(VersionConvertor_14_30.convertCoding(t)); } - if (src.hasFhirVersion()) - tgt.setFhirVersion(src.getFhirVersion()); + if (src.hasFhirVersionElement()) + tgt.setFhirVersionElement((org.hl7.fhir.dstu2016may.model.IdType) VersionConvertor_14_30.convertType(src.getFhirVersionElement())); if (src.hasMapping()) { for (org.hl7.fhir.dstu3.model.StructureDefinition.StructureDefinitionMappingComponent t : src.getMapping()) tgt.addMapping(convertStructureDefinitionMappingComponent(t)); } if (src.hasKind()) { tgt.setKind(convertStructureDefinitionKind(src.getKind())); } - if (src.hasAbstract()) { - tgt.setAbstract(src.getAbstract()); - } + if (src.hasAbstractElement()) + tgt.setAbstractElement((org.hl7.fhir.dstu2016may.model.BooleanType) VersionConvertor_14_30.convertType(src.getAbstractElement())); if (src.hasContextType()) { tgt.setContextType(convertExtensionContext(src.getContextType())); } if (src.hasContext()) { for (org.hl7.fhir.dstu3.model.StringType t : src.getContext()) tgt.addContext(t.getValue()); } - if (src.hasBaseDefinition()) - tgt.setBaseDefinition(src.getBaseDefinition()); + if (src.hasBaseDefinitionElement()) + tgt.setBaseDefinitionElement((org.hl7.fhir.dstu2016may.model.UriType) VersionConvertor_14_30.convertType(src.getBaseDefinitionElement())); if (src.hasType() && src.getDerivation() == org.hl7.fhir.dstu3.model.StructureDefinition.TypeDerivationRule.CONSTRAINT) tgt.setBaseType(src.getType()); if (src.hasDerivation()) { @@ -116,32 +117,31 @@ public class StructureDefinition14_30 { return null; org.hl7.fhir.dstu3.model.StructureDefinition tgt = new org.hl7.fhir.dstu3.model.StructureDefinition(); VersionConvertor_14_30.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_14_30.convertType(src.getUrlElement())); if (src.hasIdentifier()) { for (org.hl7.fhir.dstu2016may.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_14_30.convertIdentifier(t)); } - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasDisplay()) - tgt.setTitle(src.getDisplay()); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getNameElement())); + if (src.hasDisplayElement()) + tgt.setTitleElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getDisplayElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_14_30.convertConformanceResourceStatus(src.getStatus())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_14_30.convertType(src.getExperimentalElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu2016may.model.StructureDefinition.StructureDefinitionContactComponent t : src.getContact()) tgt.addContact(convertStructureDefinitionContactComponent(t)); } - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_14_30.convertType(src.getDateElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_14_30.convertType(src.getDescriptionElement())); for (org.hl7.fhir.dstu2016may.model.CodeableConcept t : src.getUseContext()) if (VersionConvertor_14_30.isJurisdiction(t)) tgt.addJurisdiction(VersionConvertor_14_30.convertCodeableConcept(t)); else @@ -153,17 +153,16 @@ public class StructureDefinition14_30 { if (src.hasCode()) { for (org.hl7.fhir.dstu2016may.model.Coding t : src.getCode()) tgt.addKeyword(VersionConvertor_14_30.convertCoding(t)); } - if (src.hasFhirVersion()) - tgt.setFhirVersion(src.getFhirVersion()); + if (src.hasFhirVersionElement()) + tgt.setFhirVersionElement((org.hl7.fhir.dstu3.model.IdType) VersionConvertor_14_30.convertType(src.getFhirVersionElement())); if (src.hasMapping()) { for (org.hl7.fhir.dstu2016may.model.StructureDefinition.StructureDefinitionMappingComponent t : src.getMapping()) tgt.addMapping(convertStructureDefinitionMappingComponent(t)); } if (src.hasKind()) { tgt.setKind(convertStructureDefinitionKind(src.getKind())); } - if (src.hasAbstract()) { - tgt.setAbstract(src.getAbstract()); - } + if (src.hasAbstractElement()) + tgt.setAbstractElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_14_30.convertType(src.getAbstractElement())); if (src.hasContextType()) { tgt.setContextType(convertExtensionContext(src.getContextType())); } @@ -171,26 +170,22 @@ public class StructureDefinition14_30 { for (org.hl7.fhir.dstu2016may.model.StringType t : src.getContext()) tgt.addContext(t.getValue()); } if (src.getDerivation() == TypeDerivationRule.CONSTRAINT) - tgt.setType(src.getBaseType()); + tgt.setTypeElement((CodeType) VersionConvertor_14_30.convertType(src.getBaseTypeElement())); else - tgt.setType(src.getId()); - if (src.hasBaseDefinition()) - tgt.setBaseDefinition(src.getBaseDefinition()); + tgt.setTypeElement((CodeType) VersionConvertor_14_30.convertType(src.getIdElement())); + if (src.hasBaseDefinitionElement()) + tgt.setBaseDefinitionElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_14_30.convertType(src.getBaseDefinitionElement())); if (src.hasDerivation()) { tgt.setDerivation(convertTypeDerivationRule(src.getDerivation())); } if (src.hasSnapshot()) { - if (src.hasSnapshot()) { - tgt.setSnapshot(convertStructureDefinitionSnapshotComponent(src.getSnapshot())); - } - tgt.getSnapshot().getElementFirstRep().getType().clear(); + tgt.setSnapshot(convertStructureDefinitionSnapshotComponent(src.getSnapshot())); } + tgt.getSnapshot().getElementFirstRep().getType().clear(); if (src.hasDifferential()) { - if (src.hasDifferential()) { - tgt.setDifferential(convertStructureDefinitionDifferentialComponent(src.getDifferential())); - } - tgt.getDifferential().getElementFirstRep().getType().clear(); + tgt.setDifferential(convertStructureDefinitionDifferentialComponent(src.getDifferential())); } + tgt.getDifferential().getElementFirstRep().getType().clear(); return tgt; } @@ -199,8 +194,8 @@ public class StructureDefinition14_30 { return null; org.hl7.fhir.dstu2016may.model.StructureDefinition.StructureDefinitionContactComponent tgt = new org.hl7.fhir.dstu2016may.model.StructureDefinition.StructureDefinitionContactComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((StringType) VersionConvertor_14_30.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu3.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_14_30.convertContactPoint(t)); } @@ -212,8 +207,8 @@ public class StructureDefinition14_30 { return null; org.hl7.fhir.dstu3.model.ContactDetail tgt = new org.hl7.fhir.dstu3.model.ContactDetail(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu2016may.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_14_30.convertContactPoint(t)); } @@ -279,15 +274,14 @@ public class StructureDefinition14_30 { return null; org.hl7.fhir.dstu3.model.StructureDefinition.StructureDefinitionMappingComponent tgt = new org.hl7.fhir.dstu3.model.StructureDefinition.StructureDefinitionMappingComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasIdentity()) { - tgt.setIdentity(src.getIdentity()); - } - if (src.hasUri()) - tgt.setUri(src.getUri()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasComments()) - tgt.setComment(src.getComments()); + if (src.hasIdentityElement()) + tgt.setIdentityElement((org.hl7.fhir.dstu3.model.IdType) VersionConvertor_14_30.convertType(src.getIdentityElement())); + if (src.hasUriElement()) + tgt.setUriElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_14_30.convertType(src.getUriElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getNameElement())); + if (src.hasCommentsElement()) + tgt.setCommentElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getCommentsElement())); return tgt; } @@ -296,15 +290,14 @@ public class StructureDefinition14_30 { return null; org.hl7.fhir.dstu2016may.model.StructureDefinition.StructureDefinitionMappingComponent tgt = new org.hl7.fhir.dstu2016may.model.StructureDefinition.StructureDefinitionMappingComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasIdentity()) { - tgt.setIdentity(src.getIdentity()); - } - if (src.hasUri()) - tgt.setUri(src.getUri()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasComment()) - tgt.setComments(src.getComment()); + if (src.hasIdentityElement()) + tgt.setIdentityElement((org.hl7.fhir.dstu2016may.model.IdType) VersionConvertor_14_30.convertType(src.getIdentityElement())); + if (src.hasUriElement()) + tgt.setUriElement((org.hl7.fhir.dstu2016may.model.UriType) VersionConvertor_14_30.convertType(src.getUriElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getNameElement())); + if (src.hasCommentElement()) + tgt.setCommentsElement((StringType) VersionConvertor_14_30.convertType(src.getCommentElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_30/TestScript14_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_30/TestScript14_30.java index f4ffd310e..f30227839 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_30/TestScript14_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_30/TestScript14_30.java @@ -1,7 +1,9 @@ package org.hl7.fhir.convertors.conv14_30; import org.hl7.fhir.convertors.VersionConvertor_14_30; +import org.hl7.fhir.dstu2016may.model.StringType; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class TestScript14_30 { @@ -186,52 +188,52 @@ public class TestScript14_30 { return null; org.hl7.fhir.dstu2016may.model.TestScript.SetupActionAssertComponent tgt = new org.hl7.fhir.dstu2016may.model.TestScript.SetupActionAssertComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasLabel()) - tgt.setLabel(src.getLabel()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasLabelElement()) + tgt.setLabelElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getLabelElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getDescriptionElement())); if (src.hasDirection()) { tgt.setDirection(convertAssertionDirectionType(src.getDirection())); } - if (src.hasCompareToSourceId()) - tgt.setCompareToSourceId(src.getCompareToSourceId()); - if (src.hasCompareToSourcePath()) - tgt.setCompareToSourcePath(src.getCompareToSourcePath()); + if (src.hasCompareToSourceIdElement()) + tgt.setCompareToSourceIdElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getCompareToSourceIdElement())); + if (src.hasCompareToSourcePathElement()) + tgt.setCompareToSourcePathElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getCompareToSourcePathElement())); if (src.hasContentType()) { tgt.setContentType(convertContentType(src.getContentType())); } - if (src.hasHeaderField()) - tgt.setHeaderField(src.getHeaderField()); - if (src.hasMinimumId()) - tgt.setMinimumId(src.getMinimumId()); - if (src.hasNavigationLinks()) - tgt.setNavigationLinks(src.getNavigationLinks()); + if (src.hasHeaderFieldElement()) + tgt.setHeaderFieldElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getHeaderFieldElement())); + if (src.hasMinimumIdElement()) + tgt.setMinimumIdElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getMinimumIdElement())); + if (src.hasNavigationLinksElement()) + tgt.setNavigationLinksElement((org.hl7.fhir.dstu2016may.model.BooleanType) VersionConvertor_14_30.convertType(src.getNavigationLinksElement())); if (src.hasOperator()) { tgt.setOperator(convertAssertionOperatorType(src.getOperator())); } - if (src.hasPath()) - tgt.setPath(src.getPath()); - if (src.hasResource()) - tgt.setResource(src.getResource()); + if (src.hasPathElement()) + tgt.setPathElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getPathElement())); + if (src.hasResourceElement()) + tgt.setResourceElement((org.hl7.fhir.dstu2016may.model.CodeType) VersionConvertor_14_30.convertType(src.getResourceElement())); if (src.hasResponse()) { tgt.setResponse(convertAssertionResponseTypes(src.getResponse())); } - if (src.hasResponseCode()) - tgt.setResponseCode(src.getResponseCode()); + if (src.hasResponseCodeElement()) + tgt.setResponseCodeElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getResponseCodeElement())); if (src.hasRule()) { tgt.setRule(convertSetupActionAssertRuleComponent(src.getRule())); } if (src.hasRuleset()) { tgt.setRuleset(convertSetupActionAssertRulesetComponent(src.getRuleset())); } - if (src.hasSourceId()) - tgt.setSourceId(src.getSourceId()); - if (src.hasValidateProfileId()) - tgt.setValidateProfileId(src.getValidateProfileId()); - if (src.hasValue()) - tgt.setValue(src.getValue()); - if (src.hasWarningOnly()) - tgt.setWarningOnly(src.getWarningOnly()); + if (src.hasSourceIdElement()) + tgt.setSourceIdElement((org.hl7.fhir.dstu2016may.model.IdType) VersionConvertor_14_30.convertType(src.getSourceIdElement())); + if (src.hasValidateProfileIdElement()) + tgt.setValidateProfileIdElement((org.hl7.fhir.dstu2016may.model.IdType) VersionConvertor_14_30.convertType(src.getValidateProfileIdElement())); + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getValueElement())); + if (src.hasWarningOnlyElement()) + tgt.setWarningOnlyElement((org.hl7.fhir.dstu2016may.model.BooleanType) VersionConvertor_14_30.convertType(src.getWarningOnlyElement())); return tgt; } @@ -240,52 +242,52 @@ public class TestScript14_30 { return null; org.hl7.fhir.dstu3.model.TestScript.SetupActionAssertComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.SetupActionAssertComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasLabel()) - tgt.setLabel(src.getLabel()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasLabelElement()) + tgt.setLabelElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getLabelElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getDescriptionElement())); if (src.hasDirection()) { tgt.setDirection(convertAssertionDirectionType(src.getDirection())); } - if (src.hasCompareToSourceId()) - tgt.setCompareToSourceId(src.getCompareToSourceId()); - if (src.hasCompareToSourcePath()) - tgt.setCompareToSourcePath(src.getCompareToSourcePath()); + if (src.hasCompareToSourceIdElement()) + tgt.setCompareToSourceIdElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getCompareToSourceIdElement())); + if (src.hasCompareToSourcePathElement()) + tgt.setCompareToSourcePathElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getCompareToSourcePathElement())); if (src.hasContentType()) { tgt.setContentType(convertContentType(src.getContentType())); } - if (src.hasHeaderField()) - tgt.setHeaderField(src.getHeaderField()); - if (src.hasMinimumId()) - tgt.setMinimumId(src.getMinimumId()); - if (src.hasNavigationLinks()) - tgt.setNavigationLinks(src.getNavigationLinks()); + if (src.hasHeaderFieldElement()) + tgt.setHeaderFieldElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getHeaderFieldElement())); + if (src.hasMinimumIdElement()) + tgt.setMinimumIdElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getMinimumIdElement())); + if (src.hasNavigationLinksElement()) + tgt.setNavigationLinksElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_14_30.convertType(src.getNavigationLinksElement())); if (src.hasOperator()) { tgt.setOperator(convertAssertionOperatorType(src.getOperator())); } - if (src.hasPath()) - tgt.setPath(src.getPath()); - if (src.hasResource()) - tgt.setResource(src.getResource()); + if (src.hasPathElement()) + tgt.setPathElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getPathElement())); + if (src.hasResourceElement()) + tgt.setResourceElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_14_30.convertType(src.getResourceElement())); if (src.hasResponse()) { tgt.setResponse(convertAssertionResponseTypes(src.getResponse())); } - if (src.hasResponseCode()) - tgt.setResponseCode(src.getResponseCode()); + if (src.hasResponseCodeElement()) + tgt.setResponseCodeElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getResponseCodeElement())); if (src.hasRule()) { tgt.setRule(convertSetupActionAssertRuleComponent(src.getRule())); } if (src.hasRuleset()) { tgt.setRuleset(convertSetupActionAssertRulesetComponent(src.getRuleset())); } - if (src.hasSourceId()) - tgt.setSourceId(src.getSourceId()); - if (src.hasValidateProfileId()) - tgt.setValidateProfileId(src.getValidateProfileId()); - if (src.hasValue()) - tgt.setValue(src.getValue()); - if (src.hasWarningOnly()) - tgt.setWarningOnly(src.getWarningOnly()); + if (src.hasSourceIdElement()) + tgt.setSourceIdElement((org.hl7.fhir.dstu3.model.IdType) VersionConvertor_14_30.convertType(src.getSourceIdElement())); + if (src.hasValidateProfileIdElement()) + tgt.setValidateProfileIdElement((org.hl7.fhir.dstu3.model.IdType) VersionConvertor_14_30.convertType(src.getValidateProfileIdElement())); + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getValueElement())); + if (src.hasWarningOnlyElement()) + tgt.setWarningOnlyElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_14_30.convertType(src.getWarningOnlyElement())); return tgt; } @@ -316,11 +318,10 @@ public class TestScript14_30 { return null; org.hl7.fhir.dstu3.model.TestScript.ActionAssertRuleParamComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.ActionAssertRuleParamComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasValue()) - tgt.setValue(src.getValue()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getNameElement())); + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getValueElement())); return tgt; } @@ -329,11 +330,10 @@ public class TestScript14_30 { return null; org.hl7.fhir.dstu2016may.model.TestScript.SetupActionAssertRuleParamComponent tgt = new org.hl7.fhir.dstu2016may.model.TestScript.SetupActionAssertRuleParamComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasValue()) - tgt.setValue(src.getValue()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getNameElement())); + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getValueElement())); return tgt; } @@ -386,11 +386,10 @@ public class TestScript14_30 { return null; org.hl7.fhir.dstu2016may.model.TestScript.SetupActionAssertRulesetRuleParamComponent tgt = new org.hl7.fhir.dstu2016may.model.TestScript.SetupActionAssertRulesetRuleParamComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasValue()) - tgt.setValue(src.getValue()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getNameElement())); + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getValueElement())); return tgt; } @@ -399,11 +398,10 @@ public class TestScript14_30 { return null; org.hl7.fhir.dstu3.model.TestScript.ActionAssertRulesetRuleParamComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.ActionAssertRulesetRuleParamComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasValue()) - tgt.setValue(src.getValue()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getNameElement())); + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getValueElement())); return tgt; } @@ -443,37 +441,37 @@ public class TestScript14_30 { if (src.hasType()) { tgt.setType(VersionConvertor_14_30.convertCoding(src.getType())); } - if (src.hasResource()) - tgt.setResource(src.getResource()); - if (src.hasLabel()) - tgt.setLabel(src.getLabel()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasResourceElement()) + tgt.setResourceElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_14_30.convertType(src.getResourceElement())); + if (src.hasLabelElement()) + tgt.setLabelElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getLabelElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getDescriptionElement())); if (src.hasAccept()) { tgt.setAccept(convertContentType(src.getAccept())); } if (src.hasContentType()) { tgt.setContentType(convertContentType(src.getContentType())); } - if (src.hasDestination()) - tgt.setDestination(src.getDestination()); - if (src.hasEncodeRequestUrl()) - tgt.setEncodeRequestUrl(src.getEncodeRequestUrl()); - if (src.hasOrigin()) - tgt.setOrigin(src.getOrigin()); - if (src.hasParams()) - tgt.setParams(src.getParams()); + if (src.hasDestinationElement()) + tgt.setDestinationElement((org.hl7.fhir.dstu3.model.IntegerType) VersionConvertor_14_30.convertType(src.getDestinationElement())); + if (src.hasEncodeRequestUrlElement()) + tgt.setEncodeRequestUrlElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_14_30.convertType(src.getEncodeRequestUrlElement())); + if (src.hasOriginElement()) + tgt.setOriginElement((org.hl7.fhir.dstu3.model.IntegerType) VersionConvertor_14_30.convertType(src.getOriginElement())); + if (src.hasParamsElement()) + tgt.setParamsElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getParamsElement())); if (src.hasRequestHeader()) { for (org.hl7.fhir.dstu2016may.model.TestScript.SetupActionOperationRequestHeaderComponent t : src.getRequestHeader()) tgt.addRequestHeader(convertSetupActionOperationRequestHeaderComponent(t)); } - if (src.hasResponseId()) - tgt.setResponseId(src.getResponseId()); - if (src.hasSourceId()) - tgt.setSourceId(src.getSourceId()); + if (src.hasResponseIdElement()) + tgt.setResponseIdElement((org.hl7.fhir.dstu3.model.IdType) VersionConvertor_14_30.convertType(src.getResponseIdElement())); + if (src.hasSourceIdElement()) + tgt.setSourceIdElement((org.hl7.fhir.dstu3.model.IdType) VersionConvertor_14_30.convertType(src.getSourceIdElement())); if (src.hasTargetId()) tgt.setTargetId(src.getTargetId()); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getUrlElement())); return tgt; } @@ -482,37 +480,37 @@ public class TestScript14_30 { return null; org.hl7.fhir.dstu2016may.model.TestScript.SetupActionOperationComponent tgt = new org.hl7.fhir.dstu2016may.model.TestScript.SetupActionOperationComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasResource()) - tgt.setResource(src.getResource()); - if (src.hasLabel()) - tgt.setLabel(src.getLabel()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasResourceElement()) + tgt.setResourceElement((org.hl7.fhir.dstu2016may.model.CodeType) VersionConvertor_14_30.convertType(src.getResourceElement())); + if (src.hasLabelElement()) + tgt.setLabelElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getLabelElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getDescriptionElement())); if (src.hasAccept()) { tgt.setAccept(convertContentType(src.getAccept())); } if (src.hasContentType()) { tgt.setContentType(convertContentType(src.getContentType())); } - if (src.hasDestination()) - tgt.setDestination(src.getDestination()); - if (src.hasEncodeRequestUrl()) - tgt.setEncodeRequestUrl(src.getEncodeRequestUrl()); - if (src.hasOrigin()) - tgt.setOrigin(src.getOrigin()); - if (src.hasParams()) - tgt.setParams(src.getParams()); + if (src.hasDestinationElement()) + tgt.setDestinationElement((org.hl7.fhir.dstu2016may.model.IntegerType) VersionConvertor_14_30.convertType(src.getDestinationElement())); + if (src.hasEncodeRequestUrlElement()) + tgt.setEncodeRequestUrlElement((org.hl7.fhir.dstu2016may.model.BooleanType) VersionConvertor_14_30.convertType(src.getEncodeRequestUrlElement())); + if (src.hasOriginElement()) + tgt.setOriginElement((org.hl7.fhir.dstu2016may.model.IntegerType) VersionConvertor_14_30.convertType(src.getOriginElement())); + if (src.hasParamsElement()) + tgt.setParamsElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getParamsElement())); if (src.hasRequestHeader()) { for (org.hl7.fhir.dstu3.model.TestScript.SetupActionOperationRequestHeaderComponent t : src.getRequestHeader()) tgt.addRequestHeader(convertSetupActionOperationRequestHeaderComponent(t)); } - if (src.hasResponseId()) - tgt.setResponseId(src.getResponseId()); - if (src.hasSourceId()) - tgt.setSourceId(src.getSourceId()); + if (src.hasResponseIdElement()) + tgt.setResponseIdElement((org.hl7.fhir.dstu2016may.model.IdType) VersionConvertor_14_30.convertType(src.getResponseIdElement())); + if (src.hasSourceIdElement()) + tgt.setSourceIdElement((org.hl7.fhir.dstu2016may.model.IdType) VersionConvertor_14_30.convertType(src.getSourceIdElement())); if (src.hasTargetId()) tgt.setTargetId(src.getTargetId()); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getUrlElement())); return tgt; } @@ -521,12 +519,10 @@ public class TestScript14_30 { return null; org.hl7.fhir.dstu3.model.TestScript.SetupActionOperationRequestHeaderComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.SetupActionOperationRequestHeaderComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasField()) { - tgt.setField(src.getField()); - } - if (src.hasValue()) { - tgt.setValue(src.getValue()); - } + if (src.hasFieldElement()) + tgt.setFieldElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getFieldElement())); + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getValueElement())); return tgt; } @@ -535,12 +531,10 @@ public class TestScript14_30 { return null; org.hl7.fhir.dstu2016may.model.TestScript.SetupActionOperationRequestHeaderComponent tgt = new org.hl7.fhir.dstu2016may.model.TestScript.SetupActionOperationRequestHeaderComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasField()) { - tgt.setField(src.getField()); - } - if (src.hasValue()) { - tgt.setValue(src.getValue()); - } + if (src.hasFieldElement()) + tgt.setFieldElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getFieldElement())); + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getValueElement())); return tgt; } @@ -599,39 +593,37 @@ public class TestScript14_30 { return null; org.hl7.fhir.dstu3.model.TestScript tgt = new org.hl7.fhir.dstu3.model.TestScript(); VersionConvertor_14_30.copyDomainResource(src, tgt); - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_14_30.convertType(src.getUrlElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_14_30.convertConformanceResourceStatus(src.getStatus())); } if (src.hasIdentifier()) { tgt.setIdentifier(VersionConvertor_14_30.convertIdentifier(src.getIdentifier())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_14_30.convertType(src.getExperimentalElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu2016may.model.TestScript.TestScriptContactComponent t : src.getContact()) tgt.addContact(convertTestScriptContactComponent(t)); } - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_14_30.convertType(src.getDateElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_14_30.convertType(src.getDescriptionElement())); for (org.hl7.fhir.dstu2016may.model.CodeableConcept t : src.getUseContext()) if (VersionConvertor_14_30.isJurisdiction(t)) tgt.addJurisdiction(VersionConvertor_14_30.convertCodeableConcept(t)); else tgt.addUseContext(VersionConvertor_14_30.convertCodeableConceptToUsageContext(t)); if (src.hasRequirements()) tgt.setPurpose(src.getRequirements()); - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_14_30.convertType(src.getCopyrightElement())); if (src.hasOrigin()) { for (org.hl7.fhir.dstu2016may.model.TestScript.TestScriptOriginComponent t : src.getOrigin()) tgt.addOrigin(convertTestScriptOriginComponent(t)); } @@ -673,31 +665,29 @@ public class TestScript14_30 { return null; org.hl7.fhir.dstu2016may.model.TestScript tgt = new org.hl7.fhir.dstu2016may.model.TestScript(); VersionConvertor_14_30.copyDomainResource(src, tgt); - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu2016may.model.UriType) VersionConvertor_14_30.convertType(src.getUrlElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_14_30.convertConformanceResourceStatus(src.getStatus())); } if (src.hasIdentifier()) { tgt.setIdentifier(VersionConvertor_14_30.convertIdentifier(src.getIdentifier())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu2016may.model.BooleanType) VersionConvertor_14_30.convertType(src.getExperimentalElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) tgt.addContact(convertTestScriptContactComponent(t)); } - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu2016may.model.DateTimeType) VersionConvertor_14_30.convertType(src.getDateElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getDescriptionElement())); for (org.hl7.fhir.dstu3.model.UsageContext t : src.getUseContext()) if (t.hasValueCodeableConcept()) tgt.addUseContext(VersionConvertor_14_30.convertCodeableConcept(t.getValueCodeableConcept())); if (src.hasJurisdiction()) { @@ -705,8 +695,8 @@ public class TestScript14_30 { } if (src.hasPurpose()) tgt.setRequirements(src.getPurpose()); - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getCopyrightElement())); if (src.hasOrigin()) { for (org.hl7.fhir.dstu3.model.TestScript.TestScriptOriginComponent t : src.getOrigin()) tgt.addOrigin(convertTestScriptOriginComponent(t)); } @@ -748,8 +738,8 @@ public class TestScript14_30 { return null; org.hl7.fhir.dstu2016may.model.TestScript.TestScriptContactComponent tgt = new org.hl7.fhir.dstu2016may.model.TestScript.TestScriptContactComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((StringType) VersionConvertor_14_30.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu3.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_14_30.convertContactPoint(t)); } @@ -761,8 +751,8 @@ public class TestScript14_30 { return null; org.hl7.fhir.dstu3.model.ContactDetail tgt = new org.hl7.fhir.dstu3.model.ContactDetail(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu2016may.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_14_30.convertContactPoint(t)); } @@ -774,9 +764,8 @@ public class TestScript14_30 { return null; org.hl7.fhir.dstu2016may.model.TestScript.TestScriptDestinationComponent tgt = new org.hl7.fhir.dstu2016may.model.TestScript.TestScriptDestinationComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasIndex()) { - tgt.setIndex(src.getIndex()); - } + if (src.hasIndexElement()) + tgt.setIndexElement((org.hl7.fhir.dstu2016may.model.IntegerType) VersionConvertor_14_30.convertType(src.getIndexElement())); if (src.hasProfile()) { tgt.setProfile(VersionConvertor_14_30.convertCoding(src.getProfile())); } @@ -788,9 +777,8 @@ public class TestScript14_30 { return null; org.hl7.fhir.dstu3.model.TestScript.TestScriptDestinationComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.TestScriptDestinationComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasIndex()) { - tgt.setIndex(src.getIndex()); - } + if (src.hasIndexElement()) + tgt.setIndexElement((org.hl7.fhir.dstu3.model.IntegerType) VersionConvertor_14_30.convertType(src.getIndexElement())); if (src.hasProfile()) { tgt.setProfile(VersionConvertor_14_30.convertCoding(src.getProfile())); } @@ -802,10 +790,10 @@ public class TestScript14_30 { return null; org.hl7.fhir.dstu3.model.TestScript.TestScriptFixtureComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.TestScriptFixtureComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasAutocreate()) - tgt.setAutocreate(src.getAutocreate()); - if (src.hasAutodelete()) - tgt.setAutodelete(src.getAutodelete()); + if (src.hasAutocreateElement()) + tgt.setAutocreateElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_14_30.convertType(src.getAutocreateElement())); + if (src.hasAutodeleteElement()) + tgt.setAutodeleteElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_14_30.convertType(src.getAutodeleteElement())); if (src.hasResource()) tgt.setResource(VersionConvertor_14_30.convertReference(src.getResource())); return tgt; @@ -816,10 +804,10 @@ public class TestScript14_30 { return null; org.hl7.fhir.dstu2016may.model.TestScript.TestScriptFixtureComponent tgt = new org.hl7.fhir.dstu2016may.model.TestScript.TestScriptFixtureComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasAutocreate()) - tgt.setAutocreate(src.getAutocreate()); - if (src.hasAutodelete()) - tgt.setAutodelete(src.getAutodelete()); + if (src.hasAutocreateElement()) + tgt.setAutocreateElement((org.hl7.fhir.dstu2016may.model.BooleanType) VersionConvertor_14_30.convertType(src.getAutocreateElement())); + if (src.hasAutodeleteElement()) + tgt.setAutodeleteElement((org.hl7.fhir.dstu2016may.model.BooleanType) VersionConvertor_14_30.convertType(src.getAutodeleteElement())); if (src.hasResource()) tgt.setResource(VersionConvertor_14_30.convertReference(src.getResource())); return tgt; @@ -830,17 +818,17 @@ public class TestScript14_30 { return null; org.hl7.fhir.dstu3.model.TestScript.TestScriptMetadataCapabilityComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.TestScriptMetadataCapabilityComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasRequired()) - tgt.setRequired(src.getRequired()); - if (src.hasValidated()) - tgt.setValidated(src.getValidated()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasRequiredElement()) + tgt.setRequiredElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_14_30.convertType(src.getRequiredElement())); + if (src.hasValidatedElement()) + tgt.setValidatedElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_14_30.convertType(src.getValidatedElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getDescriptionElement())); if (src.hasOrigin()) { for (org.hl7.fhir.dstu2016may.model.IntegerType t : src.getOrigin()) tgt.addOrigin(t.getValue()); } - if (src.hasDestination()) - tgt.setDestination(src.getDestination()); + if (src.hasDestinationElement()) + tgt.setDestinationElement((org.hl7.fhir.dstu3.model.IntegerType) VersionConvertor_14_30.convertType(src.getDestinationElement())); if (src.hasLink()) { for (org.hl7.fhir.dstu2016may.model.UriType t : src.getLink()) tgt.addLink(t.getValue()); } @@ -855,17 +843,17 @@ public class TestScript14_30 { return null; org.hl7.fhir.dstu2016may.model.TestScript.TestScriptMetadataCapabilityComponent tgt = new org.hl7.fhir.dstu2016may.model.TestScript.TestScriptMetadataCapabilityComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasRequired()) - tgt.setRequired(src.getRequired()); - if (src.hasValidated()) - tgt.setValidated(src.getValidated()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasRequiredElement()) + tgt.setRequiredElement((org.hl7.fhir.dstu2016may.model.BooleanType) VersionConvertor_14_30.convertType(src.getRequiredElement())); + if (src.hasValidatedElement()) + tgt.setValidatedElement((org.hl7.fhir.dstu2016may.model.BooleanType) VersionConvertor_14_30.convertType(src.getValidatedElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getDescriptionElement())); if (src.hasOrigin()) { for (org.hl7.fhir.dstu3.model.IntegerType t : src.getOrigin()) tgt.addOrigin(t.getValue()); } - if (src.hasDestination()) - tgt.setDestination(src.getDestination()); + if (src.hasDestinationElement()) + tgt.setDestinationElement((org.hl7.fhir.dstu2016may.model.IntegerType) VersionConvertor_14_30.convertType(src.getDestinationElement())); if (src.hasLink()) { for (org.hl7.fhir.dstu3.model.UriType t : src.getLink()) tgt.addLink(t.getValue()); } @@ -908,11 +896,10 @@ public class TestScript14_30 { return null; org.hl7.fhir.dstu3.model.TestScript.TestScriptMetadataLinkComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.TestScriptMetadataLinkComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_14_30.convertType(src.getUrlElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getDescriptionElement())); return tgt; } @@ -921,11 +908,10 @@ public class TestScript14_30 { return null; org.hl7.fhir.dstu2016may.model.TestScript.TestScriptMetadataLinkComponent tgt = new org.hl7.fhir.dstu2016may.model.TestScript.TestScriptMetadataLinkComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu2016may.model.UriType) VersionConvertor_14_30.convertType(src.getUrlElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getDescriptionElement())); return tgt; } @@ -934,9 +920,8 @@ public class TestScript14_30 { return null; org.hl7.fhir.dstu2016may.model.TestScript.TestScriptOriginComponent tgt = new org.hl7.fhir.dstu2016may.model.TestScript.TestScriptOriginComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasIndex()) { - tgt.setIndex(src.getIndex()); - } + if (src.hasIndexElement()) + tgt.setIndexElement((org.hl7.fhir.dstu2016may.model.IntegerType) VersionConvertor_14_30.convertType(src.getIndexElement())); if (src.hasProfile()) { tgt.setProfile(VersionConvertor_14_30.convertCoding(src.getProfile())); } @@ -948,9 +933,8 @@ public class TestScript14_30 { return null; org.hl7.fhir.dstu3.model.TestScript.TestScriptOriginComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.TestScriptOriginComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasIndex()) { - tgt.setIndex(src.getIndex()); - } + if (src.hasIndexElement()) + tgt.setIndexElement((org.hl7.fhir.dstu3.model.IntegerType) VersionConvertor_14_30.convertType(src.getIndexElement())); if (src.hasProfile()) { tgt.setProfile(VersionConvertor_14_30.convertCoding(src.getProfile())); } @@ -990,11 +974,10 @@ public class TestScript14_30 { return null; org.hl7.fhir.dstu3.model.TestScript.RuleParamComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.RuleParamComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasValue()) - tgt.setValue(src.getValue()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getNameElement())); + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getValueElement())); return tgt; } @@ -1003,11 +986,10 @@ public class TestScript14_30 { return null; org.hl7.fhir.dstu2016may.model.TestScript.TestScriptRuleParamComponent tgt = new org.hl7.fhir.dstu2016may.model.TestScript.TestScriptRuleParamComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasValue()) - tgt.setValue(src.getValue()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getNameElement())); + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getValueElement())); return tgt; } @@ -1066,11 +1048,10 @@ public class TestScript14_30 { return null; org.hl7.fhir.dstu2016may.model.TestScript.TestScriptRulesetRuleParamComponent tgt = new org.hl7.fhir.dstu2016may.model.TestScript.TestScriptRulesetRuleParamComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasValue()) - tgt.setValue(src.getValue()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getNameElement())); + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getValueElement())); return tgt; } @@ -1079,11 +1060,10 @@ public class TestScript14_30 { return null; org.hl7.fhir.dstu3.model.TestScript.RulesetRuleParamComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.RulesetRuleParamComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasValue()) - tgt.setValue(src.getValue()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getNameElement())); + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getValueElement())); return tgt; } @@ -1136,10 +1116,10 @@ public class TestScript14_30 { return null; org.hl7.fhir.dstu2016may.model.TestScript.TestScriptTestComponent tgt = new org.hl7.fhir.dstu2016may.model.TestScript.TestScriptTestComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getNameElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getDescriptionElement())); if (src.hasAction()) { for (org.hl7.fhir.dstu3.model.TestScript.TestActionComponent t : src.getAction()) tgt.addAction(convertTestActionComponent(t)); } @@ -1151,10 +1131,10 @@ public class TestScript14_30 { return null; org.hl7.fhir.dstu3.model.TestScript.TestScriptTestComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.TestScriptTestComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getNameElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getDescriptionElement())); if (src.hasAction()) { for (org.hl7.fhir.dstu2016may.model.TestScript.TestActionComponent t : src.getAction()) tgt.addAction(convertTestActionComponent(t)); } @@ -1166,17 +1146,16 @@ public class TestScript14_30 { return null; org.hl7.fhir.dstu2016may.model.TestScript.TestScriptVariableComponent tgt = new org.hl7.fhir.dstu2016may.model.TestScript.TestScriptVariableComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasDefaultValue()) - tgt.setDefaultValue(src.getDefaultValue()); - if (src.hasHeaderField()) - tgt.setHeaderField(src.getHeaderField()); - if (src.hasPath()) - tgt.setPath(src.getPath()); - if (src.hasSourceId()) - tgt.setSourceId(src.getSourceId()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getNameElement())); + if (src.hasDefaultValueElement()) + tgt.setDefaultValueElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getDefaultValueElement())); + if (src.hasHeaderFieldElement()) + tgt.setHeaderFieldElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getHeaderFieldElement())); + if (src.hasPathElement()) + tgt.setPathElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getPathElement())); + if (src.hasSourceIdElement()) + tgt.setSourceIdElement((org.hl7.fhir.dstu2016may.model.IdType) VersionConvertor_14_30.convertType(src.getSourceIdElement())); return tgt; } @@ -1185,17 +1164,16 @@ public class TestScript14_30 { return null; org.hl7.fhir.dstu3.model.TestScript.TestScriptVariableComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.TestScriptVariableComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasDefaultValue()) - tgt.setDefaultValue(src.getDefaultValue()); - if (src.hasHeaderField()) - tgt.setHeaderField(src.getHeaderField()); - if (src.hasPath()) - tgt.setPath(src.getPath()); - if (src.hasSourceId()) - tgt.setSourceId(src.getSourceId()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getNameElement())); + if (src.hasDefaultValueElement()) + tgt.setDefaultValueElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getDefaultValueElement())); + if (src.hasHeaderFieldElement()) + tgt.setHeaderFieldElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getHeaderFieldElement())); + if (src.hasPathElement()) + tgt.setPathElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getPathElement())); + if (src.hasSourceIdElement()) + tgt.setSourceIdElement((org.hl7.fhir.dstu3.model.IdType) VersionConvertor_14_30.convertType(src.getSourceIdElement())); return tgt; } } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_30/ValueSet14_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_30/ValueSet14_30.java index 75ac5fdbe..5f56ae4c5 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_30/ValueSet14_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_30/ValueSet14_30.java @@ -1,7 +1,9 @@ package org.hl7.fhir.convertors.conv14_30; import org.hl7.fhir.convertors.VersionConvertor_14_30; +import org.hl7.fhir.dstu3.model.DateType; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class ValueSet14_30 { @@ -10,11 +12,10 @@ public class ValueSet14_30 { return null; org.hl7.fhir.dstu2016may.model.ValueSet.ConceptReferenceComponent tgt = new org.hl7.fhir.dstu2016may.model.ValueSet.ConceptReferenceComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasCode()) { - tgt.setCode(src.getCode()); - } - if (src.hasDisplay()) - tgt.setDisplay(src.getDisplay()); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu2016may.model.CodeType) VersionConvertor_14_30.convertType(src.getCodeElement())); + if (src.hasDisplayElement()) + tgt.setDisplayElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getDisplayElement())); if (src.hasDesignation()) { for (org.hl7.fhir.dstu3.model.ValueSet.ConceptReferenceDesignationComponent t : src.getDesignation()) tgt.addDesignation(convertConceptReferenceDesignationComponent(t)); } @@ -26,11 +27,10 @@ public class ValueSet14_30 { return null; org.hl7.fhir.dstu3.model.ValueSet.ConceptReferenceComponent tgt = new org.hl7.fhir.dstu3.model.ValueSet.ConceptReferenceComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasCode()) { - tgt.setCode(src.getCode()); - } - if (src.hasDisplay()) - tgt.setDisplay(src.getDisplay()); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_14_30.convertType(src.getCodeElement())); + if (src.hasDisplayElement()) + tgt.setDisplayElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getDisplayElement())); if (src.hasDesignation()) { for (org.hl7.fhir.dstu2016may.model.ValueSet.ConceptReferenceDesignationComponent t : src.getDesignation()) tgt.addDesignation(convertConceptReferenceDesignationComponent(t)); } @@ -42,14 +42,13 @@ public class ValueSet14_30 { return null; org.hl7.fhir.dstu3.model.ValueSet.ConceptReferenceDesignationComponent tgt = new org.hl7.fhir.dstu3.model.ValueSet.ConceptReferenceDesignationComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasLanguage()) - tgt.setLanguage(src.getLanguage()); + if (src.hasLanguageElement()) + tgt.setLanguageElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_14_30.convertType(src.getLanguageElement())); if (src.hasUse()) { tgt.setUse(VersionConvertor_14_30.convertCoding(src.getUse())); } - if (src.hasValue()) { - tgt.setValue(src.getValue()); - } + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getValueElement())); return tgt; } @@ -58,14 +57,13 @@ public class ValueSet14_30 { return null; org.hl7.fhir.dstu2016may.model.ValueSet.ConceptReferenceDesignationComponent tgt = new org.hl7.fhir.dstu2016may.model.ValueSet.ConceptReferenceDesignationComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasLanguage()) - tgt.setLanguage(src.getLanguage()); + if (src.hasLanguageElement()) + tgt.setLanguageElement((org.hl7.fhir.dstu2016may.model.CodeType) VersionConvertor_14_30.convertType(src.getLanguageElement())); if (src.hasUse()) { tgt.setUse(VersionConvertor_14_30.convertCoding(src.getUse())); } - if (src.hasValue()) { - tgt.setValue(src.getValue()); - } + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getValueElement())); return tgt; } @@ -74,11 +72,10 @@ public class ValueSet14_30 { return null; org.hl7.fhir.dstu3.model.ValueSet.ConceptSetComponent tgt = new org.hl7.fhir.dstu3.model.ValueSet.ConceptSetComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasSystem()) { - tgt.setSystem(src.getSystem()); - } - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); + if (src.hasSystemElement()) + tgt.setSystemElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_14_30.convertType(src.getSystemElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getVersionElement())); if (src.hasConcept()) { for (org.hl7.fhir.dstu2016may.model.ValueSet.ConceptReferenceComponent t : src.getConcept()) tgt.addConcept(convertConceptReferenceComponent(t)); } @@ -93,11 +90,10 @@ public class ValueSet14_30 { return null; org.hl7.fhir.dstu2016may.model.ValueSet.ConceptSetComponent tgt = new org.hl7.fhir.dstu2016may.model.ValueSet.ConceptSetComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasSystem()) { - tgt.setSystem(src.getSystem()); - } - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); + if (src.hasSystemElement()) + tgt.setSystemElement((org.hl7.fhir.dstu2016may.model.UriType) VersionConvertor_14_30.convertType(src.getSystemElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getVersionElement())); if (src.hasConcept()) { for (org.hl7.fhir.dstu3.model.ValueSet.ConceptReferenceComponent t : src.getConcept()) tgt.addConcept(convertConceptReferenceComponent(t)); } @@ -112,15 +108,13 @@ public class ValueSet14_30 { return null; org.hl7.fhir.dstu3.model.ValueSet.ConceptSetFilterComponent tgt = new org.hl7.fhir.dstu3.model.ValueSet.ConceptSetFilterComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasProperty()) { - tgt.setProperty(src.getProperty()); - } + if (src.hasPropertyElement()) + tgt.setPropertyElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_14_30.convertType(src.getPropertyElement())); if (src.hasOp()) { tgt.setOp(convertFilterOperator(src.getOp())); } - if (src.hasValue()) { - tgt.setValue(src.getValue()); - } + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_14_30.convertType(src.getValueElement())); return tgt; } @@ -129,15 +123,13 @@ public class ValueSet14_30 { return null; org.hl7.fhir.dstu2016may.model.ValueSet.ConceptSetFilterComponent tgt = new org.hl7.fhir.dstu2016may.model.ValueSet.ConceptSetFilterComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasProperty()) { - tgt.setProperty(src.getProperty()); - } + if (src.hasPropertyElement()) + tgt.setPropertyElement((org.hl7.fhir.dstu2016may.model.CodeType) VersionConvertor_14_30.convertType(src.getPropertyElement())); if (src.hasOp()) { tgt.setOp(convertFilterOperator(src.getOp())); } - if (src.hasValue()) { - tgt.setValue(src.getValue()); - } + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.dstu2016may.model.CodeType) VersionConvertor_14_30.convertType(src.getValueElement())); return tgt; } @@ -188,44 +180,44 @@ public class ValueSet14_30 { return null; org.hl7.fhir.dstu2016may.model.ValueSet tgt = new org.hl7.fhir.dstu2016may.model.ValueSet(); VersionConvertor_14_30.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu2016may.model.UriType) VersionConvertor_14_30.convertType(src.getUrlElement())); if (src.hasIdentifier()) { for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.setIdentifier(VersionConvertor_14_30.convertIdentifier(t)); } - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_14_30.convertConformanceResourceStatus(src.getStatus())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu2016may.model.BooleanType) VersionConvertor_14_30.convertType(src.getExperimentalElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) tgt.addContact(convertValueSetContactComponent(t)); } - if (src.hasDate()) - tgt.setDate(src.getDate()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu2016may.model.DateTimeType) VersionConvertor_14_30.convertType(src.getDateElement())); if (src.getCompose().hasLockedDate()) tgt.setLockedDate(src.getCompose().getLockedDate()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getDescriptionElement())); for (org.hl7.fhir.dstu3.model.UsageContext t : src.getUseContext()) if (t.hasValueCodeableConcept()) tgt.addUseContext(VersionConvertor_14_30.convertCodeableConcept(t.getValueCodeableConcept())); if (src.hasJurisdiction()) { for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getJurisdiction()) tgt.addUseContext(VersionConvertor_14_30.convertCodeableConcept(t)); } - if (src.hasImmutable()) - tgt.setImmutable(src.getImmutable()); + if (src.hasImmutableElement()) + tgt.setImmutableElement((org.hl7.fhir.dstu2016may.model.BooleanType) VersionConvertor_14_30.convertType(src.getImmutableElement())); if (src.hasPurpose()) tgt.setRequirements(src.getPurpose()); - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); - if (src.hasExtensible()) - tgt.setExtensible(src.getExtensible()); + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getCopyrightElement())); + if (src.hasExtensibleElement()) + tgt.setExtensibleElement((org.hl7.fhir.dstu2016may.model.BooleanType) VersionConvertor_14_30.convertType(src.getExtensibleElement())); if (src.hasCompose()) { tgt.setCompose(convertValueSetComposeComponent(src.getCompose())); } @@ -239,45 +231,45 @@ public class ValueSet14_30 { return null; org.hl7.fhir.dstu3.model.ValueSet tgt = new org.hl7.fhir.dstu3.model.ValueSet(); VersionConvertor_14_30.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_14_30.convertType(src.getUrlElement())); if (src.hasIdentifier()) tgt.addIdentifier(VersionConvertor_14_30.convertIdentifier(src.getIdentifier())); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_14_30.convertConformanceResourceStatus(src.getStatus())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_14_30.convertType(src.getExperimentalElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu2016may.model.ValueSet.ValueSetContactComponent t : src.getContact()) tgt.addContact(convertValueSetContactComponent(t)); } - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_14_30.convertType(src.getDateElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_14_30.convertType(src.getDescriptionElement())); for (org.hl7.fhir.dstu2016may.model.CodeableConcept t : src.getUseContext()) if (VersionConvertor_14_30.isJurisdiction(t)) tgt.addJurisdiction(VersionConvertor_14_30.convertCodeableConcept(t)); else tgt.addUseContext(VersionConvertor_14_30.convertCodeableConceptToUsageContext(t)); - if (src.hasImmutable()) - tgt.setImmutable(src.getImmutable()); + if (src.hasImmutableElement()) + tgt.setImmutableElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_14_30.convertType(src.getImmutableElement())); if (src.hasRequirements()) tgt.setPurpose(src.getRequirements()); - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); - if (src.hasExtensible()) - tgt.setExtensible(src.getExtensible()); + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_14_30.convertType(src.getCopyrightElement())); + if (src.hasExtensibleElement()) + tgt.setExtensibleElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_14_30.convertType(src.getExtensibleElement())); if (src.hasCompose()) { tgt.setCompose(convertValueSetComposeComponent(src.getCompose())); } - if (src.hasLockedDate()) - tgt.getCompose().setLockedDate(src.getLockedDate()); + if (src.hasLockedDateElement()) + tgt.getCompose().setLockedDateElement((DateType) VersionConvertor_14_30.convertType(src.getLockedDateElement())); if (src.hasExpansion()) { tgt.setExpansion(convertValueSetExpansionComponent(src.getExpansion())); } @@ -321,8 +313,8 @@ public class ValueSet14_30 { return null; org.hl7.fhir.dstu3.model.ContactDetail tgt = new org.hl7.fhir.dstu3.model.ContactDetail(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu2016may.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_14_30.convertContactPoint(t)); } @@ -334,8 +326,8 @@ public class ValueSet14_30 { return null; org.hl7.fhir.dstu2016may.model.ValueSet.ValueSetContactComponent tgt = new org.hl7.fhir.dstu2016may.model.ValueSet.ValueSetContactComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu3.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_14_30.convertContactPoint(t)); } @@ -347,16 +339,14 @@ public class ValueSet14_30 { return null; org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionComponent tgt = new org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasIdentifier()) { - tgt.setIdentifier(src.getIdentifier()); - } - if (src.hasTimestamp()) { - tgt.setTimestamp(src.getTimestamp()); - } - if (src.hasTotal()) - tgt.setTotal(src.getTotal()); - if (src.hasOffset()) - tgt.setOffset(src.getOffset()); + if (src.hasIdentifierElement()) + tgt.setIdentifierElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_14_30.convertType(src.getIdentifierElement())); + if (src.hasTimestampElement()) + tgt.setTimestampElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_14_30.convertType(src.getTimestampElement())); + if (src.hasTotalElement()) + tgt.setTotalElement((org.hl7.fhir.dstu3.model.IntegerType) VersionConvertor_14_30.convertType(src.getTotalElement())); + if (src.hasOffsetElement()) + tgt.setOffsetElement((org.hl7.fhir.dstu3.model.IntegerType) VersionConvertor_14_30.convertType(src.getOffsetElement())); if (src.hasParameter()) { for (org.hl7.fhir.dstu2016may.model.ValueSet.ValueSetExpansionParameterComponent t : src.getParameter()) tgt.addParameter(convertValueSetExpansionParameterComponent(t)); } @@ -371,16 +361,14 @@ public class ValueSet14_30 { return null; org.hl7.fhir.dstu2016may.model.ValueSet.ValueSetExpansionComponent tgt = new org.hl7.fhir.dstu2016may.model.ValueSet.ValueSetExpansionComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasIdentifier()) { - tgt.setIdentifier(src.getIdentifier()); - } - if (src.hasTimestamp()) { - tgt.setTimestamp(src.getTimestamp()); - } - if (src.hasTotal()) - tgt.setTotal(src.getTotal()); - if (src.hasOffset()) - tgt.setOffset(src.getOffset()); + if (src.hasIdentifierElement()) + tgt.setIdentifierElement((org.hl7.fhir.dstu2016may.model.UriType) VersionConvertor_14_30.convertType(src.getIdentifierElement())); + if (src.hasTimestampElement()) + tgt.setTimestampElement((org.hl7.fhir.dstu2016may.model.DateTimeType) VersionConvertor_14_30.convertType(src.getTimestampElement())); + if (src.hasTotalElement()) + tgt.setTotalElement((org.hl7.fhir.dstu2016may.model.IntegerType) VersionConvertor_14_30.convertType(src.getTotalElement())); + if (src.hasOffsetElement()) + tgt.setOffsetElement((org.hl7.fhir.dstu2016may.model.IntegerType) VersionConvertor_14_30.convertType(src.getOffsetElement())); if (src.hasParameter()) { for (org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionParameterComponent t : src.getParameter()) tgt.addParameter(convertValueSetExpansionParameterComponent(t)); } @@ -395,16 +383,16 @@ public class ValueSet14_30 { return null; org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionContainsComponent tgt = new org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionContainsComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasSystem()) - tgt.setSystem(src.getSystem()); - if (src.hasAbstract()) - tgt.setAbstract(src.getAbstract()); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasCode()) - tgt.setCode(src.getCode()); - if (src.hasDisplay()) - tgt.setDisplay(src.getDisplay()); + if (src.hasSystemElement()) + tgt.setSystemElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_14_30.convertType(src.getSystemElement())); + if (src.hasAbstractElement()) + tgt.setAbstractElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_14_30.convertType(src.getAbstractElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getVersionElement())); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_14_30.convertType(src.getCodeElement())); + if (src.hasDisplayElement()) + tgt.setDisplayElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getDisplayElement())); if (src.hasContains()) { for (org.hl7.fhir.dstu2016may.model.ValueSet.ValueSetExpansionContainsComponent t : src.getContains()) tgt.addContains(convertValueSetExpansionContainsComponent(t)); } @@ -416,16 +404,16 @@ public class ValueSet14_30 { return null; org.hl7.fhir.dstu2016may.model.ValueSet.ValueSetExpansionContainsComponent tgt = new org.hl7.fhir.dstu2016may.model.ValueSet.ValueSetExpansionContainsComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasSystem()) - tgt.setSystem(src.getSystem()); - if (src.hasAbstract()) - tgt.setAbstract(src.getAbstract()); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasCode()) - tgt.setCode(src.getCode()); - if (src.hasDisplay()) - tgt.setDisplay(src.getDisplay()); + if (src.hasSystemElement()) + tgt.setSystemElement((org.hl7.fhir.dstu2016may.model.UriType) VersionConvertor_14_30.convertType(src.getSystemElement())); + if (src.hasAbstractElement()) + tgt.setAbstractElement((org.hl7.fhir.dstu2016may.model.BooleanType) VersionConvertor_14_30.convertType(src.getAbstractElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getVersionElement())); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu2016may.model.CodeType) VersionConvertor_14_30.convertType(src.getCodeElement())); + if (src.hasDisplayElement()) + tgt.setDisplayElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getDisplayElement())); if (src.hasContains()) { for (org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionContainsComponent t : src.getContains()) tgt.addContains(convertValueSetExpansionContainsComponent(t)); } @@ -437,9 +425,8 @@ public class ValueSet14_30 { return null; org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionParameterComponent tgt = new org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionParameterComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_14_30.convertType(src.getNameElement())); if (src.hasValue()) { tgt.setValue(VersionConvertor_14_30.convertType(src.getValue())); } @@ -451,9 +438,8 @@ public class ValueSet14_30 { return null; org.hl7.fhir.dstu2016may.model.ValueSet.ValueSetExpansionParameterComponent tgt = new org.hl7.fhir.dstu2016may.model.ValueSet.ValueSetExpansionParameterComponent(); VersionConvertor_14_30.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_30.convertType(src.getNameElement())); if (src.hasValue()) { tgt.setValue(VersionConvertor_14_30.convertType(src.getValue())); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/parser/Parser.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/parser/Parser.java index 0a325bc5a..155ed6c06 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/parser/Parser.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/parser/Parser.java @@ -92,7 +92,7 @@ public class Parser { // VERSION_FILES.forEach(version -> { - String version = "10_50"; + String version = "14_30"; List filenames = listAllJavaFilesInDirectory(new File("").getAbsolutePath() + "/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv" + version + "/"); System.out.println("Checking the following files:"); Collections.sort(filenames); @@ -107,7 +107,7 @@ public class Parser { // }); // try { -// modifyElementNotField("/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/", "DataElement10_40", ".java", listOfPrimitiveTypes, "10_40"); +// modifyElementNotField("/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_30/", "DataElement14_30", ".java", listOfPrimitiveTypes, "14_30"); // modifyElementNotField("/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/", "AuditEvent10_30", ".java", listOfPrimitiveTypes, "10_30"); // modifyElementNotField("/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/", "Binary10_30", ".java", listOfPrimitiveTypes, "10_30"); // modifyElementNotField("/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/", "Bundle10_30", ".java", listOfPrimitiveTypes, "10_30"); @@ -1700,10 +1700,10 @@ public class Parser { String projectDirectory = new File("").getAbsolutePath(); String placeholder = null; - if (importStatement.contains("dstu2")) { - placeholder = "dstu2"; - } else if (importStatement.contains("dstu2016may")) { + if (importStatement.contains("dstu2016may")) { placeholder = "dstu2016may"; + } else if (importStatement.contains("dstu2")) { + placeholder = "dstu2"; } else if (importStatement.contains("dstu3")) { placeholder = "dstu3"; } else if (importStatement.contains("r4")) { From 70252e8be45769b3d37843e3d864394227c326d7 Mon Sep 17 00:00:00 2001 From: markiantorno Date: Fri, 7 Feb 2020 12:28:43 -0500 Subject: [PATCH 08/12] convo14_40 updated --- .../convertors/conv10_30/ConceptMap10_30.java | 8 +- .../conv10_30/DataElement10_30.java | 4 +- .../conv10_30/ImplementationGuide10_30.java | 8 +- .../conv10_30/NamingSystem10_30.java | 4 +- .../conv10_30/OperationDefinition10_30.java | 8 +- .../conv10_30/SearchParameter10_30.java | 8 +- .../conv10_30/StructureDefinition10_30.java | 12 +- .../convertors/conv10_30/TestScript10_30.java | 8 +- .../convertors/conv10_30/ValueSet10_30.java | 20 +- .../convertors/conv14_40/Bundle14_40.java | 121 +++++---- .../convertors/conv14_40/CodeSystem14_40.java | 213 ++++++++-------- .../conv14_40/CompartmentDefinition14_40.java | 87 +++---- .../convertors/conv14_40/ConceptMap14_40.java | 127 +++++----- .../conv14_40/Conformance14_40.java | 168 ++++++------ .../conv14_40/DataElement14_40.java | 50 ++-- .../conv14_40/ImplementationGuide14_40.java | 136 +++++----- .../conv14_40/NamingSystem14_40.java | 76 +++--- .../conv14_40/OperationDefinition14_40.java | 144 +++++------ .../conv14_40/OperationOutcome14_40.java | 9 +- .../convertors/conv14_40/Parameters14_40.java | 11 +- .../conv14_40/Questionnaire14_40.java | 107 ++++---- .../conv14_40/QuestionnaireResponse14_40.java | 25 +- .../conv14_40/SearchParameter14_40.java | 94 ++++--- .../conv14_40/StructureDefinition14_40.java | 128 +++++----- .../conv14_40/StructureMap14_40.java | 239 +++++++++--------- .../convertors/conv14_40/ValueSet14_40.java | 239 +++++++++--------- .../hl7/fhir/convertors/parser/Parser.java | 2 +- 27 files changed, 993 insertions(+), 1063 deletions(-) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/ConceptMap10_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/ConceptMap10_30.java index 671ef0114..9a8686627 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/ConceptMap10_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/ConceptMap10_30.java @@ -90,8 +90,8 @@ public class ConceptMap10_30 { } if (src.hasDateElement()) tgt.setDateElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_10_30.convertType(src.getDateElement())); - if (src.hasDescriptionElement()) - tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_10_30.convertType(src.getDescriptionElement())); + if (src.hasDescription()) + tgt.setDescription(src.getDescription()); for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getUseContext()) if (VersionConvertor_10_30.isJurisdiction(t)) tgt.addJurisdiction(VersionConvertor_10_30.convertCodeableConcept(t)); else @@ -99,8 +99,8 @@ public class ConceptMap10_30 { if (src.hasRequirements()) { tgt.setPurpose(src.getRequirements()); } - if (src.hasCopyrightElement()) - tgt.setCopyrightElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_10_30.convertType(src.getCopyrightElement())); + if (src.hasCopyright()) + tgt.setCopyright(src.getCopyright()); if (src.hasSource()) { tgt.setSource(VersionConvertor_10_30.convertType(src.getSource())); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/DataElement10_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/DataElement10_30.java index 4475001e1..d9b9b5e1e 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/DataElement10_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/DataElement10_30.java @@ -85,8 +85,8 @@ public class DataElement10_30 { tgt.addJurisdiction(VersionConvertor_10_30.convertCodeableConcept(t)); else tgt.addUseContext(VersionConvertor_10_30.convertCodeableConceptToUsageContext(t)); - if (src.hasCopyrightElement()) - tgt.setCopyrightElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_10_30.convertType(src.getCopyrightElement())); + if (src.hasCopyright()) + tgt.setCopyright(src.getCopyright()); if (src.hasStringency()) { tgt.setStringency(convertDataElementStringency(src.getStringency())); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/ImplementationGuide10_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/ImplementationGuide10_30.java index 20795eb4a..58657f7f1 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/ImplementationGuide10_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/ImplementationGuide10_30.java @@ -107,14 +107,14 @@ public class ImplementationGuide10_30 { } if (src.hasDateElement()) tgt.setDateElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_10_30.convertType(src.getDateElement())); - if (src.hasDescriptionElement()) - tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_10_30.convertType(src.getDescriptionElement())); + if (src.hasDescription()) + tgt.setDescription(src.getDescription()); for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getUseContext()) if (VersionConvertor_10_30.isJurisdiction(t)) tgt.addJurisdiction(VersionConvertor_10_30.convertCodeableConcept(t)); else tgt.addUseContext(VersionConvertor_10_30.convertCodeableConceptToUsageContext(t)); - if (src.hasCopyrightElement()) - tgt.setCopyrightElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_10_30.convertType(src.getCopyrightElement())); + if (src.hasCopyright()) + tgt.setCopyright(src.getCopyright()); if (src.hasFhirVersionElement()) tgt.setFhirVersionElement((org.hl7.fhir.dstu3.model.IdType) VersionConvertor_10_30.convertType(src.getFhirVersionElement())); if (src.hasDependency()) { diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/NamingSystem10_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/NamingSystem10_30.java index 67a860593..54baa3e17 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/NamingSystem10_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/NamingSystem10_30.java @@ -32,8 +32,8 @@ public class NamingSystem10_30 { if (src.hasType()) { tgt.setType(VersionConvertor_10_30.convertCodeableConcept(src.getType())); } - if (src.hasDescriptionElement()) - tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_10_30.convertType(src.getDescriptionElement())); + if (src.hasDescription()) + tgt.setDescription(src.getDescription()); for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getUseContext()) if (VersionConvertor_10_30.isJurisdiction(t)) tgt.addJurisdiction(VersionConvertor_10_30.convertCodeableConcept(t)); else diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/OperationDefinition10_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/OperationDefinition10_30.java index d16abcb72..1e7edfa03 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/OperationDefinition10_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/OperationDefinition10_30.java @@ -95,10 +95,10 @@ public class OperationDefinition10_30 { if (src.hasContact()) { for (org.hl7.fhir.dstu2.model.OperationDefinition.OperationDefinitionContactComponent t : src.getContact()) tgt.addContact(convertOperationDefinitionContactComponent(t)); } - if (src.hasDescriptionElement()) - tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_10_30.convertType(src.getDescriptionElement())); - if (src.hasRequirementsElement()) { - tgt.setPurposeElement((MarkdownType) VersionConvertor_10_30.convertType(src.getRequirementsElement())); + if (src.hasDescription()) + tgt.setDescription(src.getDescription()); + if (src.hasRequirements()) { + tgt.setPurpose(src.getRequirements()); } if (src.hasIdempotentElement()) tgt.setIdempotentElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_10_30.convertType(src.getIdempotentElement())); diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/SearchParameter10_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/SearchParameter10_30.java index ac4b52910..e4f66eb70 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/SearchParameter10_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/SearchParameter10_30.java @@ -79,8 +79,8 @@ public class SearchParameter10_30 { if (src.hasContact()) { for (org.hl7.fhir.dstu2.model.SearchParameter.SearchParameterContactComponent t : src.getContact()) tgt.addContact(convertSearchParameterContactComponent(t)); } - if (src.hasRequirementsElement()) { - tgt.setPurposeElement((MarkdownType) VersionConvertor_10_30.convertType(src.getRequirementsElement())); + if (src.hasRequirements()) { + tgt.setPurpose(src.getRequirements()); } if (src.hasCodeElement()) tgt.setCodeElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_10_30.convertType(src.getCodeElement())); @@ -89,8 +89,8 @@ public class SearchParameter10_30 { if (src.hasType()) { tgt.setType(VersionConvertor_10_30.convertSearchParamType(src.getType())); } - if (src.hasDescriptionElement()) - tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_10_30.convertType(src.getDescriptionElement())); + if (src.hasDescription()) + tgt.setDescription(src.getDescription()); tgt.setExpression(ToolingExtensions.readStringExtension(src, ToolingExtensions.EXT_EXPRESSION)); if (src.hasXpathElement()) tgt.setXpathElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_10_30.convertType(src.getXpathElement())); diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/StructureDefinition10_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/StructureDefinition10_30.java index c3f2ad464..d74925206 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/StructureDefinition10_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/StructureDefinition10_30.java @@ -156,17 +156,17 @@ public class StructureDefinition10_30 { } if (src.hasDateElement()) tgt.setDateElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_10_30.convertType(src.getDateElement())); - if (src.hasDescriptionElement()) - tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_10_30.convertType(src.getDescriptionElement())); + if (src.hasDescription()) + tgt.setDescription(src.getDescription()); for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getUseContext()) if (VersionConvertor_10_30.isJurisdiction(t)) tgt.addJurisdiction(VersionConvertor_10_30.convertCodeableConcept(t)); else tgt.addUseContext(VersionConvertor_10_30.convertCodeableConceptToUsageContext(t)); - if (src.hasRequirementsElement()) { - tgt.setPurposeElement((MarkdownType) VersionConvertor_10_30.convertType(src.getRequirementsElement())); + if (src.hasRequirements()) { + tgt.setPurpose(src.getRequirements()); } - if (src.hasCopyrightElement()) - tgt.setCopyrightElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_10_30.convertType(src.getCopyrightElement())); + if (src.hasCopyright()) + tgt.setCopyright(src.getCopyright()); if (src.hasCode()) { for (org.hl7.fhir.dstu2.model.Coding t : src.getCode()) tgt.addKeyword(VersionConvertor_10_30.convertCoding(t)); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/TestScript10_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/TestScript10_30.java index 22a892f92..a3ffd7040 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/TestScript10_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/TestScript10_30.java @@ -563,8 +563,8 @@ public class TestScript10_30 { } if (src.hasDateElement()) tgt.setDateElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_10_30.convertType(src.getDateElement())); - if (src.hasDescriptionElement()) - tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_10_30.convertType(src.getDescriptionElement())); + if (src.hasDescription()) + tgt.setDescription(src.getDescription()); for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getUseContext()) if (VersionConvertor_10_30.isJurisdiction(t)) tgt.addJurisdiction(VersionConvertor_10_30.convertCodeableConcept(t)); else @@ -572,8 +572,8 @@ public class TestScript10_30 { if (src.hasRequirements()) { tgt.setPurpose(src.getRequirements()); } - if (src.hasCopyrightElement()) - tgt.setCopyrightElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_10_30.convertType(src.getCopyrightElement())); + if (src.hasCopyright()) + tgt.setCopyright(src.getCopyright()); if (src.hasMetadata()) { tgt.setMetadata(convertTestScriptMetadataComponent(src.getMetadata())); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/ValueSet10_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/ValueSet10_30.java index 62c36a6a5..73e1f0bee 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/ValueSet10_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/ValueSet10_30.java @@ -206,8 +206,8 @@ public class ValueSet10_30 { } if (src.hasDateElement()) tgt.setDateElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_10_30.convertType(src.getDateElement())); - if (src.hasDescriptionElement()) - tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_10_30.convertType(src.getDescriptionElement())); + if (src.hasDescription()) + tgt.setDescription(src.getDescription()); for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getUseContext()) if (VersionConvertor_10_30.isJurisdiction(t)) tgt.addJurisdiction(VersionConvertor_10_30.convertCodeableConcept(t)); else @@ -215,11 +215,11 @@ public class ValueSet10_30 { if (src.hasImmutableElement()) { tgt.setImmutableElement((BooleanType) VersionConvertor_10_30.convertType(src.getImmutableElement())); } - if (src.hasRequirementsElement()) { - tgt.setPurposeElement((MarkdownType) VersionConvertor_10_30.convertType(src.getRequirementsElement())); + if (src.hasRequirements()) { + tgt.setPurpose(src.getRequirements()); } - if (src.hasCopyrightElement()) - tgt.setCopyrightElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_10_30.convertType(src.getCopyrightElement())); + if (src.hasCopyright()) + tgt.setCopyright(src.getCopyright()); if (src.hasExtensible()) { tgt.setExtensible(src.getExtensible()); } @@ -259,8 +259,8 @@ public class ValueSet10_30 { } if (src.hasDateElement()) tgtcs.setDateElement((DateTimeType) VersionConvertor_10_30.convertType(src.getDateElement())); - if (src.hasDescriptionElement()) { - tgtcs.setDescriptionElement((MarkdownType) VersionConvertor_10_30.convertType(src.getDescriptionElement())); + if (src.hasDescription()) { + tgtcs.setDescription(src.getDescription()); } for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getUseContext()) if (VersionConvertor_10_30.isJurisdiction(t)) tgtcs.addJurisdiction(VersionConvertor_10_30.convertCodeableConcept(t)); @@ -269,8 +269,8 @@ public class ValueSet10_30 { if (src.hasRequirements()) { tgtcs.setPurpose(src.getRequirements()); } - if (src.hasCopyrightElement()) { - tgtcs.setCopyrightElement((MarkdownType) VersionConvertor_10_30.convertType(src.getCopyrightElement())); + if (src.hasCopyright()) { + tgtcs.setCopyright(src.getCopyright()); } tgtcs.setContent(CodeSystemContentMode.COMPLETE); if (src.hasCodeSystem()) { diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_40/Bundle14_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_40/Bundle14_40.java index fe353d461..e56cbecdf 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_40/Bundle14_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_40/Bundle14_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv14_40; import org.hl7.fhir.convertors.VersionConvertor_14_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Bundle14_40 { @@ -13,8 +14,8 @@ public class Bundle14_40 { if (src.hasType()) { tgt.setType(convertBundleType(src.getType())); } - if (src.hasTotal()) - tgt.setTotal(src.getTotal()); + if (src.hasTotalElement()) + tgt.setTotalElement((org.hl7.fhir.r4.model.UnsignedIntType) VersionConvertor_14_40.convertType(src.getTotalElement())); if (src.hasLink()) { for (org.hl7.fhir.dstu2016may.model.Bundle.BundleLinkComponent t : src.getLink()) tgt.addLink(convertBundleLinkComponent(t)); } @@ -35,8 +36,8 @@ public class Bundle14_40 { if (src.hasType()) { tgt.setType(convertBundleType(src.getType())); } - if (src.hasTotal()) - tgt.setTotal(src.getTotal()); + if (src.hasTotalElement()) + tgt.setTotalElement((org.hl7.fhir.dstu2016may.model.UnsignedIntType) VersionConvertor_14_40.convertType(src.getTotalElement())); if (src.hasLink()) { for (org.hl7.fhir.r4.model.Bundle.BundleLinkComponent t : src.getLink()) tgt.addLink(convertBundleLinkComponent(t)); } @@ -57,8 +58,8 @@ public class Bundle14_40 { if (src.hasLink()) { for (org.hl7.fhir.dstu2016may.model.Bundle.BundleLinkComponent t : src.getLink()) tgt.addLink(convertBundleLinkComponent(t)); } - if (src.hasFullUrl()) - tgt.setFullUrl(src.getFullUrl()); + if (src.hasFullUrlElement()) + tgt.setFullUrlElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_14_40.convertType(src.getFullUrlElement())); if (src.hasResource()) { tgt.setResource(VersionConvertor_14_40.convertResource(src.getResource())); } @@ -82,8 +83,8 @@ public class Bundle14_40 { if (src.hasLink()) { for (org.hl7.fhir.r4.model.Bundle.BundleLinkComponent t : src.getLink()) tgt.addLink(convertBundleLinkComponent(t)); } - if (src.hasFullUrl()) - tgt.setFullUrl(src.getFullUrl()); + if (src.hasFullUrlElement()) + tgt.setFullUrlElement((org.hl7.fhir.dstu2016may.model.UriType) VersionConvertor_14_40.convertType(src.getFullUrlElement())); if (src.hasResource()) { tgt.setResource(VersionConvertor_14_40.convertResource(src.getResource())); } @@ -107,17 +108,16 @@ public class Bundle14_40 { if (src.hasMethod()) { tgt.setMethod(convertHTTPVerb(src.getMethod())); } - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } - if (src.hasIfNoneMatch()) - tgt.setIfNoneMatch(src.getIfNoneMatch()); - if (src.hasIfModifiedSince()) - tgt.setIfModifiedSince(src.getIfModifiedSince()); - if (src.hasIfMatch()) - tgt.setIfMatch(src.getIfMatch()); - if (src.hasIfNoneExist()) - tgt.setIfNoneExist(src.getIfNoneExist()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_14_40.convertType(src.getUrlElement())); + if (src.hasIfNoneMatchElement()) + tgt.setIfNoneMatchElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getIfNoneMatchElement())); + if (src.hasIfModifiedSinceElement()) + tgt.setIfModifiedSinceElement((org.hl7.fhir.r4.model.InstantType) VersionConvertor_14_40.convertType(src.getIfModifiedSinceElement())); + if (src.hasIfMatchElement()) + tgt.setIfMatchElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getIfMatchElement())); + if (src.hasIfNoneExistElement()) + tgt.setIfNoneExistElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getIfNoneExistElement())); return tgt; } @@ -129,17 +129,16 @@ public class Bundle14_40 { if (src.hasMethod()) { tgt.setMethod(convertHTTPVerb(src.getMethod())); } - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } - if (src.hasIfNoneMatch()) - tgt.setIfNoneMatch(src.getIfNoneMatch()); - if (src.hasIfModifiedSince()) - tgt.setIfModifiedSince(src.getIfModifiedSince()); - if (src.hasIfMatch()) - tgt.setIfMatch(src.getIfMatch()); - if (src.hasIfNoneExist()) - tgt.setIfNoneExist(src.getIfNoneExist()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu2016may.model.UriType) VersionConvertor_14_40.convertType(src.getUrlElement())); + if (src.hasIfNoneMatchElement()) + tgt.setIfNoneMatchElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getIfNoneMatchElement())); + if (src.hasIfModifiedSinceElement()) + tgt.setIfModifiedSinceElement((org.hl7.fhir.dstu2016may.model.InstantType) VersionConvertor_14_40.convertType(src.getIfModifiedSinceElement())); + if (src.hasIfMatchElement()) + tgt.setIfMatchElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getIfMatchElement())); + if (src.hasIfNoneExistElement()) + tgt.setIfNoneExistElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getIfNoneExistElement())); return tgt; } @@ -148,15 +147,14 @@ public class Bundle14_40 { return null; org.hl7.fhir.r4.model.Bundle.BundleEntryResponseComponent tgt = new org.hl7.fhir.r4.model.Bundle.BundleEntryResponseComponent(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasStatus()) { - tgt.setStatus(src.getStatus()); - } - if (src.hasLocation()) - tgt.setLocation(src.getLocation()); - if (src.hasEtag()) - tgt.setEtag(src.getEtag()); - if (src.hasLastModified()) - tgt.setLastModified(src.getLastModified()); + if (src.hasStatusElement()) + tgt.setStatusElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getStatusElement())); + if (src.hasLocationElement()) + tgt.setLocationElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_14_40.convertType(src.getLocationElement())); + if (src.hasEtagElement()) + tgt.setEtagElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getEtagElement())); + if (src.hasLastModifiedElement()) + tgt.setLastModifiedElement((org.hl7.fhir.r4.model.InstantType) VersionConvertor_14_40.convertType(src.getLastModifiedElement())); return tgt; } @@ -165,15 +163,14 @@ public class Bundle14_40 { return null; org.hl7.fhir.dstu2016may.model.Bundle.BundleEntryResponseComponent tgt = new org.hl7.fhir.dstu2016may.model.Bundle.BundleEntryResponseComponent(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasStatus()) { - tgt.setStatus(src.getStatus()); - } - if (src.hasLocation()) - tgt.setLocation(src.getLocation()); - if (src.hasEtag()) - tgt.setEtag(src.getEtag()); - if (src.hasLastModified()) - tgt.setLastModified(src.getLastModified()); + if (src.hasStatusElement()) + tgt.setStatusElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getStatusElement())); + if (src.hasLocationElement()) + tgt.setLocationElement((org.hl7.fhir.dstu2016may.model.UriType) VersionConvertor_14_40.convertType(src.getLocationElement())); + if (src.hasEtagElement()) + tgt.setEtagElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getEtagElement())); + if (src.hasLastModifiedElement()) + tgt.setLastModifiedElement((org.hl7.fhir.dstu2016may.model.InstantType) VersionConvertor_14_40.convertType(src.getLastModifiedElement())); return tgt; } @@ -185,8 +182,8 @@ public class Bundle14_40 { if (src.hasMode()) { tgt.setMode(convertSearchEntryMode(src.getMode())); } - if (src.hasScore()) - tgt.setScore(src.getScore()); + if (src.hasScoreElement()) + tgt.setScoreElement((org.hl7.fhir.dstu2016may.model.DecimalType) VersionConvertor_14_40.convertType(src.getScoreElement())); return tgt; } @@ -198,8 +195,8 @@ public class Bundle14_40 { if (src.hasMode()) { tgt.setMode(convertSearchEntryMode(src.getMode())); } - if (src.hasScore()) - tgt.setScore(src.getScore()); + if (src.hasScoreElement()) + tgt.setScoreElement((org.hl7.fhir.r4.model.DecimalType) VersionConvertor_14_40.convertType(src.getScoreElement())); return tgt; } @@ -208,12 +205,10 @@ public class Bundle14_40 { return null; org.hl7.fhir.dstu2016may.model.Bundle.BundleLinkComponent tgt = new org.hl7.fhir.dstu2016may.model.Bundle.BundleLinkComponent(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasRelation()) { - tgt.setRelation(src.getRelation()); - } - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } + if (src.hasRelationElement()) + tgt.setRelationElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getRelationElement())); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu2016may.model.UriType) VersionConvertor_14_40.convertType(src.getUrlElement())); return tgt; } @@ -222,12 +217,10 @@ public class Bundle14_40 { return null; org.hl7.fhir.r4.model.Bundle.BundleLinkComponent tgt = new org.hl7.fhir.r4.model.Bundle.BundleLinkComponent(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasRelation()) { - tgt.setRelation(src.getRelation()); - } - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } + if (src.hasRelationElement()) + tgt.setRelationElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getRelationElement())); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_14_40.convertType(src.getUrlElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_40/CodeSystem14_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_40/CodeSystem14_40.java index cc611f325..5b248a5af 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_40/CodeSystem14_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_40/CodeSystem14_40.java @@ -6,6 +6,9 @@ import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r4.model.CodeSystem; import org.hl7.fhir.r4.model.CodeSystem.FilterOperator; import org.hl7.fhir.r4.model.Enumeration; +import org.hl7.fhir.r4.model.StringType; + +import java.util.Collections; public class CodeSystem14_40 { @@ -14,28 +17,28 @@ public class CodeSystem14_40 { return null; org.hl7.fhir.r4.model.CodeSystem tgt = new org.hl7.fhir.r4.model.CodeSystem(); VersionConvertor_14_40.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_14_40.convertType(src.getUrlElement())); if (src.hasIdentifier()) tgt.addIdentifier(VersionConvertor_14_40.convertIdentifier(src.getIdentifier())); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_14_40.convertConformanceResourceStatus(src.getStatus())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_14_40.convertType(src.getExperimentalElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu2016may.model.CodeSystem.CodeSystemContactComponent t : src.getContact()) tgt.addContact(convertCodeSystemContactComponent(t)); } - if (src.hasDate()) - tgt.setDate(src.getDate()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.r4.model.DateTimeType) VersionConvertor_14_40.convertType(src.getDateElement())); if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + tgt.setDescription(src.getDescription()); for (org.hl7.fhir.dstu2016may.model.CodeableConcept t : src.getUseContext()) if (VersionConvertor_14_40.isJurisdiction(t)) tgt.addJurisdiction(VersionConvertor_14_40.convertCodeableConcept(t)); else @@ -43,20 +46,20 @@ public class CodeSystem14_40 { if (src.hasRequirements()) tgt.setPurpose(src.getRequirements()); if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); - if (src.hasCaseSensitive()) - tgt.setCaseSensitive(src.getCaseSensitive()); - if (src.hasValueSet()) - tgt.setValueSet(src.getValueSet()); - if (src.hasCompositional()) - tgt.setCompositional(src.getCompositional()); - if (src.hasVersionNeeded()) - tgt.setVersionNeeded(src.getVersionNeeded()); + tgt.setCopyright(src.getCopyright()); + if (src.hasCaseSensitiveElement()) + tgt.setCaseSensitiveElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_14_40.convertType(src.getCaseSensitiveElement())); + if (src.hasValueSetElement()) + tgt.setValueSetElement((org.hl7.fhir.r4.model.CanonicalType) VersionConvertor_14_40.convertType(src.getValueSetElement())); + if (src.hasCompositionalElement()) + tgt.setCompositionalElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_14_40.convertType(src.getCompositionalElement())); + if (src.hasVersionNeededElement()) + tgt.setVersionNeededElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_14_40.convertType(src.getVersionNeededElement())); if (src.hasContent()) { tgt.setContent(convertCodeSystemContentMode(src.getContent())); } - if (src.hasCount()) - tgt.setCount(src.getCount()); + if (src.hasCountElement()) + tgt.setCountElement((org.hl7.fhir.r4.model.UnsignedIntType) VersionConvertor_14_40.convertType(src.getCountElement())); if (src.hasFilter()) { for (org.hl7.fhir.dstu2016may.model.CodeSystem.CodeSystemFilterComponent t : src.getFilter()) tgt.addFilter(convertCodeSystemFilterComponent(t)); } @@ -74,28 +77,28 @@ public class CodeSystem14_40 { return null; org.hl7.fhir.dstu2016may.model.CodeSystem tgt = new org.hl7.fhir.dstu2016may.model.CodeSystem(); VersionConvertor_14_40.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu2016may.model.UriType) VersionConvertor_14_40.convertType(src.getUrlElement())); if (src.hasIdentifier()) tgt.setIdentifier(VersionConvertor_14_40.convertIdentifier(src.getIdentifierFirstRep())); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_14_40.convertConformanceResourceStatus(src.getStatus())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu2016may.model.BooleanType) VersionConvertor_14_40.convertType(src.getExperimentalElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact()) tgt.addContact(convertCodeSystemContactComponent(t)); } - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu2016may.model.DateTimeType) VersionConvertor_14_40.convertType(src.getDateElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getDescriptionElement())); for (org.hl7.fhir.r4.model.UsageContext t : src.getUseContext()) if (t.hasValueCodeableConcept()) tgt.addUseContext(VersionConvertor_14_40.convertCodeableConcept(t.getValueCodeableConcept())); if (src.hasJurisdiction()) { @@ -103,21 +106,21 @@ public class CodeSystem14_40 { } if (src.hasPurpose()) tgt.setRequirements(src.getPurpose()); - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); - if (src.hasCaseSensitive()) - tgt.setCaseSensitive(src.getCaseSensitive()); - if (src.hasValueSet()) - tgt.setValueSet(src.getValueSet()); - if (src.hasCompositional()) - tgt.setCompositional(src.getCompositional()); - if (src.hasVersionNeeded()) - tgt.setVersionNeeded(src.getVersionNeeded()); + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getCopyrightElement())); + if (src.hasCaseSensitiveElement()) + tgt.setCaseSensitiveElement((org.hl7.fhir.dstu2016may.model.BooleanType) VersionConvertor_14_40.convertType(src.getCaseSensitiveElement())); + if (src.hasValueSetElement()) + tgt.setValueSetElement((org.hl7.fhir.dstu2016may.model.UriType) VersionConvertor_14_40.convertType(src.getValueSetElement())); + if (src.hasCompositionalElement()) + tgt.setCompositionalElement((org.hl7.fhir.dstu2016may.model.BooleanType) VersionConvertor_14_40.convertType(src.getCompositionalElement())); + if (src.hasVersionNeededElement()) + tgt.setVersionNeededElement((org.hl7.fhir.dstu2016may.model.BooleanType) VersionConvertor_14_40.convertType(src.getVersionNeededElement())); if (src.hasContent()) { tgt.setContent(convertCodeSystemContentMode(src.getContent())); } - if (src.hasCount()) - tgt.setCount(src.getCount()); + if (src.hasCountElement()) + tgt.setCountElement((org.hl7.fhir.dstu2016may.model.UnsignedIntType) VersionConvertor_14_40.convertType(src.getCountElement())); if (src.hasFilter()) { for (org.hl7.fhir.r4.model.CodeSystem.CodeSystemFilterComponent t : src.getFilter()) tgt.addFilter(convertCodeSystemFilterComponent(t)); } @@ -135,8 +138,8 @@ public class CodeSystem14_40 { return null; org.hl7.fhir.r4.model.ContactDetail tgt = new org.hl7.fhir.r4.model.ContactDetail(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu2016may.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_14_40.convertContactPoint(t)); } @@ -148,8 +151,8 @@ public class CodeSystem14_40 { return null; org.hl7.fhir.dstu2016may.model.CodeSystem.CodeSystemContactComponent tgt = new org.hl7.fhir.dstu2016may.model.CodeSystem.CodeSystemContactComponent(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.r4.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_14_40.convertContactPoint(t)); } @@ -195,18 +198,17 @@ public class CodeSystem14_40 { return null; org.hl7.fhir.r4.model.CodeSystem.CodeSystemFilterComponent tgt = new org.hl7.fhir.r4.model.CodeSystem.CodeSystemFilterComponent(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasCode()) { - tgt.setCode(src.getCode()); - } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.r4.model.CodeType) VersionConvertor_14_40.convertType(src.getCodeElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getDescriptionElement())); for (org.hl7.fhir.dstu2016may.model.CodeType t : src.getOperator()) try { tgt.addOperator(CodeSystem.FilterOperator.fromCode(t.getValue())); } catch (org.hl7.fhir.exceptions.FHIRException e) { throw new FHIRException(e); } - if (src.hasValue()) { - tgt.setValue(src.getValue()); + if (src.hasValueElement()) { + tgt.setValueElement((StringType) VersionConvertor_14_40.convertType(src.getValueElement())); } return tgt; } @@ -216,17 +218,12 @@ public class CodeSystem14_40 { return null; org.hl7.fhir.dstu2016may.model.CodeSystem.CodeSystemFilterComponent tgt = new org.hl7.fhir.dstu2016may.model.CodeSystem.CodeSystemFilterComponent(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasCode()) { - tgt.setCode(src.getCode()); - } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - if (src.hasOperator()) { - for (Enumeration t : src.getOperator()) tgt.addOperator(t.getValue().toCode()); - } - if (src.hasValue()) { - tgt.setValue(src.getValue()); - } + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu2016may.model.CodeType) VersionConvertor_14_40.convertType(src.getCodeElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getDescriptionElement())); + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getValueElement())); return tgt; } @@ -235,13 +232,12 @@ public class CodeSystem14_40 { return null; org.hl7.fhir.r4.model.CodeSystem.ConceptDefinitionComponent tgt = new org.hl7.fhir.r4.model.CodeSystem.ConceptDefinitionComponent(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasCode()) { - tgt.setCode(src.getCode()); - } - if (src.hasDisplay()) - tgt.setDisplay(src.getDisplay()); - if (src.hasDefinition()) - tgt.setDefinition(src.getDefinition()); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.r4.model.CodeType) VersionConvertor_14_40.convertType(src.getCodeElement())); + if (src.hasDisplayElement()) + tgt.setDisplayElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getDisplayElement())); + if (src.hasDefinitionElement()) + tgt.setDefinitionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getDefinitionElement())); if (src.hasDesignation()) { for (org.hl7.fhir.dstu2016may.model.CodeSystem.ConceptDefinitionDesignationComponent t : src.getDesignation()) tgt.addDesignation(convertConceptDefinitionDesignationComponent(t)); } @@ -259,13 +255,12 @@ public class CodeSystem14_40 { return null; org.hl7.fhir.dstu2016may.model.CodeSystem.ConceptDefinitionComponent tgt = new org.hl7.fhir.dstu2016may.model.CodeSystem.ConceptDefinitionComponent(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasCode()) { - tgt.setCode(src.getCode()); - } - if (src.hasDisplay()) - tgt.setDisplay(src.getDisplay()); - if (src.hasDefinition()) - tgt.setDefinition(src.getDefinition()); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu2016may.model.CodeType) VersionConvertor_14_40.convertType(src.getCodeElement())); + if (src.hasDisplayElement()) + tgt.setDisplayElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getDisplayElement())); + if (src.hasDefinitionElement()) + tgt.setDefinitionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getDefinitionElement())); if (src.hasDesignation()) { for (org.hl7.fhir.r4.model.CodeSystem.ConceptDefinitionDesignationComponent t : src.getDesignation()) tgt.addDesignation(convertConceptDefinitionDesignationComponent(t)); } @@ -283,14 +278,13 @@ public class CodeSystem14_40 { return null; org.hl7.fhir.r4.model.CodeSystem.ConceptDefinitionDesignationComponent tgt = new org.hl7.fhir.r4.model.CodeSystem.ConceptDefinitionDesignationComponent(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasLanguage()) - tgt.setLanguage(src.getLanguage()); + if (src.hasLanguageElement()) + tgt.setLanguageElement((org.hl7.fhir.r4.model.CodeType) VersionConvertor_14_40.convertType(src.getLanguageElement())); if (src.hasUse()) { tgt.setUse(VersionConvertor_14_40.convertCoding(src.getUse())); } - if (src.hasValue()) { - tgt.setValue(src.getValue()); - } + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getValueElement())); return tgt; } @@ -299,14 +293,13 @@ public class CodeSystem14_40 { return null; org.hl7.fhir.dstu2016may.model.CodeSystem.ConceptDefinitionDesignationComponent tgt = new org.hl7.fhir.dstu2016may.model.CodeSystem.ConceptDefinitionDesignationComponent(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasLanguage()) - tgt.setLanguage(src.getLanguage()); + if (src.hasLanguageElement()) + tgt.setLanguageElement((org.hl7.fhir.dstu2016may.model.CodeType) VersionConvertor_14_40.convertType(src.getLanguageElement())); if (src.hasUse()) { tgt.setUse(VersionConvertor_14_40.convertCoding(src.getUse())); } - if (src.hasValue()) { - tgt.setValue(src.getValue()); - } + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getValueElement())); return tgt; } @@ -315,9 +308,8 @@ public class CodeSystem14_40 { return null; org.hl7.fhir.dstu2016may.model.CodeSystem.ConceptDefinitionPropertyComponent tgt = new org.hl7.fhir.dstu2016may.model.CodeSystem.ConceptDefinitionPropertyComponent(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasCode()) { - tgt.setCode(src.getCode()); - } + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu2016may.model.CodeType) VersionConvertor_14_40.convertType(src.getCodeElement())); if (src.hasValue()) { tgt.setValue(VersionConvertor_14_40.convertType(src.getValue())); } @@ -329,9 +321,8 @@ public class CodeSystem14_40 { return null; org.hl7.fhir.r4.model.CodeSystem.ConceptPropertyComponent tgt = new org.hl7.fhir.r4.model.CodeSystem.ConceptPropertyComponent(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasCode()) { - tgt.setCode(src.getCode()); - } + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.r4.model.CodeType) VersionConvertor_14_40.convertType(src.getCodeElement())); if (src.hasValue()) { tgt.setValue(VersionConvertor_14_40.convertType(src.getValue())); } @@ -343,11 +334,10 @@ public class CodeSystem14_40 { return null; org.hl7.fhir.dstu2016may.model.CodeSystem.CodeSystemPropertyComponent tgt = new org.hl7.fhir.dstu2016may.model.CodeSystem.CodeSystemPropertyComponent(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasCode()) { - tgt.setCode(src.getCode()); - } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu2016may.model.CodeType) VersionConvertor_14_40.convertType(src.getCodeElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getDescriptionElement())); if (src.hasType()) { tgt.setType(convertPropertyType(src.getType())); } @@ -359,11 +349,10 @@ public class CodeSystem14_40 { return null; org.hl7.fhir.r4.model.CodeSystem.PropertyComponent tgt = new org.hl7.fhir.r4.model.CodeSystem.PropertyComponent(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasCode()) { - tgt.setCode(src.getCode()); - } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.r4.model.CodeType) VersionConvertor_14_40.convertType(src.getCodeElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getDescriptionElement())); if (src.hasType()) { tgt.setType(convertPropertyType(src.getType())); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_40/CompartmentDefinition14_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_40/CompartmentDefinition14_40.java index 172a3cff2..457c0c190 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_40/CompartmentDefinition14_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_40/CompartmentDefinition14_40.java @@ -2,6 +2,9 @@ package org.hl7.fhir.convertors.conv14_40; import org.hl7.fhir.convertors.VersionConvertor_14_40; import org.hl7.fhir.exceptions.FHIRException; +import org.hl7.fhir.r4.model.StringType; + +import java.util.Collections; public class CompartmentDefinition14_40 { @@ -10,24 +13,22 @@ public class CompartmentDefinition14_40 { return null; org.hl7.fhir.r4.model.CompartmentDefinition tgt = new org.hl7.fhir.r4.model.CompartmentDefinition(); VersionConvertor_14_40.copyDomainResource(src, tgt); - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_14_40.convertType(src.getUrlElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_14_40.convertConformanceResourceStatus(src.getStatus())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_14_40.convertType(src.getExperimentalElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu2016may.model.CompartmentDefinition.CompartmentDefinitionContactComponent t : src.getContact()) tgt.addContact(convertCompartmentDefinitionContactComponent(t)); } - if (src.hasDate()) - tgt.setDate(src.getDate()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.r4.model.DateTimeType) VersionConvertor_14_40.convertType(src.getDateElement())); if (src.hasDescription()) tgt.setDescription(src.getDescription()); if (src.hasRequirements()) @@ -35,9 +36,8 @@ public class CompartmentDefinition14_40 { if (src.hasCode()) { tgt.setCode(convertCompartmentType(src.getCode())); } - if (src.hasSearch()) { - tgt.setSearch(src.getSearch()); - } + if (src.hasSearchElement()) + tgt.setSearchElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_14_40.convertType(src.getSearchElement())); if (src.hasResource()) { for (org.hl7.fhir.dstu2016may.model.CompartmentDefinition.CompartmentDefinitionResourceComponent t : src.getResource()) tgt.addResource(convertCompartmentDefinitionResourceComponent(t)); } @@ -49,34 +49,31 @@ public class CompartmentDefinition14_40 { return null; org.hl7.fhir.dstu2016may.model.CompartmentDefinition tgt = new org.hl7.fhir.dstu2016may.model.CompartmentDefinition(); VersionConvertor_14_40.copyDomainResource(src, tgt); - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu2016may.model.UriType) VersionConvertor_14_40.convertType(src.getUrlElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_14_40.convertConformanceResourceStatus(src.getStatus())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu2016may.model.BooleanType) VersionConvertor_14_40.convertType(src.getExperimentalElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact()) tgt.addContact(convertCompartmentDefinitionContactComponent(t)); } - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu2016may.model.DateTimeType) VersionConvertor_14_40.convertType(src.getDateElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getDescriptionElement())); if (src.hasPurpose()) tgt.setRequirements(src.getPurpose()); if (src.hasCode()) { tgt.setCode(convertCompartmentType(src.getCode())); } - if (src.hasSearch()) { - tgt.setSearch(src.getSearch()); - } + if (src.hasSearchElement()) + tgt.setSearchElement((org.hl7.fhir.dstu2016may.model.BooleanType) VersionConvertor_14_40.convertType(src.getSearchElement())); if (src.hasResource()) { for (org.hl7.fhir.r4.model.CompartmentDefinition.CompartmentDefinitionResourceComponent t : src.getResource()) tgt.addResource(convertCompartmentDefinitionResourceComponent(t)); } @@ -88,8 +85,8 @@ public class CompartmentDefinition14_40 { return null; org.hl7.fhir.r4.model.ContactDetail tgt = new org.hl7.fhir.r4.model.ContactDetail(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((StringType) VersionConvertor_14_40.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu2016may.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_14_40.convertContactPoint(t)); } @@ -101,8 +98,8 @@ public class CompartmentDefinition14_40 { return null; org.hl7.fhir.dstu2016may.model.CompartmentDefinition.CompartmentDefinitionContactComponent tgt = new org.hl7.fhir.dstu2016may.model.CompartmentDefinition.CompartmentDefinitionContactComponent(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.r4.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_14_40.convertContactPoint(t)); } @@ -114,14 +111,13 @@ public class CompartmentDefinition14_40 { return null; org.hl7.fhir.r4.model.CompartmentDefinition.CompartmentDefinitionResourceComponent tgt = new org.hl7.fhir.r4.model.CompartmentDefinition.CompartmentDefinitionResourceComponent(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasCode()) { - tgt.setCode(src.getCode()); - } + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.r4.model.CodeType) VersionConvertor_14_40.convertType(src.getCodeElement())); if (src.hasParam()) { for (org.hl7.fhir.dstu2016may.model.StringType t : src.getParam()) tgt.addParam(t.getValue()); } - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getDocumentationElement())); return tgt; } @@ -130,14 +126,13 @@ public class CompartmentDefinition14_40 { return null; org.hl7.fhir.dstu2016may.model.CompartmentDefinition.CompartmentDefinitionResourceComponent tgt = new org.hl7.fhir.dstu2016may.model.CompartmentDefinition.CompartmentDefinitionResourceComponent(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasCode()) { - tgt.setCode(src.getCode()); - } + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu2016may.model.CodeType) VersionConvertor_14_40.convertType(src.getCodeElement())); if (src.hasParam()) { for (org.hl7.fhir.r4.model.StringType t : src.getParam()) tgt.addParam(t.getValue()); } - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getDocumentationElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_40/ConceptMap14_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_40/ConceptMap14_40.java index 3bced4698..f3a1f5120 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_40/ConceptMap14_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_40/ConceptMap14_40.java @@ -2,11 +2,12 @@ package org.hl7.fhir.convertors.conv14_40; import org.hl7.fhir.convertors.VersionConvertor_14_40; import org.hl7.fhir.exceptions.FHIRException; -import org.hl7.fhir.r4.model.CanonicalType; -import org.hl7.fhir.r4.model.ConceptMap; +import org.hl7.fhir.r4.model.*; import org.hl7.fhir.r4.model.ConceptMap.ConceptMapGroupComponent; + import java.util.ArrayList; import java.util.List; +import java.util.Collections; public class ConceptMap14_40 { @@ -15,21 +16,21 @@ public class ConceptMap14_40 { return null; org.hl7.fhir.r4.model.ConceptMap tgt = new org.hl7.fhir.r4.model.ConceptMap(); VersionConvertor_14_40.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); - tgt.setIdentifier(VersionConvertor_14_40.convertIdentifier(src.getIdentifier())); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); - tgt.setStatus(VersionConvertor_14_40.convertConformanceResourceStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_14_40.convertType(src.getUrlElement())); + if (src.hasIdentifier()) tgt.setIdentifier(VersionConvertor_14_40.convertIdentifier(src.getIdentifier())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getNameElement())); + if (src.hasStatus()) tgt.setStatus(VersionConvertor_14_40.convertConformanceResourceStatus(src.getStatus())); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_14_40.convertType(src.getExperimentalElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getPublisherElement())); for (org.hl7.fhir.dstu2016may.model.ConceptMap.ConceptMapContactComponent t : src.getContact()) tgt.addContact(convertConceptMapContactComponent(t)); - if (src.hasDate()) - tgt.setDate(src.getDate()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.r4.model.DateTimeType) VersionConvertor_14_40.convertType(src.getDateElement())); if (src.hasDescription()) tgt.setDescription(src.getDescription()); for (org.hl7.fhir.dstu2016may.model.CodeableConcept t : src.getUseContext()) if (VersionConvertor_14_40.isJurisdiction(t)) @@ -56,29 +57,29 @@ public class ConceptMap14_40 { return null; org.hl7.fhir.dstu2016may.model.ConceptMap tgt = new org.hl7.fhir.dstu2016may.model.ConceptMap(); VersionConvertor_14_40.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu2016may.model.UriType) VersionConvertor_14_40.convertType(src.getUrlElement())); if (src.hasIdentifier()) { tgt.setIdentifier(VersionConvertor_14_40.convertIdentifier(src.getIdentifier())); } - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_14_40.convertConformanceResourceStatus(src.getStatus())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu2016may.model.BooleanType) VersionConvertor_14_40.convertType(src.getExperimentalElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact()) tgt.addContact(convertConceptMapContactComponent(t)); } - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu2016may.model.DateTimeType) VersionConvertor_14_40.convertType(src.getDateElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getDescriptionElement())); for (org.hl7.fhir.r4.model.UsageContext t : src.getUseContext()) if (t.hasValueCodeableConcept()) tgt.addUseContext(VersionConvertor_14_40.convertCodeableConcept(t.getValueCodeableConcept())); if (src.hasJurisdiction()) { @@ -86,8 +87,8 @@ public class ConceptMap14_40 { } if (src.hasPurpose()) tgt.setRequirements(src.getPurpose()); - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getCopyrightElement())); if (src.getSource() instanceof CanonicalType) tgt.setSource(VersionConvertor_14_40.convertCanonicalToReference((CanonicalType) src.getSource())); else if (src.hasSource()) { @@ -115,8 +116,8 @@ public class ConceptMap14_40 { return null; org.hl7.fhir.dstu2016may.model.ConceptMap.ConceptMapContactComponent tgt = new org.hl7.fhir.dstu2016may.model.ConceptMap.ConceptMapContactComponent(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.r4.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_14_40.convertContactPoint(t)); } @@ -128,8 +129,8 @@ public class ConceptMap14_40 { return null; org.hl7.fhir.r4.model.ContactDetail tgt = new org.hl7.fhir.r4.model.ContactDetail(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu2016may.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_14_40.convertContactPoint(t)); } @@ -195,14 +196,13 @@ public class ConceptMap14_40 { return null; org.hl7.fhir.r4.model.ConceptMap.OtherElementComponent tgt = new org.hl7.fhir.r4.model.ConceptMap.OtherElementComponent(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasElement()) { - tgt.setProperty(src.getElement()); + if (src.hasElementElement()) { + tgt.setPropertyElement((UriType) VersionConvertor_14_40.convertType(src.getElementElement())); } - if (src.hasSystem()) { - tgt.setSystem(src.getSystem()); - } - if (src.hasCode()) { - tgt.setValue(src.getCode()); + if (src.hasSystemElement()) + tgt.setSystemElement((org.hl7.fhir.r4.model.CanonicalType) VersionConvertor_14_40.convertType(src.getSystemElement())); + if (src.hasCodeElement()) { + tgt.setValueElement((StringType) VersionConvertor_14_40.convertType(src.getCodeElement())); } return tgt; } @@ -212,14 +212,13 @@ public class ConceptMap14_40 { return null; org.hl7.fhir.dstu2016may.model.ConceptMap.OtherElementComponent tgt = new org.hl7.fhir.dstu2016may.model.ConceptMap.OtherElementComponent(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasProperty()) { - tgt.setElement(src.getProperty()); + if (src.hasPropertyElement()) { + tgt.setElementElement((org.hl7.fhir.dstu2016may.model.UriType) VersionConvertor_14_40.convertType(src.getPropertyElement())); } - if (src.hasSystem()) { - tgt.setSystem(src.getSystem()); - } - if (src.hasValue()) { - tgt.setCode(src.getValue()); + if (src.hasSystemElement()) + tgt.setSystemElement((org.hl7.fhir.dstu2016may.model.UriType) VersionConvertor_14_40.convertType(src.getSystemElement())); + if (src.hasValueElement()) { + tgt.setCodeElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getValueElement())); } return tgt; } @@ -231,8 +230,8 @@ public class ConceptMap14_40 { for (org.hl7.fhir.dstu2016may.model.ConceptMap.TargetElementComponent t : src.getTarget()) { org.hl7.fhir.r4.model.ConceptMap.SourceElementComponent tgt = new org.hl7.fhir.r4.model.ConceptMap.SourceElementComponent(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasCode()) - tgt.setCode(src.getCode()); + if (src.hasCodeElement()) + tgt.setCodeElement((CodeType) VersionConvertor_14_40.convertType(src.getCodeElement())); tgt.addTarget(convertTargetElementComponent(t)); if (src.hasSystem()) { res.add(new VersionConvertor_14_40.SourceElementComponentWrapper(tgt, src.getSystem(), t.getSystem())); @@ -246,10 +245,10 @@ public class ConceptMap14_40 { return null; org.hl7.fhir.dstu2016may.model.ConceptMap.SourceElementComponent tgt = new org.hl7.fhir.dstu2016may.model.ConceptMap.SourceElementComponent(); VersionConvertor_14_40.copyElement(src, tgt); - if (g.hasSource()) - tgt.setSystem(g.getSource()); - if (src.hasCode()) - tgt.setCode(src.getCode()); + if (g.hasSourceElement()) + tgt.setSystemElement((org.hl7.fhir.dstu2016may.model.UriType) VersionConvertor_14_40.convertType(g.getSourceElement())); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu2016may.model.CodeType) VersionConvertor_14_40.convertType(src.getCodeElement())); if (src.hasTarget()) { for (org.hl7.fhir.r4.model.ConceptMap.TargetElementComponent t : src.getTarget()) tgt.addTarget(convertTargetElementComponent(t, g)); } @@ -261,13 +260,13 @@ public class ConceptMap14_40 { return null; org.hl7.fhir.r4.model.ConceptMap.TargetElementComponent tgt = new org.hl7.fhir.r4.model.ConceptMap.TargetElementComponent(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasCode()) - tgt.setCode(src.getCode()); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.r4.model.CodeType) VersionConvertor_14_40.convertType(src.getCodeElement())); if (src.hasEquivalence()) { tgt.setEquivalence(convertConceptMapEquivalence(src.getEquivalence())); } - if (src.hasComments()) - tgt.setComment(src.getComments()); + if (src.hasCommentsElement()) + tgt.setCommentElement((StringType) VersionConvertor_14_40.convertType(src.getCommentsElement())); if (src.hasDependsOn()) { for (org.hl7.fhir.dstu2016may.model.ConceptMap.OtherElementComponent t : src.getDependsOn()) tgt.addDependsOn(convertOtherElementComponent(t)); } @@ -284,13 +283,13 @@ public class ConceptMap14_40 { VersionConvertor_14_40.copyElement(src, tgt); if (g.hasTarget()) tgt.setSystem(g.getTarget()); - if (src.hasCode()) - tgt.setCode(src.getCode()); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu2016may.model.CodeType) VersionConvertor_14_40.convertType(src.getCodeElement())); if (src.hasEquivalence()) { tgt.setEquivalence(convertConceptMapEquivalence(src.getEquivalence())); } - if (src.hasComment()) - tgt.setComments(src.getComment()); + if (src.hasCommentElement()) + tgt.setCommentsElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getCommentElement())); if (src.hasDependsOn()) { for (org.hl7.fhir.r4.model.ConceptMap.OtherElementComponent t : src.getDependsOn()) tgt.addDependsOn(convertOtherElementComponent(t)); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_40/Conformance14_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_40/Conformance14_40.java index cfbd421f5..9d5704c2a 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_40/Conformance14_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_40/Conformance14_40.java @@ -2,9 +2,15 @@ package org.hl7.fhir.convertors.conv14_40; import org.hl7.fhir.convertors.VersionConvertorConstants; import org.hl7.fhir.convertors.VersionConvertor_14_40; +import org.hl7.fhir.dstu2016may.model.BooleanType; +import org.hl7.fhir.dstu2016may.model.CodeType; +import org.hl7.fhir.dstu2016may.model.StringType; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestComponent; import org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestResourceComponent; +import org.hl7.fhir.r4.model.DateTimeType; + +import java.util.Collections; public class Conformance14_40 { @@ -43,26 +49,26 @@ public class Conformance14_40 { return null; org.hl7.fhir.dstu2016may.model.Conformance tgt = new org.hl7.fhir.dstu2016may.model.Conformance(); VersionConvertor_14_40.copyDomainResource(src, tgt, "http://hl7.org/fhir/3.0/StructureDefinition/extension-CapabilityStatement.acceptUnknown"); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu2016may.model.UriType) VersionConvertor_14_40.convertType(src.getUrlElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_14_40.convertConformanceResourceStatus(src.getStatus())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu2016may.model.BooleanType) VersionConvertor_14_40.convertType(src.getExperimentalElement())); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu2016may.model.DateTimeType) VersionConvertor_14_40.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact()) tgt.addContact(convertConformanceContactComponent(t)); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getDescriptionElement())); for (org.hl7.fhir.r4.model.UsageContext t : src.getUseContext()) if (t.hasValueCodeableConcept()) tgt.addUseContext(VersionConvertor_14_40.convertCodeableConcept(t.getValueCodeableConcept())); if (src.hasJurisdiction()) { @@ -70,8 +76,8 @@ public class Conformance14_40 { } if (src.hasPurpose()) tgt.setRequirements(src.getPurpose()); - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getCopyrightElement())); if (src.hasKind()) { tgt.setKind(convertConformanceStatementKind(src.getKind())); } @@ -109,21 +115,21 @@ public class Conformance14_40 { return null; org.hl7.fhir.r4.model.CapabilityStatement tgt = new org.hl7.fhir.r4.model.CapabilityStatement(); VersionConvertor_14_40.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_14_40.convertType(src.getUrlElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_14_40.convertConformanceResourceStatus(src.getStatus())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_14_40.convertType(src.getExperimentalElement())); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.r4.model.DateTimeType) VersionConvertor_14_40.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu2016may.model.Conformance.ConformanceContactComponent t : src.getContact()) tgt.addContact(convertConformanceContactComponent(t)); } @@ -171,8 +177,8 @@ public class Conformance14_40 { return null; org.hl7.fhir.dstu2016may.model.Conformance.ConformanceContactComponent tgt = new org.hl7.fhir.dstu2016may.model.Conformance.ConformanceContactComponent(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.r4.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_14_40.convertContactPoint(t)); } @@ -184,8 +190,8 @@ public class Conformance14_40 { return null; org.hl7.fhir.r4.model.ContactDetail tgt = new org.hl7.fhir.r4.model.ContactDetail(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu2016may.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_14_40.convertContactPoint(t)); } @@ -242,11 +248,11 @@ public class Conformance14_40 { return null; org.hl7.fhir.dstu2016may.model.Conformance.ConformanceImplementationComponent tgt = new org.hl7.fhir.dstu2016may.model.Conformance.ConformanceImplementationComponent(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) { + tgt.setDescriptionElement((StringType) VersionConvertor_14_40.convertType(src.getDescriptionElement())); } - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu2016may.model.UriType) VersionConvertor_14_40.convertType(src.getUrlElement())); return tgt; } @@ -331,7 +337,7 @@ public class Conformance14_40 { if (src.hasProtocol()) { tgt.setProtocol(VersionConvertor_14_40.convertCoding(src.getProtocol())); } - if (src.hasAddress()) { + if (src.hasAddressElement()) { tgt.setAddress(src.getAddress()); } return tgt; @@ -418,8 +424,8 @@ public class Conformance14_40 { return null; org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestResourceOperationComponent tgt = new org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestResourceOperationComponent(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); + if (src.hasNameElement()) { + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getNameElement())); } if (src.hasDefinition()) { tgt.setDefinitionElement(VersionConvertor_14_40.convertReferenceToCanonical(src.getDefinition())); @@ -432,8 +438,8 @@ public class Conformance14_40 { return null; org.hl7.fhir.dstu2016may.model.Conformance.ConformanceRestOperationComponent tgt = new org.hl7.fhir.dstu2016may.model.Conformance.ConformanceRestOperationComponent(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); + if (src.hasNameElement()) { + tgt.setNameElement((StringType) VersionConvertor_14_40.convertType(src.getNameElement())); } if (src.hasDefinitionElement()) { tgt.setDefinition(VersionConvertor_14_40.convertCanonicalToReference(src.getDefinitionElement())); @@ -446,8 +452,8 @@ public class Conformance14_40 { return null; org.hl7.fhir.dstu2016may.model.Conformance.ConformanceRestResourceComponent tgt = new org.hl7.fhir.dstu2016may.model.Conformance.ConformanceRestResourceComponent(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasType()) { - tgt.setType(src.getType()); + if (src.hasTypeElement()) { + tgt.setTypeElement((CodeType) VersionConvertor_14_40.convertType(src.getTypeElement())); } if (src.hasProfileElement()) { tgt.setProfile(VersionConvertor_14_40.convertCanonicalToReference(src.getProfileElement())); @@ -458,14 +464,14 @@ public class Conformance14_40 { if (src.hasVersioning()) { tgt.setVersioning(convertResourceVersionPolicy(src.getVersioning())); } - if (src.hasReadHistory()) - tgt.setReadHistory(src.getReadHistory()); - if (src.hasUpdateCreate()) - tgt.setUpdateCreate(src.getUpdateCreate()); - if (src.hasConditionalCreate()) - tgt.setConditionalCreate(src.getConditionalCreate()); - if (src.hasConditionalUpdate()) - tgt.setConditionalUpdate(src.getConditionalUpdate()); + if (src.hasReadHistoryElement()) + tgt.setReadHistoryElement((BooleanType) VersionConvertor_14_40.convertType(src.getReadHistoryElement())); + if (src.hasUpdateCreateElement()) + tgt.setUpdateCreateElement((BooleanType) VersionConvertor_14_40.convertType(src.getUpdateCreateElement())); + if (src.hasConditionalCreateElement()) + tgt.setConditionalCreateElement((BooleanType) VersionConvertor_14_40.convertType(src.getConditionalCreateElement())); + if (src.hasConditionalUpdateElement()) + tgt.setConditionalUpdateElement((BooleanType) VersionConvertor_14_40.convertType(src.getConditionalUpdateElement())); if (src.hasConditionalDelete()) { tgt.setConditionalDelete(convertConditionalDeleteStatus(src.getConditionalDelete())); } @@ -498,14 +504,14 @@ public class Conformance14_40 { if (src.hasVersioning()) { tgt.setVersioning(convertResourceVersionPolicy(src.getVersioning())); } - if (src.hasReadHistory()) - tgt.setReadHistory(src.getReadHistory()); - if (src.hasUpdateCreate()) - tgt.setUpdateCreate(src.getUpdateCreate()); - if (src.hasConditionalCreate()) - tgt.setConditionalCreate(src.getConditionalCreate()); - if (src.hasConditionalUpdate()) - tgt.setConditionalUpdate(src.getConditionalUpdate()); + if (src.hasReadHistoryElement()) + tgt.setReadHistoryElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_14_40.convertType(src.getReadHistoryElement())); + if (src.hasUpdateCreateElement()) + tgt.setUpdateCreateElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_14_40.convertType(src.getUpdateCreateElement())); + if (src.hasConditionalCreateElement()) + tgt.setConditionalCreateElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_14_40.convertType(src.getConditionalCreateElement())); + if (src.hasConditionalUpdateElement()) + tgt.setConditionalUpdateElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_14_40.convertType(src.getConditionalUpdateElement())); if (src.hasConditionalDelete()) { tgt.setConditionalDelete(convertConditionalDeleteStatus(src.getConditionalDelete())); } @@ -526,8 +532,8 @@ public class Conformance14_40 { return null; org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent tgt = new org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); + if (src.hasNameElement()) { + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getNameElement())); } if (src.hasDefinition()) tgt.setDefinition(src.getDefinition()); @@ -544,8 +550,8 @@ public class Conformance14_40 { return null; org.hl7.fhir.dstu2016may.model.Conformance.ConformanceRestResourceSearchParamComponent tgt = new org.hl7.fhir.dstu2016may.model.Conformance.ConformanceRestResourceSearchParamComponent(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); + if (src.hasNameElement()) { + tgt.setNameElement((StringType) VersionConvertor_14_40.convertType(src.getNameElement())); } if (src.hasDefinition()) tgt.setDefinition(src.getDefinition()); @@ -562,8 +568,8 @@ public class Conformance14_40 { return null; org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestSecurityComponent tgt = new org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestSecurityComponent(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasCors()) - tgt.setCors(src.getCors()); + if (src.hasCorsElement()) + tgt.setCorsElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_14_40.convertType(src.getCorsElement())); if (src.hasService()) { for (org.hl7.fhir.dstu2016may.model.CodeableConcept t : src.getService()) tgt.addService(VersionConvertor_14_40.convertCodeableConcept(t)); } @@ -577,13 +583,13 @@ public class Conformance14_40 { return null; org.hl7.fhir.dstu2016may.model.Conformance.ConformanceRestSecurityComponent tgt = new org.hl7.fhir.dstu2016may.model.Conformance.ConformanceRestSecurityComponent(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasCors()) - tgt.setCors(src.getCors()); + if (src.hasCorsElement()) + tgt.setCorsElement((BooleanType) VersionConvertor_14_40.convertType(src.getCorsElement())); if (src.hasService()) { for (org.hl7.fhir.r4.model.CodeableConcept t : src.getService()) tgt.addService(VersionConvertor_14_40.convertCodeableConcept(t)); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getDescriptionElement())); return tgt; } @@ -592,13 +598,13 @@ public class Conformance14_40 { return null; org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementSoftwareComponent tgt = new org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementSoftwareComponent(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); + if (src.hasNameElement()) { + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getNameElement())); } - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasReleaseDate()) - tgt.setReleaseDate(src.getReleaseDate()); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getVersionElement())); + if (src.hasReleaseDateElement()) + tgt.setReleaseDateElement((DateTimeType) VersionConvertor_14_40.convertType(src.getReleaseDateElement())); return tgt; } @@ -607,13 +613,13 @@ public class Conformance14_40 { return null; org.hl7.fhir.dstu2016may.model.Conformance.ConformanceSoftwareComponent tgt = new org.hl7.fhir.dstu2016may.model.Conformance.ConformanceSoftwareComponent(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); + if (src.hasNameElement()) { + tgt.setNameElement((StringType) VersionConvertor_14_40.convertType(src.getNameElement())); } - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasReleaseDate()) - tgt.setReleaseDate(src.getReleaseDate()); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getVersionElement())); + if (src.hasReleaseDateElement()) + tgt.setReleaseDateElement((org.hl7.fhir.dstu2016may.model.DateTimeType) VersionConvertor_14_40.convertType(src.getReleaseDateElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_40/DataElement14_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_40/DataElement14_40.java index bc3133993..15a8e85cc 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_40/DataElement14_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_40/DataElement14_40.java @@ -2,7 +2,13 @@ package org.hl7.fhir.convertors.conv14_40; import org.hl7.fhir.convertors.VersionConvertor_14_40; import org.hl7.fhir.exceptions.FHIRException; +import org.hl7.fhir.r4.model.BooleanType; +import org.hl7.fhir.r4.model.DateTimeType; +import org.hl7.fhir.r4.model.StringType; import org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionKind; +import org.hl7.fhir.r4.model.UriType; + +import java.util.Collections; public class DataElement14_40 { @@ -11,24 +17,24 @@ public class DataElement14_40 { return null; org.hl7.fhir.r4.model.StructureDefinition tgt = new org.hl7.fhir.r4.model.StructureDefinition(); VersionConvertor_14_40.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((UriType) VersionConvertor_14_40.convertType(src.getUrlElement())); if (src.hasIdentifier()) { for (org.hl7.fhir.dstu2016may.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_14_40.convertIdentifier(t)); } - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); + if (src.hasVersionElement()) + tgt.setVersionElement((StringType) VersionConvertor_14_40.convertType(src.getVersionElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_14_40.convertConformanceResourceStatus(src.getStatus())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((BooleanType) VersionConvertor_14_40.convertType(src.getExperimentalElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((StringType) VersionConvertor_14_40.convertType(src.getPublisherElement())); + if (src.hasDateElement()) + tgt.setDateElement((DateTimeType) VersionConvertor_14_40.convertType(src.getDateElement())); + if (src.hasNameElement()) + tgt.setNameElement((StringType) VersionConvertor_14_40.convertType(src.getNameElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu2016may.model.DataElement.DataElementContactComponent t : src.getContact()) tgt.addContact(convertDataElementContactComponent(t)); } @@ -57,8 +63,8 @@ public class DataElement14_40 { return null; org.hl7.fhir.dstu2016may.model.DataElement.DataElementContactComponent tgt = new org.hl7.fhir.dstu2016may.model.DataElement.DataElementContactComponent(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.r4.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_14_40.convertContactPoint(t)); } @@ -70,8 +76,8 @@ public class DataElement14_40 { return null; org.hl7.fhir.r4.model.ContactDetail tgt = new org.hl7.fhir.r4.model.ContactDetail(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((StringType) VersionConvertor_14_40.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu2016may.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_14_40.convertContactPoint(t)); } @@ -86,12 +92,12 @@ public class DataElement14_40 { if (src.hasIdentity()) { tgt.setIdentity(src.getIdentity()); } - if (src.hasUri()) - tgt.setUri(src.getUri()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasComment()) - tgt.setComment(src.getComment()); + if (src.hasUriElement()) + tgt.setUriElement((UriType) VersionConvertor_14_40.convertType(src.getUriElement())); + if (src.hasNameElement()) + tgt.setNameElement((StringType) VersionConvertor_14_40.convertType(src.getNameElement())); + if (src.hasCommentElement()) + tgt.setCommentElement((StringType) VersionConvertor_14_40.convertType(src.getCommentElement())); return tgt; } } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_40/ImplementationGuide14_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_40/ImplementationGuide14_40.java index 61a796ec8..818035767 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_40/ImplementationGuide14_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_40/ImplementationGuide14_40.java @@ -2,13 +2,16 @@ package org.hl7.fhir.convertors.conv14_40; import org.hl7.fhir.convertors.VersionConvertorConstants; import org.hl7.fhir.convertors.VersionConvertor_14_40; +import org.hl7.fhir.dstu2016may.model.IdType; import org.hl7.fhir.dstu2016may.model.ImplementationGuide.GuidePageKind; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r4.model.CanonicalType; import org.hl7.fhir.r4.model.Enumeration; import org.hl7.fhir.r4.model.ImplementationGuide.GuidePageGeneration; +import org.hl7.fhir.r4.model.StringType; import org.hl7.fhir.r4.model.Type; import java.util.List; +import java.util.Collections; public class ImplementationGuide14_40 { @@ -17,35 +20,33 @@ public class ImplementationGuide14_40 { return null; org.hl7.fhir.dstu2016may.model.ImplementationGuide tgt = new org.hl7.fhir.dstu2016may.model.ImplementationGuide(); VersionConvertor_14_40.copyDomainResource(src, tgt); - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu2016may.model.UriType) VersionConvertor_14_40.convertType(src.getUrlElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_14_40.convertConformanceResourceStatus(src.getStatus())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu2016may.model.BooleanType) VersionConvertor_14_40.convertType(src.getExperimentalElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact()) tgt.addContact(convertImplementationGuideContactComponent(t)); } - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu2016may.model.DateTimeType) VersionConvertor_14_40.convertType(src.getDateElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getDescriptionElement())); for (org.hl7.fhir.r4.model.UsageContext t : src.getUseContext()) if (t.hasValueCodeableConcept()) tgt.addUseContext(VersionConvertor_14_40.convertCodeableConcept(t.getValueCodeableConcept())); if (src.hasJurisdiction()) { for (org.hl7.fhir.r4.model.CodeableConcept t : src.getJurisdiction()) tgt.addUseContext(VersionConvertor_14_40.convertCodeableConcept(t)); } - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getCopyrightElement())); if (src.hasFhirVersion()) for (Enumeration v : src.getFhirVersion()) { tgt.setFhirVersion(v.asStringValue()); @@ -73,26 +74,24 @@ public class ImplementationGuide14_40 { return null; org.hl7.fhir.r4.model.ImplementationGuide tgt = new org.hl7.fhir.r4.model.ImplementationGuide(); VersionConvertor_14_40.copyDomainResource(src, tgt); - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_14_40.convertType(src.getUrlElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_14_40.convertConformanceResourceStatus(src.getStatus())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_14_40.convertType(src.getExperimentalElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu2016may.model.ImplementationGuide.ImplementationGuideContactComponent t : src.getContact()) tgt.addContact(convertImplementationGuideContactComponent(t)); } - if (src.hasDate()) - tgt.setDate(src.getDate()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.r4.model.DateTimeType) VersionConvertor_14_40.convertType(src.getDateElement())); if (src.hasDescription()) tgt.setDescription(src.getDescription()); for (org.hl7.fhir.dstu2016may.model.CodeableConcept t : src.getUseContext()) if (VersionConvertor_14_40.isJurisdiction(t)) @@ -102,7 +101,7 @@ public class ImplementationGuide14_40 { if (src.hasCopyright()) tgt.setCopyright(src.getCopyright()); if (src.hasFhirVersion()) - tgt.addFhirVersion(org.hl7.fhir.r4.model.Enumerations.FHIRVersion.fromCode(src.getFhirVersion())); + tgt.addFhirVersion(org.hl7.fhir.r4.model.Enumerations.FHIRVersion.fromCode(src.getFhirVersion())); if (src.hasDependency()) { for (org.hl7.fhir.dstu2016may.model.ImplementationGuide.ImplementationGuideDependencyComponent t : src.getDependency()) tgt.addDependsOn(convertImplementationGuideDependencyComponent(t)); } @@ -123,8 +122,8 @@ public class ImplementationGuide14_40 { return null; org.hl7.fhir.r4.model.ContactDetail tgt = new org.hl7.fhir.r4.model.ContactDetail(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((StringType) VersionConvertor_14_40.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu2016may.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_14_40.convertContactPoint(t)); } @@ -136,8 +135,8 @@ public class ImplementationGuide14_40 { return null; org.hl7.fhir.dstu2016may.model.ImplementationGuide.ImplementationGuideContactComponent tgt = new org.hl7.fhir.dstu2016may.model.ImplementationGuide.ImplementationGuideContactComponent(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.r4.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_14_40.convertContactPoint(t)); } @@ -150,9 +149,8 @@ public class ImplementationGuide14_40 { org.hl7.fhir.dstu2016may.model.ImplementationGuide.ImplementationGuideDependencyComponent tgt = new org.hl7.fhir.dstu2016may.model.ImplementationGuide.ImplementationGuideDependencyComponent(); VersionConvertor_14_40.copyElement(src, tgt); tgt.setType(org.hl7.fhir.dstu2016may.model.ImplementationGuide.GuideDependencyType.REFERENCE); - if (src.hasUri()) { - tgt.setUri(src.getUri()); - } + if (src.hasUriElement()) + tgt.setUriElement((org.hl7.fhir.dstu2016may.model.UriType) VersionConvertor_14_40.convertType(src.getUriElement())); return tgt; } @@ -161,9 +159,8 @@ public class ImplementationGuide14_40 { return null; org.hl7.fhir.r4.model.ImplementationGuide.ImplementationGuideDependsOnComponent tgt = new org.hl7.fhir.r4.model.ImplementationGuide.ImplementationGuideDependsOnComponent(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasUri()) { - tgt.setUri(src.getUri()); - } + if (src.hasUriElement()) + tgt.setUriElement((org.hl7.fhir.r4.model.CanonicalType) VersionConvertor_14_40.convertType(src.getUriElement())); if (org.hl7.fhir.dstu2016may.utils.ToolingExtensions.hasExtension(src, VersionConvertorConstants.IG_DEPENDSON_PACKAGE_EXTENSION)) { tgt.setPackageId(org.hl7.fhir.dstu2016may.utils.ToolingExtensions.readStringExtension(src, VersionConvertorConstants.IG_DEPENDSON_PACKAGE_EXTENSION)); } @@ -178,9 +175,8 @@ public class ImplementationGuide14_40 { return null; org.hl7.fhir.r4.model.ImplementationGuide.ImplementationGuideGlobalComponent tgt = new org.hl7.fhir.r4.model.ImplementationGuide.ImplementationGuideGlobalComponent(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasType()) { - tgt.setType(src.getType()); - } + if (src.hasTypeElement()) + tgt.setTypeElement((org.hl7.fhir.r4.model.CodeType) VersionConvertor_14_40.convertType(src.getTypeElement())); if (src.hasProfile()) { tgt.setProfileElement(VersionConvertor_14_40.convertReferenceToCanonical(src.getProfile())); } @@ -192,9 +188,8 @@ public class ImplementationGuide14_40 { return null; org.hl7.fhir.dstu2016may.model.ImplementationGuide.ImplementationGuideGlobalComponent tgt = new org.hl7.fhir.dstu2016may.model.ImplementationGuide.ImplementationGuideGlobalComponent(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasType()) { - tgt.setType(src.getType()); - } + if (src.hasTypeElement()) + tgt.setTypeElement((org.hl7.fhir.dstu2016may.model.CodeType) VersionConvertor_14_40.convertType(src.getTypeElement())); if (src.hasProfileElement()) { tgt.setProfile(VersionConvertor_14_40.convertCanonicalToReference(src.getProfileElement())); } @@ -209,8 +204,8 @@ public class ImplementationGuide14_40 { VersionConvertor_14_40.copyElement(src, tgt); if (src.hasName()) tgt.setName(src.getName()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((StringType) VersionConvertor_14_40.convertType(src.getDescriptionElement())); for (org.hl7.fhir.dstu2016may.model.ImplementationGuide.ImplementationGuidePackageResourceComponent t : src.getResource()) { org.hl7.fhir.r4.model.ImplementationGuide.ImplementationGuideDefinitionResourceComponent tn = convertImplementationGuidePackageResourceComponent(t); tn.setGroupingId(tgt.getId()); @@ -224,14 +219,13 @@ public class ImplementationGuide14_40 { return null; org.hl7.fhir.dstu2016may.model.ImplementationGuide.ImplementationGuidePackageComponent tgt = new org.hl7.fhir.dstu2016may.model.ImplementationGuide.ImplementationGuidePackageComponent(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasId()) { - tgt.setId(src.getId()); + if (src.hasIdElement()) { + tgt.setIdElement((IdType) VersionConvertor_14_40.convertType(src.getIdElement())); } - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getNameElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getDescriptionElement())); return tgt; } @@ -249,10 +243,10 @@ public class ImplementationGuide14_40 { tgt.setExample(src.getExampleBooleanType().getValue()); else tgt.setExample(false); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getNameElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getDescriptionElement())); if (src.hasReference()) tgt.setSource(VersionConvertor_14_40.convertReference(src.getReference())); return tgt; @@ -267,11 +261,11 @@ public class ImplementationGuide14_40 { Type t = VersionConvertor_14_40.convertType(src.getExampleFor()); tgt.setExample(t instanceof org.hl7.fhir.r4.model.Reference ? new CanonicalType(((org.hl7.fhir.r4.model.Reference) t).getReference()) : t); } else if (src.hasExample()) - tgt.setExample(new org.hl7.fhir.r4.model.BooleanType(src.getExample())); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + tgt.setExample(new org.hl7.fhir.r4.model.BooleanType(src.getExample())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getNameElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getDescriptionElement())); if (src.hasSourceReference()) tgt.setReference(VersionConvertor_14_40.convertReference(src.getSourceReference())); else if (src.hasSourceUriType()) @@ -286,8 +280,8 @@ public class ImplementationGuide14_40 { VersionConvertor_14_40.copyElement(src, tgt); if (src.hasSource()) tgt.setName(convertUriToUrl(src.getSourceElement())); - if (src.hasName()) { - tgt.setTitle(src.getName()); + if (src.hasNameElement()) { + tgt.setTitleElement((StringType) VersionConvertor_14_40.convertType(src.getNameElement())); } if (src.hasKind()) tgt.setGeneration(convertPageGeneration(src.getKind())); @@ -304,8 +298,8 @@ public class ImplementationGuide14_40 { VersionConvertor_14_40.copyElement(src, tgt); if (src.hasNameUrlType()) tgt.setSource(src.getNameUrlType().getValue()); - if (src.hasTitle()) { - tgt.setName(src.getTitle()); + if (src.hasTitleElement()) { + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getTitleElement())); } if (src.hasGeneration()) tgt.setKind(convertPageGeneration(src.getGeneration())); diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_40/NamingSystem14_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_40/NamingSystem14_40.java index 9dda1cfc0..55174f428 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_40/NamingSystem14_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_40/NamingSystem14_40.java @@ -1,7 +1,9 @@ package org.hl7.fhir.convertors.conv14_40; import org.hl7.fhir.convertors.VersionConvertor_14_40; +import org.hl7.fhir.dstu2016may.model.StringType; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class NamingSystem14_40 { @@ -10,25 +12,23 @@ public class NamingSystem14_40 { return null; org.hl7.fhir.r4.model.NamingSystem tgt = new org.hl7.fhir.r4.model.NamingSystem(); VersionConvertor_14_40.copyDomainResource(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_14_40.convertConformanceResourceStatus(src.getStatus())); } if (src.hasKind()) { tgt.setKind(convertNamingSystemType(src.getKind())); } - if (src.hasDate()) { - tgt.setDate(src.getDate()); - } - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.r4.model.DateTimeType) VersionConvertor_14_40.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu2016may.model.NamingSystem.NamingSystemContactComponent t : src.getContact()) tgt.addContact(convertNamingSystemContactComponent(t)); } - if (src.hasResponsible()) - tgt.setResponsible(src.getResponsible()); + if (src.hasResponsibleElement()) + tgt.setResponsibleElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getResponsibleElement())); if (src.hasType()) { tgt.setType(VersionConvertor_14_40.convertCodeableConcept(src.getType())); } @@ -38,8 +38,8 @@ public class NamingSystem14_40 { tgt.addJurisdiction(VersionConvertor_14_40.convertCodeableConcept(t)); else tgt.addUseContext(VersionConvertor_14_40.convertCodeableConceptToUsageContext(t)); - if (src.hasUsage()) - tgt.setUsage(src.getUsage()); + if (src.hasUsageElement()) + tgt.setUsageElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getUsageElement())); if (src.hasUniqueId()) { for (org.hl7.fhir.dstu2016may.model.NamingSystem.NamingSystemUniqueIdComponent t : src.getUniqueId()) tgt.addUniqueId(convertNamingSystemUniqueIdComponent(t)); } @@ -51,37 +51,35 @@ public class NamingSystem14_40 { return null; org.hl7.fhir.dstu2016may.model.NamingSystem tgt = new org.hl7.fhir.dstu2016may.model.NamingSystem(); VersionConvertor_14_40.copyDomainResource(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_14_40.convertConformanceResourceStatus(src.getStatus())); } if (src.hasKind()) { tgt.setKind(convertNamingSystemType(src.getKind())); } - if (src.hasDate()) { - tgt.setDate(src.getDate()); - } - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu2016may.model.DateTimeType) VersionConvertor_14_40.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact()) tgt.addContact(convertNamingSystemContactComponent(t)); } - if (src.hasResponsible()) - tgt.setResponsible(src.getResponsible()); + if (src.hasResponsibleElement()) + tgt.setResponsibleElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getResponsibleElement())); if (src.hasType()) { tgt.setType(VersionConvertor_14_40.convertCodeableConcept(src.getType())); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getDescriptionElement())); for (org.hl7.fhir.r4.model.UsageContext t : src.getUseContext()) if (t.hasValueCodeableConcept()) tgt.addUseContext(VersionConvertor_14_40.convertCodeableConcept(t.getValueCodeableConcept())); if (src.hasJurisdiction()) { for (org.hl7.fhir.r4.model.CodeableConcept t : src.getJurisdiction()) tgt.addUseContext(VersionConvertor_14_40.convertCodeableConcept(t)); } - if (src.hasUsage()) - tgt.setUsage(src.getUsage()); + if (src.hasUsageElement()) + tgt.setUsageElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getUsageElement())); if (src.hasUniqueId()) { for (org.hl7.fhir.r4.model.NamingSystem.NamingSystemUniqueIdComponent t : src.getUniqueId()) tgt.addUniqueId(convertNamingSystemUniqueIdComponent(t)); } @@ -93,8 +91,8 @@ public class NamingSystem14_40 { return null; org.hl7.fhir.dstu2016may.model.NamingSystem.NamingSystemContactComponent tgt = new org.hl7.fhir.dstu2016may.model.NamingSystem.NamingSystemContactComponent(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((StringType) VersionConvertor_14_40.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.r4.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_14_40.convertContactPoint(t)); } @@ -106,8 +104,8 @@ public class NamingSystem14_40 { return null; org.hl7.fhir.r4.model.ContactDetail tgt = new org.hl7.fhir.r4.model.ContactDetail(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu2016may.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_14_40.convertContactPoint(t)); } @@ -186,11 +184,10 @@ public class NamingSystem14_40 { if (src.hasType()) { tgt.setType(convertNamingSystemIdentifierType(src.getType())); } - if (src.hasValue()) { - tgt.setValue(src.getValue()); - } - if (src.hasPreferred()) - tgt.setPreferred(src.getPreferred()); + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getValueElement())); + if (src.hasPreferredElement()) + tgt.setPreferredElement((org.hl7.fhir.dstu2016may.model.BooleanType) VersionConvertor_14_40.convertType(src.getPreferredElement())); if (src.hasPeriod()) { tgt.setPeriod(VersionConvertor_14_40.convertPeriod(src.getPeriod())); } @@ -205,11 +202,10 @@ public class NamingSystem14_40 { if (src.hasType()) { tgt.setType(convertNamingSystemIdentifierType(src.getType())); } - if (src.hasValue()) { - tgt.setValue(src.getValue()); - } - if (src.hasPreferred()) - tgt.setPreferred(src.getPreferred()); + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getValueElement())); + if (src.hasPreferredElement()) + tgt.setPreferredElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_14_40.convertType(src.getPreferredElement())); if (src.hasPeriod()) { tgt.setPeriod(VersionConvertor_14_40.convertPeriod(src.getPeriod())); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_40/OperationDefinition14_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_40/OperationDefinition14_40.java index 2421abdb7..df16a1fd2 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_40/OperationDefinition14_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_40/OperationDefinition14_40.java @@ -2,8 +2,10 @@ package org.hl7.fhir.convertors.conv14_40; import org.hl7.fhir.convertors.VersionConvertorConstants; import org.hl7.fhir.convertors.VersionConvertor_14_40; +import org.hl7.fhir.dstu2016may.model.StringType; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r4.model.Type; +import java.util.Collections; public class OperationDefinition14_40 { @@ -12,25 +14,24 @@ public class OperationDefinition14_40 { return null; org.hl7.fhir.r4.model.OperationDefinition tgt = new org.hl7.fhir.r4.model.OperationDefinition(); VersionConvertor_14_40.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_14_40.convertType(src.getUrlElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_14_40.convertConformanceResourceStatus(src.getStatus())); } if (src.hasKind()) { tgt.setKind(convertOperationKind(src.getKind())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_14_40.convertType(src.getExperimentalElement())); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.r4.model.DateTimeType) VersionConvertor_14_40.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu2016may.model.OperationDefinition.OperationDefinitionContactComponent t : src.getContact()) tgt.addContact(convertOperationDefinitionContactComponent(t)); } @@ -44,24 +45,21 @@ public class OperationDefinition14_40 { tgt.setPurpose(src.getRequirements()); if (src.hasIdempotent()) tgt.setAffectsState(!src.getIdempotent()); - if (src.hasCode()) { - tgt.setCode(src.getCode()); - } + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.r4.model.CodeType) VersionConvertor_14_40.convertType(src.getCodeElement())); if (src.hasComment()) tgt.setComment(src.getComment()); if (src.hasBase()) { tgt.setBaseElement(VersionConvertor_14_40.convertReferenceToCanonical(src.getBase())); } - if (src.hasSystem()) { - tgt.setSystem(src.getSystem()); - } + if (src.hasSystemElement()) + tgt.setSystemElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_14_40.convertType(src.getSystemElement())); if (src.hasType()) { for (org.hl7.fhir.dstu2016may.model.CodeType t : src.getType()) tgt.addResource(t.getValue()); } tgt.setType(tgt.hasResource()); - if (src.hasInstance()) { - tgt.setInstance(src.getInstance()); - } + if (src.hasInstanceElement()) + tgt.setInstanceElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_14_40.convertType(src.getInstanceElement())); if (src.hasParameter()) { for (org.hl7.fhir.dstu2016may.model.OperationDefinition.OperationDefinitionParameterComponent t : src.getParameter()) tgt.addParameter(convertOperationDefinitionParameterComponent(t)); } @@ -73,30 +71,29 @@ public class OperationDefinition14_40 { return null; org.hl7.fhir.dstu2016may.model.OperationDefinition tgt = new org.hl7.fhir.dstu2016may.model.OperationDefinition(); VersionConvertor_14_40.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu2016may.model.UriType) VersionConvertor_14_40.convertType(src.getUrlElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_14_40.convertConformanceResourceStatus(src.getStatus())); } if (src.hasKind()) { tgt.setKind(convertOperationKind(src.getKind())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu2016may.model.BooleanType) VersionConvertor_14_40.convertType(src.getExperimentalElement())); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu2016may.model.DateTimeType) VersionConvertor_14_40.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact()) tgt.addContact(convertOperationDefinitionContactComponent(t)); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getDescriptionElement())); for (org.hl7.fhir.r4.model.UsageContext t : src.getUseContext()) if (t.hasValueCodeableConcept()) tgt.addUseContext(VersionConvertor_14_40.convertCodeableConcept(t.getValueCodeableConcept())); if (src.hasJurisdiction()) { @@ -106,24 +103,21 @@ public class OperationDefinition14_40 { tgt.setRequirements(src.getPurpose()); if (src.hasAffectsState()) tgt.setIdempotent(!src.getAffectsState()); - if (src.hasCode()) { - tgt.setCode(src.getCode()); - } - if (src.hasComment()) - tgt.setComment(src.getComment()); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu2016may.model.CodeType) VersionConvertor_14_40.convertType(src.getCodeElement())); + if (src.hasCommentElement()) + tgt.setCommentElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getCommentElement())); if (src.hasBaseElement()) { tgt.setBase(VersionConvertor_14_40.convertCanonicalToReference(src.getBaseElement())); } - if (src.hasSystem()) { - tgt.setSystem(src.getSystem()); - } + if (src.hasSystemElement()) + tgt.setSystemElement((org.hl7.fhir.dstu2016may.model.BooleanType) VersionConvertor_14_40.convertType(src.getSystemElement())); if (src.getType()) if (src.hasResource()) { for (org.hl7.fhir.r4.model.CodeType t : src.getResource()) tgt.addType(t.getValue()); } - if (src.hasInstance()) { - tgt.setInstance(src.getInstance()); - } + if (src.hasInstanceElement()) + tgt.setInstanceElement((org.hl7.fhir.dstu2016may.model.BooleanType) VersionConvertor_14_40.convertType(src.getInstanceElement())); if (src.hasParameter()) { for (org.hl7.fhir.r4.model.OperationDefinition.OperationDefinitionParameterComponent t : src.getParameter()) tgt.addParameter(convertOperationDefinitionParameterComponent(t)); } @@ -135,8 +129,8 @@ public class OperationDefinition14_40 { return null; org.hl7.fhir.dstu2016may.model.OperationDefinition.OperationDefinitionContactComponent tgt = new org.hl7.fhir.dstu2016may.model.OperationDefinition.OperationDefinitionContactComponent(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((StringType) VersionConvertor_14_40.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.r4.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_14_40.convertContactPoint(t)); } @@ -148,8 +142,8 @@ public class OperationDefinition14_40 { return null; org.hl7.fhir.r4.model.ContactDetail tgt = new org.hl7.fhir.r4.model.ContactDetail(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu2016may.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_14_40.convertContactPoint(t)); } @@ -194,22 +188,19 @@ public class OperationDefinition14_40 { return null; org.hl7.fhir.r4.model.OperationDefinition.OperationDefinitionParameterComponent tgt = new org.hl7.fhir.r4.model.OperationDefinition.OperationDefinitionParameterComponent(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.CodeType) VersionConvertor_14_40.convertType(src.getNameElement())); if (src.hasUse()) { tgt.setUse(convertOperationParameterUse(src.getUse())); } - if (src.hasMin()) { - tgt.setMin(src.getMin()); - } - if (src.hasMax()) { - tgt.setMax(src.getMax()); - } - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); - if (src.hasType()) - tgt.setType(src.getType()); + if (src.hasMinElement()) + tgt.setMinElement((org.hl7.fhir.r4.model.IntegerType) VersionConvertor_14_40.convertType(src.getMinElement())); + if (src.hasMaxElement()) + tgt.setMaxElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getMaxElement())); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getDocumentationElement())); + if (src.hasTypeElement()) + tgt.setTypeElement((org.hl7.fhir.r4.model.CodeType) VersionConvertor_14_40.convertType(src.getTypeElement())); if (src.hasSearchType()) { tgt.setSearchType(VersionConvertor_14_40.convertSearchParamType(src.getSearchType())); } @@ -230,22 +221,19 @@ public class OperationDefinition14_40 { return null; org.hl7.fhir.dstu2016may.model.OperationDefinition.OperationDefinitionParameterComponent tgt = new org.hl7.fhir.dstu2016may.model.OperationDefinition.OperationDefinitionParameterComponent(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.CodeType) VersionConvertor_14_40.convertType(src.getNameElement())); if (src.hasUse()) { tgt.setUse(convertOperationParameterUse(src.getUse())); } - if (src.hasMin()) { - tgt.setMin(src.getMin()); - } - if (src.hasMax()) { - tgt.setMax(src.getMax()); - } - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); - if (src.hasType()) - tgt.setType(src.getType()); + if (src.hasMinElement()) + tgt.setMinElement((org.hl7.fhir.dstu2016may.model.IntegerType) VersionConvertor_14_40.convertType(src.getMinElement())); + if (src.hasMaxElement()) + tgt.setMaxElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getMaxElement())); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getDocumentationElement())); + if (src.hasTypeElement()) + tgt.setTypeElement((org.hl7.fhir.dstu2016may.model.CodeType) VersionConvertor_14_40.convertType(src.getTypeElement())); if (src.hasSearchType()) { tgt.setSearchType(VersionConvertor_14_40.convertSearchParamType(src.getSearchType())); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_40/OperationOutcome14_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_40/OperationOutcome14_40.java index 5094da082..25fb9cecc 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_40/OperationOutcome14_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_40/OperationOutcome14_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv14_40; import org.hl7.fhir.convertors.VersionConvertor_14_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class OperationOutcome14_40 { @@ -209,8 +210,8 @@ public class OperationOutcome14_40 { if (src.hasDetails()) { tgt.setDetails(VersionConvertor_14_40.convertCodeableConcept(src.getDetails())); } - if (src.hasDiagnostics()) - tgt.setDiagnostics(src.getDiagnostics()); + if (src.hasDiagnosticsElement()) + tgt.setDiagnosticsElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getDiagnosticsElement())); if (src.hasLocation()) { for (org.hl7.fhir.r4.model.StringType t : src.getLocation()) tgt.addLocation(t.getValue()); } @@ -234,8 +235,8 @@ public class OperationOutcome14_40 { if (src.hasDetails()) { tgt.setDetails(VersionConvertor_14_40.convertCodeableConcept(src.getDetails())); } - if (src.hasDiagnostics()) - tgt.setDiagnostics(src.getDiagnostics()); + if (src.hasDiagnosticsElement()) + tgt.setDiagnosticsElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getDiagnosticsElement())); if (src.hasLocation()) { for (org.hl7.fhir.dstu2016may.model.StringType t : src.getLocation()) tgt.addLocation(t.getValue()); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_40/Parameters14_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_40/Parameters14_40.java index 420653609..6b0b48314 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_40/Parameters14_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_40/Parameters14_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv14_40; import org.hl7.fhir.convertors.VersionConvertor_14_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Parameters14_40 { @@ -32,9 +33,8 @@ public class Parameters14_40 { return null; org.hl7.fhir.r4.model.Parameters.ParametersParameterComponent tgt = new org.hl7.fhir.r4.model.Parameters.ParametersParameterComponent(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getNameElement())); if (src.hasValue()) { tgt.setValue(VersionConvertor_14_40.convertType(src.getValue())); } @@ -52,9 +52,8 @@ public class Parameters14_40 { return null; org.hl7.fhir.dstu2016may.model.Parameters.ParametersParameterComponent tgt = new org.hl7.fhir.dstu2016may.model.Parameters.ParametersParameterComponent(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getNameElement())); if (src.hasValue()) { tgt.setValue(VersionConvertor_14_40.convertType(src.getValue())); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_40/Questionnaire14_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_40/Questionnaire14_40.java index 1e36fcbff..c870643c6 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_40/Questionnaire14_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_40/Questionnaire14_40.java @@ -5,6 +5,7 @@ import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r4.model.ContactDetail; import org.hl7.fhir.r4.model.Questionnaire.QuestionnaireItemOperator; import org.hl7.fhir.r4.model.UsageContext; +import java.util.Collections; public class Questionnaire14_40 { @@ -13,20 +14,20 @@ public class Questionnaire14_40 { return null; org.hl7.fhir.r4.model.Questionnaire tgt = new org.hl7.fhir.r4.model.Questionnaire(); VersionConvertor_14_40.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_14_40.convertType(src.getUrlElement())); if (src.hasIdentifier()) { for (org.hl7.fhir.dstu2016may.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_14_40.convertIdentifier(t)); } - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getVersionElement())); if (src.hasStatus()) { tgt.setStatus(convertQuestionnaireStatus(src.getStatus())); } - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.r4.model.DateTimeType) VersionConvertor_14_40.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getPublisherElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu2016may.model.ContactPoint t : src.getTelecom()) tgt.addContact(convertQuestionnaireContactComponent(t)); } @@ -34,8 +35,8 @@ public class Questionnaire14_40 { tgt.addJurisdiction(VersionConvertor_14_40.convertCodeableConcept(t)); else tgt.addUseContext(VersionConvertor_14_40.convertCodeableConceptToUsageContext(t)); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getTitleElement())); if (src.hasConcept()) { for (org.hl7.fhir.dstu2016may.model.Coding t : src.getConcept()) tgt.addCode(VersionConvertor_14_40.convertCoding(t)); } @@ -53,20 +54,20 @@ public class Questionnaire14_40 { return null; org.hl7.fhir.dstu2016may.model.Questionnaire tgt = new org.hl7.fhir.dstu2016may.model.Questionnaire(); VersionConvertor_14_40.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu2016may.model.UriType) VersionConvertor_14_40.convertType(src.getUrlElement())); if (src.hasIdentifier()) { for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_14_40.convertIdentifier(t)); } - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getVersionElement())); if (src.hasStatus()) { tgt.setStatus(convertQuestionnaireStatus(src.getStatus())); } - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu2016may.model.DateTimeType) VersionConvertor_14_40.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getPublisherElement())); if (src.hasContact()) { for (ContactDetail t : src.getContact()) for (org.hl7.fhir.r4.model.ContactPoint t1 : t.getTelecom()) tgt.addTelecom(VersionConvertor_14_40.convertContactPoint(t1)); } @@ -76,8 +77,8 @@ public class Questionnaire14_40 { if (src.hasJurisdiction()) { for (org.hl7.fhir.r4.model.CodeableConcept t : src.getJurisdiction()) tgt.addUseContext(VersionConvertor_14_40.convertCodeableConcept(t)); } - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getTitleElement())); if (src.hasCode()) { for (org.hl7.fhir.r4.model.Coding t : src.getCode()) tgt.addConcept(VersionConvertor_14_40.convertCoding(t)); } @@ -104,29 +105,29 @@ public class Questionnaire14_40 { return null; org.hl7.fhir.r4.model.Questionnaire.QuestionnaireItemComponent tgt = new org.hl7.fhir.r4.model.Questionnaire.QuestionnaireItemComponent(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasLinkId()) - tgt.setLinkId(src.getLinkId()); + if (src.hasLinkIdElement()) + tgt.setLinkIdElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getLinkIdElement())); if (src.hasConcept()) { for (org.hl7.fhir.dstu2016may.model.Coding t : src.getConcept()) tgt.addCode(VersionConvertor_14_40.convertCoding(t)); } - if (src.hasPrefix()) - tgt.setPrefix(src.getPrefix()); - if (src.hasText()) - tgt.setText(src.getText()); + if (src.hasPrefixElement()) + tgt.setPrefixElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getPrefixElement())); + if (src.hasTextElement()) + tgt.setTextElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getTextElement())); if (src.hasType()) { tgt.setType(convertQuestionnaireItemType(src.getType())); } if (src.hasEnableWhen()) { for (org.hl7.fhir.dstu2016may.model.Questionnaire.QuestionnaireItemEnableWhenComponent t : src.getEnableWhen()) tgt.addEnableWhen(convertQuestionnaireItemEnableWhenComponent(t)); } - if (src.hasRequired()) - tgt.setRequired(src.getRequired()); - if (src.hasRepeats()) - tgt.setRepeats(src.getRepeats()); - if (src.hasReadOnly()) - tgt.setReadOnly(src.getReadOnly()); - if (src.hasMaxLength()) - tgt.setMaxLength(src.getMaxLength()); + if (src.hasRequiredElement()) + tgt.setRequiredElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_14_40.convertType(src.getRequiredElement())); + if (src.hasRepeatsElement()) + tgt.setRepeatsElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_14_40.convertType(src.getRepeatsElement())); + if (src.hasReadOnlyElement()) + tgt.setReadOnlyElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_14_40.convertType(src.getReadOnlyElement())); + if (src.hasMaxLengthElement()) + tgt.setMaxLengthElement((org.hl7.fhir.r4.model.IntegerType) VersionConvertor_14_40.convertType(src.getMaxLengthElement())); if (src.hasOptions()) { tgt.setAnswerValueSetElement(VersionConvertor_14_40.convertReferenceToCanonical(src.getOptions())); } @@ -147,29 +148,29 @@ public class Questionnaire14_40 { return null; org.hl7.fhir.dstu2016may.model.Questionnaire.QuestionnaireItemComponent tgt = new org.hl7.fhir.dstu2016may.model.Questionnaire.QuestionnaireItemComponent(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasLinkId()) - tgt.setLinkId(src.getLinkId()); + if (src.hasLinkIdElement()) + tgt.setLinkIdElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getLinkIdElement())); if (src.hasCode()) { for (org.hl7.fhir.r4.model.Coding t : src.getCode()) tgt.addConcept(VersionConvertor_14_40.convertCoding(t)); } - if (src.hasPrefix()) - tgt.setPrefix(src.getPrefix()); - if (src.hasText()) - tgt.setText(src.getText()); + if (src.hasPrefixElement()) + tgt.setPrefixElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getPrefixElement())); + if (src.hasTextElement()) + tgt.setTextElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getTextElement())); if (src.hasType()) { tgt.setType(convertQuestionnaireItemType(src.getType())); } if (src.hasEnableWhen()) { for (org.hl7.fhir.r4.model.Questionnaire.QuestionnaireItemEnableWhenComponent t : src.getEnableWhen()) tgt.addEnableWhen(convertQuestionnaireItemEnableWhenComponent(t)); } - if (src.hasRequired()) - tgt.setRequired(src.getRequired()); - if (src.hasRepeats()) - tgt.setRepeats(src.getRepeats()); - if (src.hasReadOnly()) - tgt.setReadOnly(src.getReadOnly()); - if (src.hasMaxLength()) - tgt.setMaxLength(src.getMaxLength()); + if (src.hasRequiredElement()) + tgt.setRequiredElement((org.hl7.fhir.dstu2016may.model.BooleanType) VersionConvertor_14_40.convertType(src.getRequiredElement())); + if (src.hasRepeatsElement()) + tgt.setRepeatsElement((org.hl7.fhir.dstu2016may.model.BooleanType) VersionConvertor_14_40.convertType(src.getRepeatsElement())); + if (src.hasReadOnlyElement()) + tgt.setReadOnlyElement((org.hl7.fhir.dstu2016may.model.BooleanType) VersionConvertor_14_40.convertType(src.getReadOnlyElement())); + if (src.hasMaxLengthElement()) + tgt.setMaxLengthElement((org.hl7.fhir.dstu2016may.model.IntegerType) VersionConvertor_14_40.convertType(src.getMaxLengthElement())); if (src.hasAnswerValueSetElement()) { tgt.setOptions(VersionConvertor_14_40.convertCanonicalToReference(src.getAnswerValueSetElement())); } @@ -189,9 +190,8 @@ public class Questionnaire14_40 { return null; org.hl7.fhir.r4.model.Questionnaire.QuestionnaireItemEnableWhenComponent tgt = new org.hl7.fhir.r4.model.Questionnaire.QuestionnaireItemEnableWhenComponent(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasQuestion()) { - tgt.setQuestion(src.getQuestion()); - } + if (src.hasQuestionElement()) + tgt.setQuestionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getQuestionElement())); if (src.hasAnswered()) { tgt.setOperator(QuestionnaireItemOperator.EXISTS); if (src.hasAnsweredElement()) { @@ -209,9 +209,8 @@ public class Questionnaire14_40 { return null; org.hl7.fhir.dstu2016may.model.Questionnaire.QuestionnaireItemEnableWhenComponent tgt = new org.hl7.fhir.dstu2016may.model.Questionnaire.QuestionnaireItemEnableWhenComponent(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasQuestion()) { - tgt.setQuestion(src.getQuestion()); - } + if (src.hasQuestionElement()) + tgt.setQuestionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getQuestionElement())); if (src.hasOperator() && src.getOperator() == QuestionnaireItemOperator.EXISTS) tgt.setAnswered(src.getAnswerBooleanType().getValue()); else diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_40/QuestionnaireResponse14_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_40/QuestionnaireResponse14_40.java index 3a159dd95..1b0f41fd8 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_40/QuestionnaireResponse14_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_40/QuestionnaireResponse14_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv14_40; import org.hl7.fhir.convertors.VersionConvertor_14_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class QuestionnaireResponse14_40 { @@ -28,8 +29,8 @@ public class QuestionnaireResponse14_40 { if (src.hasAuthor()) { tgt.setAuthor(VersionConvertor_14_40.convertReference(src.getAuthor())); } - if (src.hasAuthored()) - tgt.setAuthored(src.getAuthored()); + if (src.hasAuthoredElement()) + tgt.setAuthoredElement((org.hl7.fhir.r4.model.DateTimeType) VersionConvertor_14_40.convertType(src.getAuthoredElement())); if (src.hasSource()) { tgt.setSource(VersionConvertor_14_40.convertReference(src.getSource())); } @@ -62,8 +63,8 @@ public class QuestionnaireResponse14_40 { if (src.hasAuthor()) { tgt.setAuthor(VersionConvertor_14_40.convertReference(src.getAuthor())); } - if (src.hasAuthored()) - tgt.setAuthored(src.getAuthored()); + if (src.hasAuthoredElement()) + tgt.setAuthoredElement((org.hl7.fhir.dstu2016may.model.DateTimeType) VersionConvertor_14_40.convertType(src.getAuthoredElement())); if (src.hasSource()) { tgt.setSource(VersionConvertor_14_40.convertReference(src.getSource())); } @@ -106,10 +107,10 @@ public class QuestionnaireResponse14_40 { return null; org.hl7.fhir.dstu2016may.model.QuestionnaireResponse.QuestionnaireResponseItemComponent tgt = new org.hl7.fhir.dstu2016may.model.QuestionnaireResponse.QuestionnaireResponseItemComponent(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasLinkId()) - tgt.setLinkId(src.getLinkId()); - if (src.hasText()) - tgt.setText(src.getText()); + if (src.hasLinkIdElement()) + tgt.setLinkIdElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getLinkIdElement())); + if (src.hasTextElement()) + tgt.setTextElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getTextElement())); if (src.hasAnswer()) { for (org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent t : src.getAnswer()) tgt.addAnswer(convertQuestionnaireResponseItemAnswerComponent(t)); } @@ -124,10 +125,10 @@ public class QuestionnaireResponse14_40 { return null; org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseItemComponent tgt = new org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseItemComponent(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasLinkId()) - tgt.setLinkId(src.getLinkId()); - if (src.hasText()) - tgt.setText(src.getText()); + if (src.hasLinkIdElement()) + tgt.setLinkIdElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getLinkIdElement())); + if (src.hasTextElement()) + tgt.setTextElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getTextElement())); if (src.hasAnswer()) { for (org.hl7.fhir.dstu2016may.model.QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent t : src.getAnswer()) tgt.addAnswer(convertQuestionnaireResponseItemAnswerComponent(t)); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_40/SearchParameter14_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_40/SearchParameter14_40.java index 85e36ab84..b6f683d86 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_40/SearchParameter14_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_40/SearchParameter14_40.java @@ -2,6 +2,9 @@ package org.hl7.fhir.convertors.conv14_40; import org.hl7.fhir.convertors.VersionConvertor_14_40; import org.hl7.fhir.exceptions.FHIRException; +import org.hl7.fhir.r4.model.StringType; + +import java.util.Collections; public class SearchParameter14_40 { @@ -10,21 +13,19 @@ public class SearchParameter14_40 { return null; org.hl7.fhir.r4.model.SearchParameter tgt = new org.hl7.fhir.r4.model.SearchParameter(); VersionConvertor_14_40.copyDomainResource(src, tgt); - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_14_40.convertType(src.getUrlElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_14_40.convertConformanceResourceStatus(src.getStatus())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_14_40.convertType(src.getExperimentalElement())); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.r4.model.DateTimeType) VersionConvertor_14_40.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu2016may.model.SearchParameter.SearchParameterContactComponent t : src.getContact()) tgt.addContact(convertSearchParameterContactComponent(t)); } @@ -34,22 +35,19 @@ public class SearchParameter14_40 { tgt.addUseContext(VersionConvertor_14_40.convertCodeableConceptToUsageContext(t)); if (src.hasRequirements()) tgt.setPurpose(src.getRequirements()); - if (src.hasCode()) { - tgt.setCode(src.getCode()); - } - if (src.hasBase()) { - tgt.addBase(src.getBase()); - } + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.r4.model.CodeType) VersionConvertor_14_40.convertType(src.getCodeElement())); + if (src.hasBaseElement()) + tgt.setBase(Collections.singletonList((org.hl7.fhir.r4.model.CodeType) VersionConvertor_14_40.convertType(src.getBaseElement()))); if (src.hasType()) { tgt.setType(VersionConvertor_14_40.convertSearchParamType(src.getType())); } - if (src.hasDescription()) { + if (src.hasDescription()) tgt.setDescription(src.getDescription()); - } - if (src.hasExpression()) - tgt.setExpression(VersionConvertor_14_40.convertToR4Expression(src.getExpression())); - if (src.hasXpath()) - tgt.setXpath(src.getXpath()); + if (src.hasExpressionElement()) + tgt.setExpressionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getExpressionElement())); + if (src.hasXpathElement()) + tgt.setXpathElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getXpathElement())); if (src.hasXpathUsage()) { tgt.setXpathUsage(convertXPathUsageType(src.getXpathUsage())); } @@ -64,21 +62,19 @@ public class SearchParameter14_40 { return null; org.hl7.fhir.dstu2016may.model.SearchParameter tgt = new org.hl7.fhir.dstu2016may.model.SearchParameter(); VersionConvertor_14_40.copyDomainResource(src, tgt); - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu2016may.model.UriType) VersionConvertor_14_40.convertType(src.getUrlElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_14_40.convertConformanceResourceStatus(src.getStatus())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu2016may.model.BooleanType) VersionConvertor_14_40.convertType(src.getExperimentalElement())); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu2016may.model.DateTimeType) VersionConvertor_14_40.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact()) tgt.addContact(convertSearchParameterContactComponent(t)); } @@ -89,22 +85,20 @@ public class SearchParameter14_40 { } if (src.hasPurpose()) tgt.setRequirements(src.getPurpose()); - if (src.hasCode()) { - tgt.setCode(src.getCode()); - } + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu2016may.model.CodeType) VersionConvertor_14_40.convertType(src.getCodeElement())); if (src.hasBase()) { for (org.hl7.fhir.r4.model.CodeType t : src.getBase()) tgt.setBase(t.asStringValue()); } if (src.hasType()) { tgt.setType(VersionConvertor_14_40.convertSearchParamType(src.getType())); } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } - if (src.hasExpression()) - tgt.setExpression(VersionConvertor_14_40.convertTo2016MayExpression(src.getExpression())); - if (src.hasXpath()) - tgt.setXpath(src.getXpath()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getDescriptionElement())); + if (src.hasExpressionElement()) + tgt.setExpressionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getExpressionElement())); + if (src.hasXpathElement()) + tgt.setXpathElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getXpathElement())); if (src.hasXpathUsage()) { tgt.setXpathUsage(convertXPathUsageType(src.getXpathUsage())); } @@ -119,8 +113,8 @@ public class SearchParameter14_40 { return null; org.hl7.fhir.r4.model.ContactDetail tgt = new org.hl7.fhir.r4.model.ContactDetail(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((StringType) VersionConvertor_14_40.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu2016may.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_14_40.convertContactPoint(t)); } @@ -132,8 +126,8 @@ public class SearchParameter14_40 { return null; org.hl7.fhir.dstu2016may.model.SearchParameter.SearchParameterContactComponent tgt = new org.hl7.fhir.dstu2016may.model.SearchParameter.SearchParameterContactComponent(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.r4.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_14_40.convertContactPoint(t)); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_40/StructureDefinition14_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_40/StructureDefinition14_40.java index 61c46854b..61c88f3a0 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_40/StructureDefinition14_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_40/StructureDefinition14_40.java @@ -1,10 +1,12 @@ package org.hl7.fhir.convertors.conv14_40; import org.hl7.fhir.convertors.VersionConvertor_14_40; +import org.hl7.fhir.dstu2016may.model.StringType; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r4.model.ElementDefinition; import org.hl7.fhir.r4.model.StructureDefinition.TypeDerivationRule; import org.hl7.fhir.utilities.Utilities; +import java.util.Collections; public class StructureDefinition14_40 { @@ -48,32 +50,31 @@ public class StructureDefinition14_40 { return null; org.hl7.fhir.dstu2016may.model.StructureDefinition tgt = new org.hl7.fhir.dstu2016may.model.StructureDefinition(); VersionConvertor_14_40.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu2016may.model.UriType) VersionConvertor_14_40.convertType(src.getUrlElement())); if (src.hasIdentifier()) { for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_14_40.convertIdentifier(t)); } - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasTitle()) - tgt.setDisplay(src.getTitle()); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getNameElement())); + if (src.hasTitleElement()) + tgt.setDisplayElement((StringType) VersionConvertor_14_40.convertType(src.getTitleElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_14_40.convertConformanceResourceStatus(src.getStatus())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu2016may.model.BooleanType) VersionConvertor_14_40.convertType(src.getExperimentalElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact()) tgt.addContact(convertStructureDefinitionContactComponent(t)); } - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu2016may.model.DateTimeType) VersionConvertor_14_40.convertType(src.getDateElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getDescriptionElement())); for (org.hl7.fhir.r4.model.UsageContext t : src.getUseContext()) if (t.hasValueCodeableConcept()) tgt.addUseContext(VersionConvertor_14_40.convertCodeableConcept(t.getValueCodeableConcept())); if (src.hasJurisdiction()) { @@ -81,8 +82,8 @@ public class StructureDefinition14_40 { } if (src.hasPurpose()) tgt.setRequirements(src.getPurpose()); - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getCopyrightElement())); if (src.hasKeyword()) { for (org.hl7.fhir.r4.model.Coding t : src.getKeyword()) tgt.addCode(VersionConvertor_14_40.convertCoding(t)); } @@ -94,16 +95,15 @@ public class StructureDefinition14_40 { if (src.hasKind()) { tgt.setKind(convertStructureDefinitionKind(src.getKind())); } - if (src.hasAbstract()) { - tgt.setAbstract(src.getAbstract()); - } + if (src.hasAbstractElement()) + tgt.setAbstractElement((org.hl7.fhir.dstu2016may.model.BooleanType) VersionConvertor_14_40.convertType(src.getAbstractElement())); for (org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionContextComponent t : src.getContext()) { if (!tgt.hasContextType()) tgt.setContextType(convertExtensionContext(t.getType(), t.getExpression())); tgt.addContext("Element".equals(t.getExpression()) ? "*" : t.getExpression()); } - if (src.hasBaseDefinition()) - tgt.setBaseDefinition(src.getBaseDefinition()); + if (src.hasBaseDefinitionElement()) + tgt.setBaseDefinitionElement((org.hl7.fhir.dstu2016may.model.UriType) VersionConvertor_14_40.convertType(src.getBaseDefinitionElement())); if (src.hasType() && src.getDerivation() == org.hl7.fhir.r4.model.StructureDefinition.TypeDerivationRule.CONSTRAINT) tgt.setBaseType(src.getType()); if (src.hasDerivation()) { @@ -122,30 +122,29 @@ public class StructureDefinition14_40 { return null; org.hl7.fhir.r4.model.StructureDefinition tgt = new org.hl7.fhir.r4.model.StructureDefinition(); VersionConvertor_14_40.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_14_40.convertType(src.getUrlElement())); if (src.hasIdentifier()) { for (org.hl7.fhir.dstu2016may.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_14_40.convertIdentifier(t)); } - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasDisplay()) - tgt.setTitle(src.getDisplay()); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getNameElement())); + if (src.hasDisplayElement()) + tgt.setTitleElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getDisplayElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_14_40.convertConformanceResourceStatus(src.getStatus())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_14_40.convertType(src.getExperimentalElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu2016may.model.StructureDefinition.StructureDefinitionContactComponent t : src.getContact()) tgt.addContact(convertStructureDefinitionContactComponent(t)); } - if (src.hasDate()) - tgt.setDate(src.getDate()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.r4.model.DateTimeType) VersionConvertor_14_40.convertType(src.getDateElement())); if (src.hasDescription()) tgt.setDescription(src.getDescription()); for (org.hl7.fhir.dstu2016may.model.CodeableConcept t : src.getUseContext()) if (VersionConvertor_14_40.isJurisdiction(t)) @@ -167,9 +166,8 @@ public class StructureDefinition14_40 { if (src.hasKind()) { tgt.setKind(convertStructureDefinitionKind(src.getKind(), src.getName())); } - if (src.hasAbstract()) { - tgt.setAbstract(src.getAbstract()); - } + if (src.hasAbstractElement()) + tgt.setAbstractElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_14_40.convertType(src.getAbstractElement())); for (org.hl7.fhir.dstu2016may.model.StringType t : src.getContext()) { org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionContextComponent ec = tgt.addContext(); if (src.hasContextType()) { @@ -181,8 +179,8 @@ public class StructureDefinition14_40 { tgt.setType(src.getBaseType()); else tgt.setType(src.getId()); - if (src.hasBaseDefinition()) - tgt.setBaseDefinition(src.getBaseDefinition()); + if (src.hasBaseDefinitionElement()) + tgt.setBaseDefinitionElement((org.hl7.fhir.r4.model.CanonicalType) VersionConvertor_14_40.convertType(src.getBaseDefinitionElement())); if (src.hasDerivation()) { tgt.setDerivation(convertTypeDerivationRule(src.getDerivation())); } @@ -213,8 +211,8 @@ public class StructureDefinition14_40 { return null; org.hl7.fhir.r4.model.ContactDetail tgt = new org.hl7.fhir.r4.model.ContactDetail(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu2016may.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_14_40.convertContactPoint(t)); } @@ -226,8 +224,8 @@ public class StructureDefinition14_40 { return null; org.hl7.fhir.dstu2016may.model.StructureDefinition.StructureDefinitionContactComponent tgt = new org.hl7.fhir.dstu2016may.model.StructureDefinition.StructureDefinitionContactComponent(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((StringType) VersionConvertor_14_40.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.r4.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_14_40.convertContactPoint(t)); } @@ -296,15 +294,14 @@ public class StructureDefinition14_40 { return null; org.hl7.fhir.dstu2016may.model.StructureDefinition.StructureDefinitionMappingComponent tgt = new org.hl7.fhir.dstu2016may.model.StructureDefinition.StructureDefinitionMappingComponent(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasIdentity()) { - tgt.setIdentity(src.getIdentity()); - } - if (src.hasUri()) - tgt.setUri(src.getUri()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasComment()) - tgt.setComments(src.getComment()); + if (src.hasIdentityElement()) + tgt.setIdentityElement((org.hl7.fhir.dstu2016may.model.IdType) VersionConvertor_14_40.convertType(src.getIdentityElement())); + if (src.hasUriElement()) + tgt.setUriElement((org.hl7.fhir.dstu2016may.model.UriType) VersionConvertor_14_40.convertType(src.getUriElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getNameElement())); + if (src.hasCommentElement()) + tgt.setCommentsElement((StringType) VersionConvertor_14_40.convertType(src.getCommentElement())); return tgt; } @@ -313,15 +310,14 @@ public class StructureDefinition14_40 { return null; org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionMappingComponent tgt = new org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionMappingComponent(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasIdentity()) { - tgt.setIdentity(src.getIdentity()); - } - if (src.hasUri()) - tgt.setUri(src.getUri()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasComments()) - tgt.setComment(src.getComments()); + if (src.hasIdentityElement()) + tgt.setIdentityElement((org.hl7.fhir.r4.model.IdType) VersionConvertor_14_40.convertType(src.getIdentityElement())); + if (src.hasUriElement()) + tgt.setUriElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_14_40.convertType(src.getUriElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getNameElement())); + if (src.hasCommentsElement()) + tgt.setCommentElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getCommentsElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_40/StructureMap14_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_40/StructureMap14_40.java index f6878be94..7dcfdc384 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_40/StructureMap14_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_40/StructureMap14_40.java @@ -1,11 +1,13 @@ package org.hl7.fhir.convertors.conv14_40; import org.hl7.fhir.convertors.VersionConvertor_14_40; +import org.hl7.fhir.dstu2016may.model.StringType; import org.hl7.fhir.dstu2016may.model.StructureMap; import org.hl7.fhir.dstu2016may.model.StructureMap.StructureMapContextType; import org.hl7.fhir.dstu2016may.model.StructureMap.StructureMapListMode; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r4.model.Enumeration; +import java.util.Collections; public class StructureMap14_40 { @@ -14,31 +16,29 @@ public class StructureMap14_40 { return null; org.hl7.fhir.dstu2016may.model.StructureMap tgt = new org.hl7.fhir.dstu2016may.model.StructureMap(); VersionConvertor_14_40.copyDomainResource(src, tgt); - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu2016may.model.UriType) VersionConvertor_14_40.convertType(src.getUrlElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_14_40.convertConformanceResourceStatus(src.getStatus())); } if (src.hasIdentifier()) { for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_14_40.convertIdentifier(t)); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu2016may.model.BooleanType) VersionConvertor_14_40.convertType(src.getExperimentalElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact()) tgt.addContact(convertStructureMapContactComponent(t)); } - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu2016may.model.DateTimeType) VersionConvertor_14_40.convertType(src.getDateElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getDescriptionElement())); for (org.hl7.fhir.r4.model.UsageContext t : src.getUseContext()) if (t.hasValueCodeableConcept()) tgt.addUseContext(VersionConvertor_14_40.convertCodeableConcept(t.getValueCodeableConcept())); if (src.hasJurisdiction()) { @@ -46,8 +46,8 @@ public class StructureMap14_40 { } if (src.hasPurpose()) tgt.setRequirements(src.getPurpose()); - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getCopyrightElement())); if (src.hasStructure()) { for (org.hl7.fhir.r4.model.StructureMap.StructureMapStructureComponent t : src.getStructure()) tgt.addStructure(convertStructureMapStructureComponent(t)); } @@ -65,29 +65,27 @@ public class StructureMap14_40 { return null; org.hl7.fhir.r4.model.StructureMap tgt = new org.hl7.fhir.r4.model.StructureMap(); VersionConvertor_14_40.copyDomainResource(src, tgt); - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_14_40.convertType(src.getUrlElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_14_40.convertConformanceResourceStatus(src.getStatus())); } if (src.hasIdentifier()) { for (org.hl7.fhir.dstu2016may.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_14_40.convertIdentifier(t)); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_14_40.convertType(src.getExperimentalElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu2016may.model.StructureMap.StructureMapContactComponent t : src.getContact()) tgt.addContact(convertStructureMapContactComponent(t)); } - if (src.hasDate()) - tgt.setDate(src.getDate()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.r4.model.DateTimeType) VersionConvertor_14_40.convertType(src.getDateElement())); if (src.hasDescription()) tgt.setDescription(src.getDescription()); for (org.hl7.fhir.dstu2016may.model.CodeableConcept t : src.getUseContext()) if (VersionConvertor_14_40.isJurisdiction(t)) @@ -115,8 +113,8 @@ public class StructureMap14_40 { return null; org.hl7.fhir.dstu2016may.model.StructureMap.StructureMapContactComponent tgt = new org.hl7.fhir.dstu2016may.model.StructureMap.StructureMapContactComponent(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((StringType) VersionConvertor_14_40.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.r4.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_14_40.convertContactPoint(t)); } @@ -128,8 +126,8 @@ public class StructureMap14_40 { return null; org.hl7.fhir.r4.model.ContactDetail tgt = new org.hl7.fhir.r4.model.ContactDetail(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu2016may.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_14_40.convertContactPoint(t)); } @@ -167,15 +165,14 @@ public class StructureMap14_40 { return null; org.hl7.fhir.dstu2016may.model.StructureMap.StructureMapGroupComponent tgt = new org.hl7.fhir.dstu2016may.model.StructureMap.StructureMapGroupComponent(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasExtends()) - tgt.setExtends(src.getExtends()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.IdType) VersionConvertor_14_40.convertType(src.getNameElement())); + if (src.hasExtendsElement()) + tgt.setExtendsElement((org.hl7.fhir.dstu2016may.model.IdType) VersionConvertor_14_40.convertType(src.getExtendsElement())); if (!src.getTypeMode().equals(org.hl7.fhir.r4.model.StructureMap.StructureMapGroupTypeMode.NONE)) throw new FHIRException("Unable to downgrade structure map with group.typeMode other than 'None': " + src.getTypeMode().getDisplay()); - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getDocumentationElement())); if (src.hasInput()) { for (org.hl7.fhir.r4.model.StructureMap.StructureMapGroupInputComponent t : src.getInput()) tgt.addInput(convertStructureMapGroupInputComponent(t)); } @@ -190,14 +187,13 @@ public class StructureMap14_40 { return null; org.hl7.fhir.r4.model.StructureMap.StructureMapGroupComponent tgt = new org.hl7.fhir.r4.model.StructureMap.StructureMapGroupComponent(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasExtends()) - tgt.setExtends(src.getExtends()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.IdType) VersionConvertor_14_40.convertType(src.getNameElement())); + if (src.hasExtendsElement()) + tgt.setExtendsElement((org.hl7.fhir.r4.model.IdType) VersionConvertor_14_40.convertType(src.getExtendsElement())); tgt.setTypeMode(org.hl7.fhir.r4.model.StructureMap.StructureMapGroupTypeMode.NONE); - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getDocumentationElement())); if (src.hasInput()) { for (org.hl7.fhir.dstu2016may.model.StructureMap.StructureMapGroupInputComponent t : src.getInput()) tgt.addInput(convertStructureMapGroupInputComponent(t)); } @@ -212,16 +208,15 @@ public class StructureMap14_40 { return null; org.hl7.fhir.dstu2016may.model.StructureMap.StructureMapGroupInputComponent tgt = new org.hl7.fhir.dstu2016may.model.StructureMap.StructureMapGroupInputComponent(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasType()) - tgt.setType(src.getType()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.IdType) VersionConvertor_14_40.convertType(src.getNameElement())); + if (src.hasTypeElement()) + tgt.setTypeElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getTypeElement())); if (src.hasMode()) { tgt.setMode(convertStructureMapInputMode(src.getMode())); } - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getDocumentationElement())); return tgt; } @@ -230,16 +225,15 @@ public class StructureMap14_40 { return null; org.hl7.fhir.r4.model.StructureMap.StructureMapGroupInputComponent tgt = new org.hl7.fhir.r4.model.StructureMap.StructureMapGroupInputComponent(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasType()) - tgt.setType(src.getType()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.IdType) VersionConvertor_14_40.convertType(src.getNameElement())); + if (src.hasTypeElement()) + tgt.setTypeElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getTypeElement())); if (src.hasMode()) { tgt.setMode(convertStructureMapInputMode(src.getMode())); } - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getDocumentationElement())); return tgt; } @@ -248,9 +242,8 @@ public class StructureMap14_40 { return null; org.hl7.fhir.dstu2016may.model.StructureMap.StructureMapGroupRuleComponent tgt = new org.hl7.fhir.dstu2016may.model.StructureMap.StructureMapGroupRuleComponent(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.IdType) VersionConvertor_14_40.convertType(src.getNameElement())); if (src.hasSource()) { for (org.hl7.fhir.r4.model.StructureMap.StructureMapGroupRuleSourceComponent t : src.getSource()) tgt.addSource(convertStructureMapGroupRuleSourceComponent(t)); } @@ -263,8 +256,8 @@ public class StructureMap14_40 { if (src.hasDependent()) { for (org.hl7.fhir.r4.model.StructureMap.StructureMapGroupRuleDependentComponent t : src.getDependent()) tgt.addDependent(convertStructureMapGroupRuleDependentComponent(t)); } - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getDocumentationElement())); return tgt; } @@ -273,9 +266,8 @@ public class StructureMap14_40 { return null; org.hl7.fhir.r4.model.StructureMap.StructureMapGroupRuleComponent tgt = new org.hl7.fhir.r4.model.StructureMap.StructureMapGroupRuleComponent(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.IdType) VersionConvertor_14_40.convertType(src.getNameElement())); if (src.hasSource()) { for (org.hl7.fhir.dstu2016may.model.StructureMap.StructureMapGroupRuleSourceComponent t : src.getSource()) tgt.addSource(convertStructureMapGroupRuleSourceComponent(t)); } @@ -288,8 +280,8 @@ public class StructureMap14_40 { if (src.hasDependent()) { for (org.hl7.fhir.dstu2016may.model.StructureMap.StructureMapGroupRuleDependentComponent t : src.getDependent()) tgt.addDependent(convertStructureMapGroupRuleDependentComponent(t)); } - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getDocumentationElement())); return tgt; } @@ -298,9 +290,8 @@ public class StructureMap14_40 { return null; org.hl7.fhir.dstu2016may.model.StructureMap.StructureMapGroupRuleDependentComponent tgt = new org.hl7.fhir.dstu2016may.model.StructureMap.StructureMapGroupRuleDependentComponent(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.IdType) VersionConvertor_14_40.convertType(src.getNameElement())); if (src.hasVariable()) { for (org.hl7.fhir.r4.model.StringType t : src.getVariable()) tgt.addVariable(t.asStringValue()); } @@ -312,9 +303,8 @@ public class StructureMap14_40 { return null; org.hl7.fhir.r4.model.StructureMap.StructureMapGroupRuleDependentComponent tgt = new org.hl7.fhir.r4.model.StructureMap.StructureMapGroupRuleDependentComponent(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.IdType) VersionConvertor_14_40.convertType(src.getNameElement())); if (src.hasVariable()) { for (org.hl7.fhir.dstu2016may.model.StringType t : src.getVariable()) tgt.addVariable(t.asStringValue()); } @@ -330,17 +320,17 @@ public class StructureMap14_40 { tgt.setMin(src.getRequired() ? 1 : 0); } if (src.getContextType().equals(StructureMap.StructureMapContextType.TYPE)) - tgt.setType(src.getContext()); - if (src.hasElement()) - tgt.setElement(src.getElement()); + tgt.setContextElement((org.hl7.fhir.r4.model.IdType) VersionConvertor_14_40.convertType(src.getContextElement())); + if (src.hasElementElement()) + tgt.setElementElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getElementElement())); if (src.hasListMode()) tgt.setListMode(convertStructureMapSourceListMode(src.getListMode())); - if (src.hasVariable()) - tgt.setVariable(src.getVariable()); - if (src.hasCondition()) - tgt.setCondition(src.getCondition()); - if (src.hasCheck()) - tgt.setCheck(src.getCheck()); + if (src.hasVariableElement()) + tgt.setVariableElement((org.hl7.fhir.r4.model.IdType) VersionConvertor_14_40.convertType(src.getVariableElement())); + if (src.hasConditionElement()) + tgt.setConditionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getConditionElement())); + if (src.hasCheckElement()) + tgt.setCheckElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getCheckElement())); return tgt; } @@ -350,19 +340,18 @@ public class StructureMap14_40 { org.hl7.fhir.dstu2016may.model.StructureMap.StructureMapGroupRuleSourceComponent tgt = new org.hl7.fhir.dstu2016may.model.StructureMap.StructureMapGroupRuleSourceComponent(); VersionConvertor_14_40.copyElement(src, tgt); tgt.setContextType(StructureMapContextType.TYPE); - if (src.hasContext()) { - tgt.setContext(src.getContext()); - } - if (src.hasElement()) - tgt.setElement(src.getElement()); + if (src.hasContextElement()) + tgt.setContextElement((org.hl7.fhir.dstu2016may.model.IdType) VersionConvertor_14_40.convertType(src.getContextElement())); + if (src.hasElementElement()) + tgt.setElementElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getElementElement())); if (src.hasListMode()) tgt.setListMode(convertStructureMapSourceListMode(src.getListMode())); - if (src.hasVariable()) - tgt.setVariable(src.getVariable()); - if (src.hasCondition()) - tgt.setCondition(src.getCondition()); - if (src.hasCheck()) - tgt.setCheck(src.getCheck()); + if (src.hasVariableElement()) + tgt.setVariableElement((org.hl7.fhir.dstu2016may.model.IdType) VersionConvertor_14_40.convertType(src.getVariableElement())); + if (src.hasConditionElement()) + tgt.setConditionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getConditionElement())); + if (src.hasCheckElement()) + tgt.setCheckElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getCheckElement())); return tgt; } @@ -371,19 +360,19 @@ public class StructureMap14_40 { return null; org.hl7.fhir.dstu2016may.model.StructureMap.StructureMapGroupRuleTargetComponent tgt = new org.hl7.fhir.dstu2016may.model.StructureMap.StructureMapGroupRuleTargetComponent(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasContext()) - tgt.setContext(src.getContext()); + if (src.hasContextElement()) + tgt.setContextElement((org.hl7.fhir.dstu2016may.model.IdType) VersionConvertor_14_40.convertType(src.getContextElement())); if (src.hasContextType()) tgt.setContextType(convertStructureMapContextType(src.getContextType())); - if (src.hasElement()) - tgt.setElement(src.getElement()); - if (src.hasVariable()) - tgt.setVariable(src.getVariable()); + if (src.hasElementElement()) + tgt.setElementElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getElementElement())); + if (src.hasVariableElement()) + tgt.setVariableElement((org.hl7.fhir.dstu2016may.model.IdType) VersionConvertor_14_40.convertType(src.getVariableElement())); if (src.hasListMode()) { for (Enumeration t : src.getListMode()) tgt.addListMode(convertStructureMapTargetListMode(t.getValue())); } - if (src.hasListRuleId()) - tgt.setListRuleId(src.getListRuleId()); + if (src.hasListRuleIdElement()) + tgt.setListRuleIdElement((org.hl7.fhir.dstu2016may.model.IdType) VersionConvertor_14_40.convertType(src.getListRuleIdElement())); if (src.hasTransform()) tgt.setTransform(convertStructureMapTransform(src.getTransform())); if (src.hasParameter()) { @@ -397,19 +386,19 @@ public class StructureMap14_40 { return null; org.hl7.fhir.r4.model.StructureMap.StructureMapGroupRuleTargetComponent tgt = new org.hl7.fhir.r4.model.StructureMap.StructureMapGroupRuleTargetComponent(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasContext()) - tgt.setContext(src.getContext()); + if (src.hasContextElement()) + tgt.setContextElement((org.hl7.fhir.r4.model.IdType) VersionConvertor_14_40.convertType(src.getContextElement())); if (src.hasContextType()) tgt.setContextType(convertStructureMapContextType(src.getContextType())); - if (src.hasElement()) - tgt.setElement(src.getElement()); - if (src.hasVariable()) - tgt.setVariable(src.getVariable()); + if (src.hasElementElement()) + tgt.setElementElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getElementElement())); + if (src.hasVariableElement()) + tgt.setVariableElement((org.hl7.fhir.r4.model.IdType) VersionConvertor_14_40.convertType(src.getVariableElement())); if (src.hasListMode()) { for (org.hl7.fhir.dstu2016may.model.Enumeration t : src.getListMode()) VersionConvertor_14_40.copyElement(t, tgt.addListModeElement().setValue(convertStructureMapTargetListMode(t.getValue()))); } - if (src.hasListRuleId()) - tgt.setListRuleId(src.getListRuleId()); + if (src.hasListRuleIdElement()) + tgt.setListRuleIdElement((org.hl7.fhir.r4.model.IdType) VersionConvertor_14_40.convertType(src.getListRuleIdElement())); if (src.hasTransform()) tgt.setTransform(convertStructureMapTransform(src.getTransform())); if (src.hasParameter()) { @@ -497,14 +486,13 @@ public class StructureMap14_40 { return null; org.hl7.fhir.dstu2016may.model.StructureMap.StructureMapStructureComponent tgt = new org.hl7.fhir.dstu2016may.model.StructureMap.StructureMapStructureComponent(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu2016may.model.UriType) VersionConvertor_14_40.convertType(src.getUrlElement())); if (src.hasMode()) { tgt.setMode(convertStructureMapStructureMode(src.getMode())); } - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getDocumentationElement())); return tgt; } @@ -513,14 +501,13 @@ public class StructureMap14_40 { return null; org.hl7.fhir.r4.model.StructureMap.StructureMapStructureComponent tgt = new org.hl7.fhir.r4.model.StructureMap.StructureMapStructureComponent(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r4.model.CanonicalType) VersionConvertor_14_40.convertType(src.getUrlElement())); if (src.hasMode()) { tgt.setMode(convertStructureMapStructureMode(src.getMode())); } - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getDocumentationElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_40/ValueSet14_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_40/ValueSet14_40.java index fbfe56d25..f901e7ca8 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_40/ValueSet14_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_40/ValueSet14_40.java @@ -3,6 +3,9 @@ package org.hl7.fhir.convertors.conv14_40; import org.hl7.fhir.convertors.VersionConvertor_14_40; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r4.model.BooleanType; +import org.hl7.fhir.r4.model.DateType; + +import java.util.Collections; public class ValueSet14_40 { @@ -11,11 +14,10 @@ public class ValueSet14_40 { return null; org.hl7.fhir.r4.model.ValueSet.ConceptReferenceComponent tgt = new org.hl7.fhir.r4.model.ValueSet.ConceptReferenceComponent(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasCode()) { - tgt.setCode(src.getCode()); - } - if (src.hasDisplay()) - tgt.setDisplay(src.getDisplay()); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.r4.model.CodeType) VersionConvertor_14_40.convertType(src.getCodeElement())); + if (src.hasDisplayElement()) + tgt.setDisplayElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getDisplayElement())); if (src.hasDesignation()) { for (org.hl7.fhir.dstu2016may.model.ValueSet.ConceptReferenceDesignationComponent t : src.getDesignation()) tgt.addDesignation(convertConceptReferenceDesignationComponent(t)); } @@ -27,11 +29,10 @@ public class ValueSet14_40 { return null; org.hl7.fhir.dstu2016may.model.ValueSet.ConceptReferenceComponent tgt = new org.hl7.fhir.dstu2016may.model.ValueSet.ConceptReferenceComponent(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasCode()) { - tgt.setCode(src.getCode()); - } - if (src.hasDisplay()) - tgt.setDisplay(src.getDisplay()); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu2016may.model.CodeType) VersionConvertor_14_40.convertType(src.getCodeElement())); + if (src.hasDisplayElement()) + tgt.setDisplayElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getDisplayElement())); if (src.hasDesignation()) { for (org.hl7.fhir.r4.model.ValueSet.ConceptReferenceDesignationComponent t : src.getDesignation()) tgt.addDesignation(convertConceptReferenceDesignationComponent(t)); } @@ -43,14 +44,13 @@ public class ValueSet14_40 { return null; org.hl7.fhir.dstu2016may.model.ValueSet.ConceptReferenceDesignationComponent tgt = new org.hl7.fhir.dstu2016may.model.ValueSet.ConceptReferenceDesignationComponent(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasLanguage()) - tgt.setLanguage(src.getLanguage()); + if (src.hasLanguageElement()) + tgt.setLanguageElement((org.hl7.fhir.dstu2016may.model.CodeType) VersionConvertor_14_40.convertType(src.getLanguageElement())); if (src.hasUse()) { tgt.setUse(VersionConvertor_14_40.convertCoding(src.getUse())); } - if (src.hasValue()) { - tgt.setValue(src.getValue()); - } + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getValueElement())); return tgt; } @@ -59,14 +59,13 @@ public class ValueSet14_40 { return null; org.hl7.fhir.r4.model.ValueSet.ConceptReferenceDesignationComponent tgt = new org.hl7.fhir.r4.model.ValueSet.ConceptReferenceDesignationComponent(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasLanguage()) - tgt.setLanguage(src.getLanguage()); + if (src.hasLanguageElement()) + tgt.setLanguageElement((org.hl7.fhir.r4.model.CodeType) VersionConvertor_14_40.convertType(src.getLanguageElement())); if (src.hasUse()) { tgt.setUse(VersionConvertor_14_40.convertCoding(src.getUse())); } - if (src.hasValue()) { - tgt.setValue(src.getValue()); - } + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getValueElement())); return tgt; } @@ -75,11 +74,10 @@ public class ValueSet14_40 { return null; org.hl7.fhir.r4.model.ValueSet.ConceptSetComponent tgt = new org.hl7.fhir.r4.model.ValueSet.ConceptSetComponent(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasSystem()) { - tgt.setSystem(src.getSystem()); - } - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); + if (src.hasSystemElement()) + tgt.setSystemElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_14_40.convertType(src.getSystemElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getVersionElement())); if (src.hasConcept()) { for (org.hl7.fhir.dstu2016may.model.ValueSet.ConceptReferenceComponent t : src.getConcept()) tgt.addConcept(convertConceptReferenceComponent(t)); } @@ -94,11 +92,10 @@ public class ValueSet14_40 { return null; org.hl7.fhir.dstu2016may.model.ValueSet.ConceptSetComponent tgt = new org.hl7.fhir.dstu2016may.model.ValueSet.ConceptSetComponent(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasSystem()) { - tgt.setSystem(src.getSystem()); - } - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); + if (src.hasSystemElement()) + tgt.setSystemElement((org.hl7.fhir.dstu2016may.model.UriType) VersionConvertor_14_40.convertType(src.getSystemElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getVersionElement())); if (src.hasConcept()) { for (org.hl7.fhir.r4.model.ValueSet.ConceptReferenceComponent t : src.getConcept()) tgt.addConcept(convertConceptReferenceComponent(t)); } @@ -113,15 +110,13 @@ public class ValueSet14_40 { return null; org.hl7.fhir.r4.model.ValueSet.ConceptSetFilterComponent tgt = new org.hl7.fhir.r4.model.ValueSet.ConceptSetFilterComponent(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasProperty()) { - tgt.setProperty(src.getProperty()); - } + if (src.hasPropertyElement()) + tgt.setPropertyElement((org.hl7.fhir.r4.model.CodeType) VersionConvertor_14_40.convertType(src.getPropertyElement())); if (src.hasOp()) { tgt.setOp(convertFilterOperator(src.getOp())); } - if (src.hasValue()) { - tgt.setValue(src.getValue()); - } + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getValueElement())); return tgt; } @@ -130,15 +125,13 @@ public class ValueSet14_40 { return null; org.hl7.fhir.dstu2016may.model.ValueSet.ConceptSetFilterComponent tgt = new org.hl7.fhir.dstu2016may.model.ValueSet.ConceptSetFilterComponent(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasProperty()) { - tgt.setProperty(src.getProperty()); - } + if (src.hasPropertyElement()) + tgt.setPropertyElement((org.hl7.fhir.dstu2016may.model.CodeType) VersionConvertor_14_40.convertType(src.getPropertyElement())); if (src.hasOp()) { tgt.setOp(convertFilterOperator(src.getOp())); } - if (src.hasValue()) { - tgt.setValue(src.getValue()); - } + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.dstu2016may.model.CodeType) VersionConvertor_14_40.convertType(src.getValueElement())); return tgt; } @@ -189,34 +182,34 @@ public class ValueSet14_40 { return null; org.hl7.fhir.r4.model.ValueSet tgt = new org.hl7.fhir.r4.model.ValueSet(); VersionConvertor_14_40.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_14_40.convertType(src.getUrlElement())); if (src.hasIdentifier()) tgt.addIdentifier(VersionConvertor_14_40.convertIdentifier(src.getIdentifier())); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_14_40.convertConformanceResourceStatus(src.getStatus())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_14_40.convertType(src.getExperimentalElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu2016may.model.ValueSet.ValueSetContactComponent t : src.getContact()) tgt.addContact(convertValueSetContactComponent(t)); } - if (src.hasDate()) - tgt.setDate(src.getDate()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.r4.model.DateTimeType) VersionConvertor_14_40.convertType(src.getDateElement())); if (src.hasDescription()) tgt.setDescription(src.getDescription()); for (org.hl7.fhir.dstu2016may.model.CodeableConcept t : src.getUseContext()) if (VersionConvertor_14_40.isJurisdiction(t)) tgt.addJurisdiction(VersionConvertor_14_40.convertCodeableConcept(t)); else tgt.addUseContext(VersionConvertor_14_40.convertCodeableConceptToUsageContext(t)); - if (src.hasImmutable()) - tgt.setImmutable(src.getImmutable()); + if (src.hasImmutableElement()) + tgt.setImmutableElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_14_40.convertType(src.getImmutableElement())); if (src.hasRequirements()) tgt.setPurpose(src.getRequirements()); if (src.hasCopyright()) @@ -226,8 +219,8 @@ public class ValueSet14_40 { if (src.hasCompose()) { tgt.setCompose(convertValueSetComposeComponent(src.getCompose())); } - if (src.hasLockedDate()) - tgt.getCompose().setLockedDate(src.getLockedDate()); + if (src.hasLockedDateElement()) + tgt.getCompose().setLockedDateElement((DateType) VersionConvertor_14_40.convertType(src.getLockedDateElement())); if (src.hasExpansion()) { tgt.setExpansion(convertValueSetExpansionComponent(src.getExpansion())); } @@ -239,42 +232,42 @@ public class ValueSet14_40 { return null; org.hl7.fhir.dstu2016may.model.ValueSet tgt = new org.hl7.fhir.dstu2016may.model.ValueSet(); VersionConvertor_14_40.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu2016may.model.UriType) VersionConvertor_14_40.convertType(src.getUrlElement())); if (src.hasIdentifier()) { for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) tgt.setIdentifier(VersionConvertor_14_40.convertIdentifier(t)); } - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_14_40.convertConformanceResourceStatus(src.getStatus())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu2016may.model.BooleanType) VersionConvertor_14_40.convertType(src.getExperimentalElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact()) tgt.addContact(convertValueSetContactComponent(t)); } - if (src.hasDate()) - tgt.setDate(src.getDate()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu2016may.model.DateTimeType) VersionConvertor_14_40.convertType(src.getDateElement())); if (src.getCompose().hasLockedDate()) tgt.setLockedDate(src.getCompose().getLockedDate()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getDescriptionElement())); for (org.hl7.fhir.r4.model.UsageContext t : src.getUseContext()) if (t.hasValueCodeableConcept()) tgt.addUseContext(VersionConvertor_14_40.convertCodeableConcept(t.getValueCodeableConcept())); if (src.hasJurisdiction()) { for (org.hl7.fhir.r4.model.CodeableConcept t : src.getJurisdiction()) tgt.addUseContext(VersionConvertor_14_40.convertCodeableConcept(t)); } - if (src.hasImmutable()) - tgt.setImmutable(src.getImmutable()); + if (src.hasImmutableElement()) + tgt.setImmutableElement((org.hl7.fhir.dstu2016may.model.BooleanType) VersionConvertor_14_40.convertType(src.getImmutableElement())); if (src.hasPurpose()) tgt.setRequirements(src.getPurpose()); - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getCopyrightElement())); if (src.hasExtension("http://hl7.org/fhir/StructureDefinition/valueset-extensible")) tgt.setExtensible(((BooleanType) src.getExtensionByUrl("http://hl7.org/fhir/StructureDefinition/valueset-extensible").getValue()).booleanValue()); if (src.hasCompose()) { @@ -322,8 +315,8 @@ public class ValueSet14_40 { return null; org.hl7.fhir.dstu2016may.model.ValueSet.ValueSetContactComponent tgt = new org.hl7.fhir.dstu2016may.model.ValueSet.ValueSetContactComponent(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.r4.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_14_40.convertContactPoint(t)); } @@ -335,8 +328,8 @@ public class ValueSet14_40 { return null; org.hl7.fhir.r4.model.ContactDetail tgt = new org.hl7.fhir.r4.model.ContactDetail(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu2016may.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_14_40.convertContactPoint(t)); } @@ -348,16 +341,14 @@ public class ValueSet14_40 { return null; org.hl7.fhir.dstu2016may.model.ValueSet.ValueSetExpansionComponent tgt = new org.hl7.fhir.dstu2016may.model.ValueSet.ValueSetExpansionComponent(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasIdentifier()) { - tgt.setIdentifier(src.getIdentifier()); - } - if (src.hasTimestamp()) { - tgt.setTimestamp(src.getTimestamp()); - } - if (src.hasTotal()) - tgt.setTotal(src.getTotal()); - if (src.hasOffset()) - tgt.setOffset(src.getOffset()); + if (src.hasIdentifierElement()) + tgt.setIdentifierElement((org.hl7.fhir.dstu2016may.model.UriType) VersionConvertor_14_40.convertType(src.getIdentifierElement())); + if (src.hasTimestampElement()) + tgt.setTimestampElement((org.hl7.fhir.dstu2016may.model.DateTimeType) VersionConvertor_14_40.convertType(src.getTimestampElement())); + if (src.hasTotalElement()) + tgt.setTotalElement((org.hl7.fhir.dstu2016may.model.IntegerType) VersionConvertor_14_40.convertType(src.getTotalElement())); + if (src.hasOffsetElement()) + tgt.setOffsetElement((org.hl7.fhir.dstu2016may.model.IntegerType) VersionConvertor_14_40.convertType(src.getOffsetElement())); if (src.hasParameter()) { for (org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionParameterComponent t : src.getParameter()) tgt.addParameter(convertValueSetExpansionParameterComponent(t)); } @@ -372,16 +363,14 @@ public class ValueSet14_40 { return null; org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionComponent tgt = new org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionComponent(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasIdentifier()) { - tgt.setIdentifier(src.getIdentifier()); - } - if (src.hasTimestamp()) { - tgt.setTimestamp(src.getTimestamp()); - } - if (src.hasTotal()) - tgt.setTotal(src.getTotal()); - if (src.hasOffset()) - tgt.setOffset(src.getOffset()); + if (src.hasIdentifierElement()) + tgt.setIdentifierElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_14_40.convertType(src.getIdentifierElement())); + if (src.hasTimestampElement()) + tgt.setTimestampElement((org.hl7.fhir.r4.model.DateTimeType) VersionConvertor_14_40.convertType(src.getTimestampElement())); + if (src.hasTotalElement()) + tgt.setTotalElement((org.hl7.fhir.r4.model.IntegerType) VersionConvertor_14_40.convertType(src.getTotalElement())); + if (src.hasOffsetElement()) + tgt.setOffsetElement((org.hl7.fhir.r4.model.IntegerType) VersionConvertor_14_40.convertType(src.getOffsetElement())); if (src.hasParameter()) { for (org.hl7.fhir.dstu2016may.model.ValueSet.ValueSetExpansionParameterComponent t : src.getParameter()) tgt.addParameter(convertValueSetExpansionParameterComponent(t)); } @@ -396,16 +385,16 @@ public class ValueSet14_40 { return null; org.hl7.fhir.dstu2016may.model.ValueSet.ValueSetExpansionContainsComponent tgt = new org.hl7.fhir.dstu2016may.model.ValueSet.ValueSetExpansionContainsComponent(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasSystem()) - tgt.setSystem(src.getSystem()); - if (src.hasAbstract()) - tgt.setAbstract(src.getAbstract()); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasCode()) - tgt.setCode(src.getCode()); - if (src.hasDisplay()) - tgt.setDisplay(src.getDisplay()); + if (src.hasSystemElement()) + tgt.setSystemElement((org.hl7.fhir.dstu2016may.model.UriType) VersionConvertor_14_40.convertType(src.getSystemElement())); + if (src.hasAbstractElement()) + tgt.setAbstractElement((org.hl7.fhir.dstu2016may.model.BooleanType) VersionConvertor_14_40.convertType(src.getAbstractElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getVersionElement())); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu2016may.model.CodeType) VersionConvertor_14_40.convertType(src.getCodeElement())); + if (src.hasDisplayElement()) + tgt.setDisplayElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getDisplayElement())); if (src.hasContains()) { for (org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionContainsComponent t : src.getContains()) tgt.addContains(convertValueSetExpansionContainsComponent(t)); } @@ -417,16 +406,16 @@ public class ValueSet14_40 { return null; org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionContainsComponent tgt = new org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionContainsComponent(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasSystem()) - tgt.setSystem(src.getSystem()); - if (src.hasAbstract()) - tgt.setAbstract(src.getAbstract()); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasCode()) - tgt.setCode(src.getCode()); - if (src.hasDisplay()) - tgt.setDisplay(src.getDisplay()); + if (src.hasSystemElement()) + tgt.setSystemElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_14_40.convertType(src.getSystemElement())); + if (src.hasAbstractElement()) + tgt.setAbstractElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_14_40.convertType(src.getAbstractElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getVersionElement())); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.r4.model.CodeType) VersionConvertor_14_40.convertType(src.getCodeElement())); + if (src.hasDisplayElement()) + tgt.setDisplayElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getDisplayElement())); if (src.hasContains()) { for (org.hl7.fhir.dstu2016may.model.ValueSet.ValueSetExpansionContainsComponent t : src.getContains()) tgt.addContains(convertValueSetExpansionContainsComponent(t)); } @@ -438,9 +427,8 @@ public class ValueSet14_40 { return null; org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionParameterComponent tgt = new org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionParameterComponent(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_14_40.convertType(src.getNameElement())); if (src.hasValue()) { tgt.setValue(VersionConvertor_14_40.convertType(src.getValue())); } @@ -452,9 +440,8 @@ public class ValueSet14_40 { return null; org.hl7.fhir.dstu2016may.model.ValueSet.ValueSetExpansionParameterComponent tgt = new org.hl7.fhir.dstu2016may.model.ValueSet.ValueSetExpansionParameterComponent(); VersionConvertor_14_40.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_40.convertType(src.getNameElement())); if (src.hasValue()) { tgt.setValue(VersionConvertor_14_40.convertType(src.getValue())); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/parser/Parser.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/parser/Parser.java index 155ed6c06..7712e7e4c 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/parser/Parser.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/parser/Parser.java @@ -92,7 +92,7 @@ public class Parser { // VERSION_FILES.forEach(version -> { - String version = "14_30"; + String version = "14_40"; List filenames = listAllJavaFilesInDirectory(new File("").getAbsolutePath() + "/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv" + version + "/"); System.out.println("Checking the following files:"); Collections.sort(filenames); From 10eb8b98e4d300da5161610377e8c0f9fe8ccb95 Mon Sep 17 00:00:00 2001 From: markiantorno Date: Fri, 7 Feb 2020 14:24:23 -0500 Subject: [PATCH 09/12] convo14_50 upadted. --- .../convertors/conv14_50/Bundle14_50.java | 121 +++++---- .../convertors/conv14_50/CodeSystem14_50.java | 208 ++++++++------- .../conv14_50/CompartmentDefinition14_50.java | 88 +++---- .../convertors/conv14_50/ConceptMap14_50.java | 134 +++++----- .../conv14_50/Conformance14_50.java | 183 ++++++------- .../conv14_50/DataElement14_50.java | 50 ++-- .../conv14_50/ImplementationGuide14_50.java | 138 +++++----- .../conv14_50/NamingSystem14_50.java | 76 +++--- .../conv14_50/OperationDefinition14_50.java | 142 +++++------ .../conv14_50/OperationOutcome14_50.java | 9 +- .../convertors/conv14_50/Parameters14_50.java | 11 +- .../conv14_50/Questionnaire14_50.java | 107 ++++---- .../conv14_50/QuestionnaireResponse14_50.java | 25 +- .../conv14_50/SearchParameter14_50.java | 94 ++++--- .../conv14_50/StructureDefinition14_50.java | 128 +++++----- .../conv14_50/StructureMap14_50.java | 240 +++++++++--------- .../convertors/conv14_50/ValueSet14_50.java | 233 ++++++++--------- .../hl7/fhir/convertors/parser/Parser.java | 2 +- 18 files changed, 958 insertions(+), 1031 deletions(-) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/Bundle14_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/Bundle14_50.java index becb96bd3..44bba695b 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/Bundle14_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/Bundle14_50.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv14_50; import org.hl7.fhir.convertors.VersionConvertor_14_50; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Bundle14_50 { @@ -13,8 +14,8 @@ public class Bundle14_50 { if (src.hasType()) { tgt.setType(convertBundleType(src.getType())); } - if (src.hasTotal()) - tgt.setTotal(src.getTotal()); + if (src.hasTotalElement()) + tgt.setTotalElement((org.hl7.fhir.r5.model.UnsignedIntType) VersionConvertor_14_50.convertType(src.getTotalElement())); if (src.hasLink()) { for (org.hl7.fhir.dstu2016may.model.Bundle.BundleLinkComponent t : src.getLink()) tgt.addLink(convertBundleLinkComponent(t)); } @@ -35,8 +36,8 @@ public class Bundle14_50 { if (src.hasType()) { tgt.setType(convertBundleType(src.getType())); } - if (src.hasTotal()) - tgt.setTotal(src.getTotal()); + if (src.hasTotalElement()) + tgt.setTotalElement((org.hl7.fhir.dstu2016may.model.UnsignedIntType) VersionConvertor_14_50.convertType(src.getTotalElement())); if (src.hasLink()) { for (org.hl7.fhir.r5.model.Bundle.BundleLinkComponent t : src.getLink()) tgt.addLink(convertBundleLinkComponent(t)); } @@ -57,8 +58,8 @@ public class Bundle14_50 { if (src.hasLink()) { for (org.hl7.fhir.r5.model.Bundle.BundleLinkComponent t : src.getLink()) tgt.addLink(convertBundleLinkComponent(t)); } - if (src.hasFullUrl()) - tgt.setFullUrl(src.getFullUrl()); + if (src.hasFullUrlElement()) + tgt.setFullUrlElement((org.hl7.fhir.dstu2016may.model.UriType) VersionConvertor_14_50.convertType(src.getFullUrlElement())); if (src.hasResource()) { tgt.setResource(VersionConvertor_14_50.convertResource(src.getResource())); } @@ -82,8 +83,8 @@ public class Bundle14_50 { if (src.hasLink()) { for (org.hl7.fhir.dstu2016may.model.Bundle.BundleLinkComponent t : src.getLink()) tgt.addLink(convertBundleLinkComponent(t)); } - if (src.hasFullUrl()) - tgt.setFullUrl(src.getFullUrl()); + if (src.hasFullUrlElement()) + tgt.setFullUrlElement((org.hl7.fhir.r5.model.UriType) VersionConvertor_14_50.convertType(src.getFullUrlElement())); if (src.hasResource()) { tgt.setResource(VersionConvertor_14_50.convertResource(src.getResource())); } @@ -107,17 +108,16 @@ public class Bundle14_50 { if (src.hasMethod()) { tgt.setMethod(convertHTTPVerb(src.getMethod())); } - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } - if (src.hasIfNoneMatch()) - tgt.setIfNoneMatch(src.getIfNoneMatch()); - if (src.hasIfModifiedSince()) - tgt.setIfModifiedSince(src.getIfModifiedSince()); - if (src.hasIfMatch()) - tgt.setIfMatch(src.getIfMatch()); - if (src.hasIfNoneExist()) - tgt.setIfNoneExist(src.getIfNoneExist()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu2016may.model.UriType) VersionConvertor_14_50.convertType(src.getUrlElement())); + if (src.hasIfNoneMatchElement()) + tgt.setIfNoneMatchElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getIfNoneMatchElement())); + if (src.hasIfModifiedSinceElement()) + tgt.setIfModifiedSinceElement((org.hl7.fhir.dstu2016may.model.InstantType) VersionConvertor_14_50.convertType(src.getIfModifiedSinceElement())); + if (src.hasIfMatchElement()) + tgt.setIfMatchElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getIfMatchElement())); + if (src.hasIfNoneExistElement()) + tgt.setIfNoneExistElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getIfNoneExistElement())); return tgt; } @@ -129,17 +129,16 @@ public class Bundle14_50 { if (src.hasMethod()) { tgt.setMethod(convertHTTPVerb(src.getMethod())); } - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } - if (src.hasIfNoneMatch()) - tgt.setIfNoneMatch(src.getIfNoneMatch()); - if (src.hasIfModifiedSince()) - tgt.setIfModifiedSince(src.getIfModifiedSince()); - if (src.hasIfMatch()) - tgt.setIfMatch(src.getIfMatch()); - if (src.hasIfNoneExist()) - tgt.setIfNoneExist(src.getIfNoneExist()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r5.model.UriType) VersionConvertor_14_50.convertType(src.getUrlElement())); + if (src.hasIfNoneMatchElement()) + tgt.setIfNoneMatchElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getIfNoneMatchElement())); + if (src.hasIfModifiedSinceElement()) + tgt.setIfModifiedSinceElement((org.hl7.fhir.r5.model.InstantType) VersionConvertor_14_50.convertType(src.getIfModifiedSinceElement())); + if (src.hasIfMatchElement()) + tgt.setIfMatchElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getIfMatchElement())); + if (src.hasIfNoneExistElement()) + tgt.setIfNoneExistElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getIfNoneExistElement())); return tgt; } @@ -148,15 +147,14 @@ public class Bundle14_50 { return null; org.hl7.fhir.dstu2016may.model.Bundle.BundleEntryResponseComponent tgt = new org.hl7.fhir.dstu2016may.model.Bundle.BundleEntryResponseComponent(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasStatus()) { - tgt.setStatus(src.getStatus()); - } - if (src.hasLocation()) - tgt.setLocation(src.getLocation()); - if (src.hasEtag()) - tgt.setEtag(src.getEtag()); - if (src.hasLastModified()) - tgt.setLastModified(src.getLastModified()); + if (src.hasStatusElement()) + tgt.setStatusElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getStatusElement())); + if (src.hasLocationElement()) + tgt.setLocationElement((org.hl7.fhir.dstu2016may.model.UriType) VersionConvertor_14_50.convertType(src.getLocationElement())); + if (src.hasEtagElement()) + tgt.setEtagElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getEtagElement())); + if (src.hasLastModifiedElement()) + tgt.setLastModifiedElement((org.hl7.fhir.dstu2016may.model.InstantType) VersionConvertor_14_50.convertType(src.getLastModifiedElement())); return tgt; } @@ -165,15 +163,14 @@ public class Bundle14_50 { return null; org.hl7.fhir.r5.model.Bundle.BundleEntryResponseComponent tgt = new org.hl7.fhir.r5.model.Bundle.BundleEntryResponseComponent(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasStatus()) { - tgt.setStatus(src.getStatus()); - } - if (src.hasLocation()) - tgt.setLocation(src.getLocation()); - if (src.hasEtag()) - tgt.setEtag(src.getEtag()); - if (src.hasLastModified()) - tgt.setLastModified(src.getLastModified()); + if (src.hasStatusElement()) + tgt.setStatusElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getStatusElement())); + if (src.hasLocationElement()) + tgt.setLocationElement((org.hl7.fhir.r5.model.UriType) VersionConvertor_14_50.convertType(src.getLocationElement())); + if (src.hasEtagElement()) + tgt.setEtagElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getEtagElement())); + if (src.hasLastModifiedElement()) + tgt.setLastModifiedElement((org.hl7.fhir.r5.model.InstantType) VersionConvertor_14_50.convertType(src.getLastModifiedElement())); return tgt; } @@ -185,8 +182,8 @@ public class Bundle14_50 { if (src.hasMode()) { tgt.setMode(convertSearchEntryMode(src.getMode())); } - if (src.hasScore()) - tgt.setScore(src.getScore()); + if (src.hasScoreElement()) + tgt.setScoreElement((org.hl7.fhir.dstu2016may.model.DecimalType) VersionConvertor_14_50.convertType(src.getScoreElement())); return tgt; } @@ -198,8 +195,8 @@ public class Bundle14_50 { if (src.hasMode()) { tgt.setMode(convertSearchEntryMode(src.getMode())); } - if (src.hasScore()) - tgt.setScore(src.getScore()); + if (src.hasScoreElement()) + tgt.setScoreElement((org.hl7.fhir.r5.model.DecimalType) VersionConvertor_14_50.convertType(src.getScoreElement())); return tgt; } @@ -208,12 +205,10 @@ public class Bundle14_50 { return null; org.hl7.fhir.dstu2016may.model.Bundle.BundleLinkComponent tgt = new org.hl7.fhir.dstu2016may.model.Bundle.BundleLinkComponent(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasRelation()) { - tgt.setRelation(src.getRelation()); - } - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } + if (src.hasRelationElement()) + tgt.setRelationElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getRelationElement())); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu2016may.model.UriType) VersionConvertor_14_50.convertType(src.getUrlElement())); return tgt; } @@ -222,12 +217,10 @@ public class Bundle14_50 { return null; org.hl7.fhir.r5.model.Bundle.BundleLinkComponent tgt = new org.hl7.fhir.r5.model.Bundle.BundleLinkComponent(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasRelation()) { - tgt.setRelation(src.getRelation()); - } - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } + if (src.hasRelationElement()) + tgt.setRelationElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getRelationElement())); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r5.model.UriType) VersionConvertor_14_50.convertType(src.getUrlElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/CodeSystem14_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/CodeSystem14_50.java index f230297a1..99a518965 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/CodeSystem14_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/CodeSystem14_50.java @@ -1,11 +1,14 @@ package org.hl7.fhir.convertors.conv14_50; +import org.hl7.fhir.convertors.VersionConvertor_14_40; import org.hl7.fhir.convertors.VersionConvertor_14_50; import org.hl7.fhir.dstu2016may.model.CodeSystem.ConceptDefinitionPropertyComponent; +import org.hl7.fhir.dstu2016may.model.StringType; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r5.model.Enumeration; import org.hl7.fhir.r5.model.Enumerations; import org.hl7.fhir.r5.model.Enumerations.FilterOperator; +import java.util.Collections; public class CodeSystem14_50 { @@ -14,28 +17,28 @@ public class CodeSystem14_50 { return null; org.hl7.fhir.dstu2016may.model.CodeSystem tgt = new org.hl7.fhir.dstu2016may.model.CodeSystem(); VersionConvertor_14_50.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu2016may.model.UriType) VersionConvertor_14_50.convertType(src.getUrlElement())); if (src.hasIdentifier()) tgt.setIdentifier(VersionConvertor_14_50.convertIdentifier(src.getIdentifierFirstRep())); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_14_50.convertConformanceResourceStatus(src.getStatus())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu2016may.model.BooleanType) VersionConvertor_14_50.convertType(src.getExperimentalElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.r5.model.ContactDetail t : src.getContact()) tgt.addContact(convertCodeSystemContactComponent(t)); } - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu2016may.model.DateTimeType) VersionConvertor_14_50.convertType(src.getDateElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getDescriptionElement())); for (org.hl7.fhir.r5.model.UsageContext t : src.getUseContext()) if (t.hasValueCodeableConcept()) tgt.addUseContext(VersionConvertor_14_50.convertCodeableConcept(t.getValueCodeableConcept())); if (src.hasJurisdiction()) { @@ -43,21 +46,21 @@ public class CodeSystem14_50 { } if (src.hasPurpose()) tgt.setRequirements(src.getPurpose()); - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); - if (src.hasCaseSensitive()) - tgt.setCaseSensitive(src.getCaseSensitive()); - if (src.hasValueSet()) - tgt.setValueSet(src.getValueSet()); - if (src.hasCompositional()) - tgt.setCompositional(src.getCompositional()); - if (src.hasVersionNeeded()) - tgt.setVersionNeeded(src.getVersionNeeded()); + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getCopyrightElement())); + if (src.hasCaseSensitiveElement()) + tgt.setCaseSensitiveElement((org.hl7.fhir.dstu2016may.model.BooleanType) VersionConvertor_14_50.convertType(src.getCaseSensitiveElement())); + if (src.hasValueSetElement()) + tgt.setValueSetElement((org.hl7.fhir.dstu2016may.model.UriType) VersionConvertor_14_50.convertType(src.getValueSetElement())); + if (src.hasCompositionalElement()) + tgt.setCompositionalElement((org.hl7.fhir.dstu2016may.model.BooleanType) VersionConvertor_14_50.convertType(src.getCompositionalElement())); + if (src.hasVersionNeededElement()) + tgt.setVersionNeededElement((org.hl7.fhir.dstu2016may.model.BooleanType) VersionConvertor_14_50.convertType(src.getVersionNeededElement())); if (src.hasContent()) { tgt.setContent(convertCodeSystemContentMode(src.getContent())); } - if (src.hasCount()) - tgt.setCount(src.getCount()); + if (src.hasCountElement()) + tgt.setCountElement((org.hl7.fhir.dstu2016may.model.UnsignedIntType) VersionConvertor_14_50.convertType(src.getCountElement())); if (src.hasFilter()) { for (org.hl7.fhir.r5.model.CodeSystem.CodeSystemFilterComponent t : src.getFilter()) tgt.addFilter(convertCodeSystemFilterComponent(t)); } @@ -75,26 +78,26 @@ public class CodeSystem14_50 { return null; org.hl7.fhir.r5.model.CodeSystem tgt = new org.hl7.fhir.r5.model.CodeSystem(); VersionConvertor_14_50.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r5.model.UriType) VersionConvertor_14_50.convertType(src.getUrlElement())); if (src.hasIdentifier()) tgt.addIdentifier(VersionConvertor_14_50.convertIdentifier(src.getIdentifier())); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_14_50.convertConformanceResourceStatus(src.getStatus())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_14_50.convertType(src.getExperimentalElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu2016may.model.CodeSystem.CodeSystemContactComponent t : src.getContact()) tgt.addContact(convertCodeSystemContactComponent(t)); } - if (src.hasDate()) - tgt.setDate(src.getDate()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.r5.model.DateTimeType) VersionConvertor_14_50.convertType(src.getDateElement())); if (src.hasDescription()) tgt.setDescription(src.getDescription()); for (org.hl7.fhir.dstu2016may.model.CodeableConcept t : src.getUseContext()) if (VersionConvertor_14_50.isJurisdiction(t)) @@ -105,19 +108,19 @@ public class CodeSystem14_50 { tgt.setPurpose(src.getRequirements()); if (src.hasCopyright()) tgt.setCopyright(src.getCopyright()); - if (src.hasCaseSensitive()) - tgt.setCaseSensitive(src.getCaseSensitive()); - if (src.hasValueSet()) - tgt.setValueSet(src.getValueSet()); - if (src.hasCompositional()) - tgt.setCompositional(src.getCompositional()); - if (src.hasVersionNeeded()) - tgt.setVersionNeeded(src.getVersionNeeded()); + if (src.hasCaseSensitiveElement()) + tgt.setCaseSensitiveElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_14_50.convertType(src.getCaseSensitiveElement())); + if (src.hasValueSetElement()) + tgt.setValueSetElement((org.hl7.fhir.r5.model.CanonicalType) VersionConvertor_14_50.convertType(src.getValueSetElement())); + if (src.hasCompositionalElement()) + tgt.setCompositionalElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_14_50.convertType(src.getCompositionalElement())); + if (src.hasVersionNeededElement()) + tgt.setVersionNeededElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_14_50.convertType(src.getVersionNeededElement())); if (src.hasContent()) { tgt.setContent(convertCodeSystemContentMode(src.getContent())); } - if (src.hasCount()) - tgt.setCount(src.getCount()); + if (src.hasCountElement()) + tgt.setCountElement((org.hl7.fhir.r5.model.UnsignedIntType) VersionConvertor_14_50.convertType(src.getCountElement())); if (src.hasFilter()) { for (org.hl7.fhir.dstu2016may.model.CodeSystem.CodeSystemFilterComponent t : src.getFilter()) tgt.addFilter(convertCodeSystemFilterComponent(t)); } @@ -135,8 +138,8 @@ public class CodeSystem14_50 { return null; org.hl7.fhir.dstu2016may.model.CodeSystem.CodeSystemContactComponent tgt = new org.hl7.fhir.dstu2016may.model.CodeSystem.CodeSystemContactComponent(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.r5.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_14_50.convertContactPoint(t)); } @@ -148,8 +151,8 @@ public class CodeSystem14_50 { return null; org.hl7.fhir.r5.model.ContactDetail tgt = new org.hl7.fhir.r5.model.ContactDetail(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu2016may.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_14_50.convertContactPoint(t)); } @@ -195,16 +198,12 @@ public class CodeSystem14_50 { return null; org.hl7.fhir.dstu2016may.model.CodeSystem.CodeSystemFilterComponent tgt = new org.hl7.fhir.dstu2016may.model.CodeSystem.CodeSystemFilterComponent(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasCode()) { - tgt.setCode(src.getCode()); - } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - if (src.hasOperator()) { - for (Enumeration t : src.getOperator()) tgt.addOperator(t.getValue().toCode()); - } - if (src.hasValue()) { - tgt.setValue(src.getValue()); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu2016may.model.CodeType) VersionConvertor_14_50.convertType(src.getCodeElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getDescriptionElement())); + if (src.hasValueElement()) { + tgt.setValueElement((StringType) VersionConvertor_14_50.convertType(src.getValueElement())); } return tgt; } @@ -214,18 +213,17 @@ public class CodeSystem14_50 { return null; org.hl7.fhir.r5.model.CodeSystem.CodeSystemFilterComponent tgt = new org.hl7.fhir.r5.model.CodeSystem.CodeSystemFilterComponent(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasCode()) { - tgt.setCode(src.getCode()); - } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.r5.model.CodeType) VersionConvertor_14_50.convertType(src.getCodeElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getDescriptionElement())); for (org.hl7.fhir.dstu2016may.model.CodeType t : src.getOperator()) try { tgt.addOperator(Enumerations.FilterOperator.fromCode(t.getValue())); } catch (org.hl7.fhir.exceptions.FHIRException e) { throw new FHIRException(e); } - if (src.hasValue()) { - tgt.setValue(src.getValue()); + if (src.hasValueElement()) { + tgt.setValueElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getValueElement())); } return tgt; } @@ -235,13 +233,12 @@ public class CodeSystem14_50 { return null; org.hl7.fhir.r5.model.CodeSystem.ConceptDefinitionComponent tgt = new org.hl7.fhir.r5.model.CodeSystem.ConceptDefinitionComponent(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasCode()) { - tgt.setCode(src.getCode()); - } - if (src.hasDisplay()) - tgt.setDisplay(src.getDisplay()); - if (src.hasDefinition()) - tgt.setDefinition(src.getDefinition()); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.r5.model.CodeType) VersionConvertor_14_50.convertType(src.getCodeElement())); + if (src.hasDisplayElement()) + tgt.setDisplayElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getDisplayElement())); + if (src.hasDefinitionElement()) + tgt.setDefinitionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getDefinitionElement())); if (src.hasDesignation()) { for (org.hl7.fhir.dstu2016may.model.CodeSystem.ConceptDefinitionDesignationComponent t : src.getDesignation()) tgt.addDesignation(convertConceptDefinitionDesignationComponent(t)); } @@ -259,13 +256,12 @@ public class CodeSystem14_50 { return null; org.hl7.fhir.dstu2016may.model.CodeSystem.ConceptDefinitionComponent tgt = new org.hl7.fhir.dstu2016may.model.CodeSystem.ConceptDefinitionComponent(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasCode()) { - tgt.setCode(src.getCode()); - } - if (src.hasDisplay()) - tgt.setDisplay(src.getDisplay()); - if (src.hasDefinition()) - tgt.setDefinition(src.getDefinition()); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu2016may.model.CodeType) VersionConvertor_14_50.convertType(src.getCodeElement())); + if (src.hasDisplayElement()) + tgt.setDisplayElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getDisplayElement())); + if (src.hasDefinitionElement()) + tgt.setDefinitionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getDefinitionElement())); if (src.hasDesignation()) { for (org.hl7.fhir.r5.model.CodeSystem.ConceptDefinitionDesignationComponent t : src.getDesignation()) tgt.addDesignation(convertConceptDefinitionDesignationComponent(t)); } @@ -283,14 +279,13 @@ public class CodeSystem14_50 { return null; org.hl7.fhir.r5.model.CodeSystem.ConceptDefinitionDesignationComponent tgt = new org.hl7.fhir.r5.model.CodeSystem.ConceptDefinitionDesignationComponent(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasLanguage()) - tgt.setLanguage(src.getLanguage()); + if (src.hasLanguageElement()) + tgt.setLanguageElement((org.hl7.fhir.r5.model.CodeType) VersionConvertor_14_50.convertType(src.getLanguageElement())); if (src.hasUse()) { tgt.setUse(VersionConvertor_14_50.convertCoding(src.getUse())); } - if (src.hasValue()) { - tgt.setValue(src.getValue()); - } + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getValueElement())); return tgt; } @@ -299,14 +294,13 @@ public class CodeSystem14_50 { return null; org.hl7.fhir.dstu2016may.model.CodeSystem.ConceptDefinitionDesignationComponent tgt = new org.hl7.fhir.dstu2016may.model.CodeSystem.ConceptDefinitionDesignationComponent(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasLanguage()) - tgt.setLanguage(src.getLanguage()); + if (src.hasLanguageElement()) + tgt.setLanguageElement((org.hl7.fhir.dstu2016may.model.CodeType) VersionConvertor_14_50.convertType(src.getLanguageElement())); if (src.hasUse()) { tgt.setUse(VersionConvertor_14_50.convertCoding(src.getUse())); } - if (src.hasValue()) { - tgt.setValue(src.getValue()); - } + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getValueElement())); return tgt; } @@ -315,9 +309,8 @@ public class CodeSystem14_50 { return null; org.hl7.fhir.dstu2016may.model.CodeSystem.ConceptDefinitionPropertyComponent tgt = new org.hl7.fhir.dstu2016may.model.CodeSystem.ConceptDefinitionPropertyComponent(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasCode()) { - tgt.setCode(src.getCode()); - } + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu2016may.model.CodeType) VersionConvertor_14_50.convertType(src.getCodeElement())); if (src.hasValue()) { tgt.setValue(VersionConvertor_14_50.convertType(src.getValue())); } @@ -329,9 +322,8 @@ public class CodeSystem14_50 { return null; org.hl7.fhir.r5.model.CodeSystem.ConceptPropertyComponent tgt = new org.hl7.fhir.r5.model.CodeSystem.ConceptPropertyComponent(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasCode()) { - tgt.setCode(src.getCode()); - } + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.r5.model.CodeType) VersionConvertor_14_50.convertType(src.getCodeElement())); if (src.hasValue()) { tgt.setValue(VersionConvertor_14_50.convertType(src.getValue())); } @@ -343,11 +335,10 @@ public class CodeSystem14_50 { return null; org.hl7.fhir.r5.model.CodeSystem.PropertyComponent tgt = new org.hl7.fhir.r5.model.CodeSystem.PropertyComponent(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasCode()) { - tgt.setCode(src.getCode()); - } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.r5.model.CodeType) VersionConvertor_14_50.convertType(src.getCodeElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getDescriptionElement())); if (src.hasType()) { tgt.setType(convertPropertyType(src.getType())); } @@ -359,11 +350,10 @@ public class CodeSystem14_50 { return null; org.hl7.fhir.dstu2016may.model.CodeSystem.CodeSystemPropertyComponent tgt = new org.hl7.fhir.dstu2016may.model.CodeSystem.CodeSystemPropertyComponent(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasCode()) { - tgt.setCode(src.getCode()); - } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu2016may.model.CodeType) VersionConvertor_14_50.convertType(src.getCodeElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getDescriptionElement())); if (src.hasType()) { tgt.setType(convertPropertyType(src.getType())); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/CompartmentDefinition14_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/CompartmentDefinition14_50.java index e4a22c792..ee1fc492d 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/CompartmentDefinition14_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/CompartmentDefinition14_50.java @@ -1,7 +1,9 @@ package org.hl7.fhir.convertors.conv14_50; import org.hl7.fhir.convertors.VersionConvertor_14_50; +import org.hl7.fhir.dstu2016may.model.StringType; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class CompartmentDefinition14_50 { @@ -10,34 +12,31 @@ public class CompartmentDefinition14_50 { return null; org.hl7.fhir.dstu2016may.model.CompartmentDefinition tgt = new org.hl7.fhir.dstu2016may.model.CompartmentDefinition(); VersionConvertor_14_50.copyDomainResource(src, tgt); - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu2016may.model.UriType) VersionConvertor_14_50.convertType(src.getUrlElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_14_50.convertConformanceResourceStatus(src.getStatus())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu2016may.model.BooleanType) VersionConvertor_14_50.convertType(src.getExperimentalElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.r5.model.ContactDetail t : src.getContact()) tgt.addContact(convertCompartmentDefinitionContactComponent(t)); } - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu2016may.model.DateTimeType) VersionConvertor_14_50.convertType(src.getDateElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getDescriptionElement())); if (src.hasPurpose()) tgt.setRequirements(src.getPurpose()); if (src.hasCode()) { tgt.setCode(convertCompartmentType(src.getCode())); } - if (src.hasSearch()) { - tgt.setSearch(src.getSearch()); - } + if (src.hasSearchElement()) + tgt.setSearchElement((org.hl7.fhir.dstu2016may.model.BooleanType) VersionConvertor_14_50.convertType(src.getSearchElement())); if (src.hasResource()) { for (org.hl7.fhir.r5.model.CompartmentDefinition.CompartmentDefinitionResourceComponent t : src.getResource()) tgt.addResource(convertCompartmentDefinitionResourceComponent(t)); } @@ -49,24 +48,22 @@ public class CompartmentDefinition14_50 { return null; org.hl7.fhir.r5.model.CompartmentDefinition tgt = new org.hl7.fhir.r5.model.CompartmentDefinition(); VersionConvertor_14_50.copyDomainResource(src, tgt); - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r5.model.UriType) VersionConvertor_14_50.convertType(src.getUrlElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_14_50.convertConformanceResourceStatus(src.getStatus())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_14_50.convertType(src.getExperimentalElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu2016may.model.CompartmentDefinition.CompartmentDefinitionContactComponent t : src.getContact()) tgt.addContact(convertCompartmentDefinitionContactComponent(t)); } - if (src.hasDate()) - tgt.setDate(src.getDate()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.r5.model.DateTimeType) VersionConvertor_14_50.convertType(src.getDateElement())); if (src.hasDescription()) tgt.setDescription(src.getDescription()); if (src.hasRequirements()) @@ -74,9 +71,8 @@ public class CompartmentDefinition14_50 { if (src.hasCode()) { tgt.setCode(convertCompartmentType(src.getCode())); } - if (src.hasSearch()) { - tgt.setSearch(src.getSearch()); - } + if (src.hasSearchElement()) + tgt.setSearchElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_14_50.convertType(src.getSearchElement())); if (src.hasResource()) { for (org.hl7.fhir.dstu2016may.model.CompartmentDefinition.CompartmentDefinitionResourceComponent t : src.getResource()) tgt.addResource(convertCompartmentDefinitionResourceComponent(t)); } @@ -88,8 +84,8 @@ public class CompartmentDefinition14_50 { return null; org.hl7.fhir.dstu2016may.model.CompartmentDefinition.CompartmentDefinitionContactComponent tgt = new org.hl7.fhir.dstu2016may.model.CompartmentDefinition.CompartmentDefinitionContactComponent(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((StringType) VersionConvertor_14_50.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.r5.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_14_50.convertContactPoint(t)); } @@ -101,8 +97,8 @@ public class CompartmentDefinition14_50 { return null; org.hl7.fhir.r5.model.ContactDetail tgt = new org.hl7.fhir.r5.model.ContactDetail(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu2016may.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_14_50.convertContactPoint(t)); } @@ -114,16 +110,13 @@ public class CompartmentDefinition14_50 { return null; org.hl7.fhir.dstu2016may.model.CompartmentDefinition.CompartmentDefinitionResourceComponent tgt = new org.hl7.fhir.dstu2016may.model.CompartmentDefinition.CompartmentDefinitionResourceComponent(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasCode()) { - if (src.hasCode()) { - tgt.setCode(src.getCode()); - } - } + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu2016may.model.CodeType) VersionConvertor_14_50.convertType(src.getCodeElement())); if (src.hasParam()) { for (org.hl7.fhir.r5.model.StringType t : src.getParam()) tgt.addParam(t.getValue()); } - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getDocumentationElement())); return tgt; } @@ -132,14 +125,13 @@ public class CompartmentDefinition14_50 { return null; org.hl7.fhir.r5.model.CompartmentDefinition.CompartmentDefinitionResourceComponent tgt = new org.hl7.fhir.r5.model.CompartmentDefinition.CompartmentDefinitionResourceComponent(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasCode()) { - tgt.setCode(src.getCode()); - } + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.r5.model.CodeType) VersionConvertor_14_50.convertType(src.getCodeElement())); if (src.hasParam()) { for (org.hl7.fhir.dstu2016may.model.StringType t : src.getParam()) tgt.addParam(t.getValue()); } - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getDocumentationElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/ConceptMap14_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/ConceptMap14_50.java index 491be6d5e..347d46572 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/ConceptMap14_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/ConceptMap14_50.java @@ -1,12 +1,16 @@ package org.hl7.fhir.convertors.conv14_50; import org.hl7.fhir.convertors.VersionConvertor_14_50; +import org.hl7.fhir.dstu2016may.model.StringType; +import org.hl7.fhir.dstu2016may.model.UriType; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r5.model.CanonicalType; +import org.hl7.fhir.r5.model.CodeType; import org.hl7.fhir.r5.model.ConceptMap; import org.hl7.fhir.r5.model.ConceptMap.ConceptMapGroupComponent; import java.util.ArrayList; import java.util.List; +import java.util.Collections; public class ConceptMap14_50 { @@ -15,21 +19,21 @@ public class ConceptMap14_50 { return null; org.hl7.fhir.r5.model.ConceptMap tgt = new org.hl7.fhir.r5.model.ConceptMap(); VersionConvertor_14_50.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); - tgt.addIdentifier(VersionConvertor_14_50.convertIdentifier(src.getIdentifier())); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); - tgt.setStatus(VersionConvertor_14_50.convertConformanceResourceStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r5.model.UriType) VersionConvertor_14_50.convertType(src.getUrlElement())); + if (src.hasIdentifier()) tgt.addIdentifier(VersionConvertor_14_50.convertIdentifier(src.getIdentifier())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getNameElement())); + if (src.hasStatus()) tgt.setStatus(VersionConvertor_14_50.convertConformanceResourceStatus(src.getStatus())); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_14_50.convertType(src.getExperimentalElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getPublisherElement())); for (org.hl7.fhir.dstu2016may.model.ConceptMap.ConceptMapContactComponent t : src.getContact()) tgt.addContact(convertConceptMapContactComponent(t)); - if (src.hasDate()) - tgt.setDate(src.getDate()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.r5.model.DateTimeType) VersionConvertor_14_50.convertType(src.getDateElement())); if (src.hasDescription()) tgt.setDescription(src.getDescription()); for (org.hl7.fhir.dstu2016may.model.CodeableConcept t : src.getUseContext()) if (VersionConvertor_14_50.isJurisdiction(t)) @@ -56,31 +60,29 @@ public class ConceptMap14_50 { return null; org.hl7.fhir.dstu2016may.model.ConceptMap tgt = new org.hl7.fhir.dstu2016may.model.ConceptMap(); VersionConvertor_14_50.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu2016may.model.UriType) VersionConvertor_14_50.convertType(src.getUrlElement())); if (src.hasIdentifier()) { - if (src.hasIdentifier()) { - tgt.setIdentifier(VersionConvertor_14_50.convertIdentifier(src.getIdentifierFirstRep())); - } + tgt.setIdentifier(VersionConvertor_14_50.convertIdentifier(src.getIdentifierFirstRep())); } - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_14_50.convertConformanceResourceStatus(src.getStatus())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu2016may.model.BooleanType) VersionConvertor_14_50.convertType(src.getExperimentalElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.r5.model.ContactDetail t : src.getContact()) tgt.addContact(convertConceptMapContactComponent(t)); } - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu2016may.model.DateTimeType) VersionConvertor_14_50.convertType(src.getDateElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getDescriptionElement())); for (org.hl7.fhir.r5.model.UsageContext t : src.getUseContext()) if (t.hasValueCodeableConcept()) tgt.addUseContext(VersionConvertor_14_50.convertCodeableConcept(t.getValueCodeableConcept())); if (src.hasJurisdiction()) { @@ -88,8 +90,8 @@ public class ConceptMap14_50 { } if (src.hasPurpose()) tgt.setRequirements(src.getPurpose()); - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getCopyrightElement())); if (src.getSource() instanceof CanonicalType) tgt.setSource(VersionConvertor_14_50.convertCanonicalToReference((CanonicalType) src.getSource())); else if (src.hasSource()) { @@ -117,8 +119,8 @@ public class ConceptMap14_50 { return null; org.hl7.fhir.r5.model.ContactDetail tgt = new org.hl7.fhir.r5.model.ContactDetail(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu2016may.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_14_50.convertContactPoint(t)); } @@ -130,8 +132,8 @@ public class ConceptMap14_50 { return null; org.hl7.fhir.dstu2016may.model.ConceptMap.ConceptMapContactComponent tgt = new org.hl7.fhir.dstu2016may.model.ConceptMap.ConceptMapContactComponent(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.r5.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_14_50.convertContactPoint(t)); } @@ -187,14 +189,13 @@ public class ConceptMap14_50 { return null; org.hl7.fhir.dstu2016may.model.ConceptMap.OtherElementComponent tgt = new org.hl7.fhir.dstu2016may.model.ConceptMap.OtherElementComponent(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasProperty()) { - tgt.setElement(src.getProperty()); + if (src.hasPropertyElement()) { + tgt.setElementElement((UriType) VersionConvertor_14_50.convertType(src.getPropertyElement())); } - if (src.hasSystem()) { - tgt.setSystem(src.getSystem()); - } - if (src.hasValue()) { - tgt.setCode(src.getValue()); + if (src.hasSystemElement()) + tgt.setSystemElement((org.hl7.fhir.dstu2016may.model.UriType) VersionConvertor_14_50.convertType(src.getSystemElement())); + if (src.hasValueElement()) { + tgt.setCodeElement((StringType) VersionConvertor_14_50.convertType(src.getValueElement())); } return tgt; } @@ -204,14 +205,13 @@ public class ConceptMap14_50 { return null; org.hl7.fhir.r5.model.ConceptMap.OtherElementComponent tgt = new org.hl7.fhir.r5.model.ConceptMap.OtherElementComponent(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasElement()) { - tgt.setProperty(src.getElement()); + if (src.hasElementElement()) { + tgt.setPropertyElement((org.hl7.fhir.r5.model.UriType) VersionConvertor_14_50.convertType(src.getElementElement())); } - if (src.hasSystem()) { - tgt.setSystem(src.getSystem()); - } - if (src.hasCode()) { - tgt.setValue(src.getCode()); + if (src.hasSystemElement()) + tgt.setSystemElement((org.hl7.fhir.r5.model.CanonicalType) VersionConvertor_14_50.convertType(src.getSystemElement())); + if (src.hasCodeElement()) { + tgt.setValueElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getCodeElement())); } return tgt; } @@ -223,8 +223,8 @@ public class ConceptMap14_50 { for (org.hl7.fhir.dstu2016may.model.ConceptMap.TargetElementComponent t : src.getTarget()) { org.hl7.fhir.r5.model.ConceptMap.SourceElementComponent tgt = new org.hl7.fhir.r5.model.ConceptMap.SourceElementComponent(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasCode()) - tgt.setCode(src.getCode()); + if (src.hasCodeElement()) + tgt.setCodeElement((CodeType) VersionConvertor_14_50.convertType(src.getCodeElement())); if (t.getEquivalence() == org.hl7.fhir.dstu2016may.model.Enumerations.ConceptMapEquivalence.UNMATCHED) { tgt.setNoMap(true); } else { @@ -242,10 +242,10 @@ public class ConceptMap14_50 { return null; org.hl7.fhir.dstu2016may.model.ConceptMap.SourceElementComponent tgt = new org.hl7.fhir.dstu2016may.model.ConceptMap.SourceElementComponent(); VersionConvertor_14_50.copyElement(src, tgt); - if (g.hasSource()) - tgt.setSystem(g.getSource()); - if (src.hasCode()) - tgt.setCode(src.getCode()); + if (g.hasSourceElement()) + tgt.setSystemElement((UriType) VersionConvertor_14_50.convertType(g.getSourceElement())); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu2016may.model.CodeType) VersionConvertor_14_50.convertType(src.getCodeElement())); if (src.hasNoMap() && src.getNoMap() == true) { tgt.addTarget(new org.hl7.fhir.dstu2016may.model.ConceptMap.TargetElementComponent().setEquivalence(org.hl7.fhir.dstu2016may.model.Enumerations.ConceptMapEquivalence.UNMATCHED)); } else { @@ -261,15 +261,15 @@ public class ConceptMap14_50 { return null; org.hl7.fhir.dstu2016may.model.ConceptMap.TargetElementComponent tgt = new org.hl7.fhir.dstu2016may.model.ConceptMap.TargetElementComponent(); VersionConvertor_14_50.copyElement(src, tgt); - if (g.hasTarget()) - tgt.setSystem(g.getTarget()); - if (src.hasCode()) - tgt.setCode(src.getCode()); + if (g.hasTargetElement()) + tgt.setSystemElement((UriType) VersionConvertor_14_50.convertType(g.getTargetElement())); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu2016may.model.CodeType) VersionConvertor_14_50.convertType(src.getCodeElement())); if (src.hasRelationship()) { tgt.setEquivalence(convertConceptMapEquivalence(src.getRelationship())); } - if (src.hasComment()) - tgt.setComments(src.getComment()); + if (src.hasCommentElement()) + tgt.setCommentsElement((StringType) VersionConvertor_14_50.convertType(src.getCommentElement())); if (src.hasDependsOn()) { for (org.hl7.fhir.r5.model.ConceptMap.OtherElementComponent t : src.getDependsOn()) tgt.addDependsOn(convertOtherElementComponent(t)); } @@ -284,13 +284,13 @@ public class ConceptMap14_50 { return null; org.hl7.fhir.r5.model.ConceptMap.TargetElementComponent tgt = new org.hl7.fhir.r5.model.ConceptMap.TargetElementComponent(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasCode()) - tgt.setCode(src.getCode()); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.r5.model.CodeType) VersionConvertor_14_50.convertType(src.getCodeElement())); if (src.hasEquivalence()) { tgt.setRelationship(convertConceptMapRelationship(src.getEquivalence())); } - if (src.hasComments()) - tgt.setComment(src.getComments()); + if (src.hasCommentsElement()) + tgt.setCommentElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getCommentsElement())); if (src.hasDependsOn()) { for (org.hl7.fhir.dstu2016may.model.ConceptMap.OtherElementComponent t : src.getDependsOn()) tgt.addDependsOn(convertOtherElementComponent(t)); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/Conformance14_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/Conformance14_50.java index f935bcdd8..45ceb30c6 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/Conformance14_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/Conformance14_50.java @@ -2,9 +2,18 @@ package org.hl7.fhir.convertors.conv14_50; import org.hl7.fhir.convertors.VersionConvertorConstants; import org.hl7.fhir.convertors.VersionConvertor_14_50; +import org.hl7.fhir.dstu2016may.model.BooleanType; +import org.hl7.fhir.dstu2016may.model.CodeType; +import org.hl7.fhir.dstu2016may.model.UnsignedIntType; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r5.model.CapabilityStatement.CapabilityStatementRestComponent; import org.hl7.fhir.r5.model.CapabilityStatement.CapabilityStatementRestResourceComponent; +import org.hl7.fhir.r5.model.DateTimeType; +import org.hl7.fhir.r5.model.StringType; +import org.hl7.fhir.r5.model.UriType; +import org.hl7.fhir.r5.model.UrlType; + +import java.util.Collections; public class Conformance14_50 { @@ -43,21 +52,21 @@ public class Conformance14_50 { return null; org.hl7.fhir.r5.model.CapabilityStatement tgt = new org.hl7.fhir.r5.model.CapabilityStatement(); VersionConvertor_14_50.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasUrlElement()) + tgt.setUrlElement((UriType) VersionConvertor_14_50.convertType(src.getUrlElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((StringType) VersionConvertor_14_50.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((StringType) VersionConvertor_14_50.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_14_50.convertConformanceResourceStatus(src.getStatus())); } if (src.hasExperimental()) tgt.setExperimental(src.getExperimental()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasDateElement()) + tgt.setDateElement((DateTimeType) VersionConvertor_14_50.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((StringType) VersionConvertor_14_50.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu2016may.model.Conformance.ConformanceContactComponent t : src.getContact()) tgt.addContact(convertConformanceContactComponent(t)); } @@ -105,26 +114,26 @@ public class Conformance14_50 { return null; org.hl7.fhir.dstu2016may.model.Conformance tgt = new org.hl7.fhir.dstu2016may.model.Conformance(); VersionConvertor_14_50.copyDomainResource(src, tgt, "http://hl7.org/fhir/3.0/StructureDefinition/extension-CapabilityStatement.acceptUnknown"); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu2016may.model.UriType) VersionConvertor_14_50.convertType(src.getUrlElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_14_50.convertConformanceResourceStatus(src.getStatus())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu2016may.model.BooleanType) VersionConvertor_14_50.convertType(src.getExperimentalElement())); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu2016may.model.DateTimeType) VersionConvertor_14_50.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.r5.model.ContactDetail t : src.getContact()) tgt.addContact(convertConformanceContactComponent(t)); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getDescriptionElement())); for (org.hl7.fhir.r5.model.UsageContext t : src.getUseContext()) if (t.hasValueCodeableConcept()) tgt.addUseContext(VersionConvertor_14_50.convertCodeableConcept(t.getValueCodeableConcept())); if (src.hasJurisdiction()) { @@ -132,8 +141,8 @@ public class Conformance14_50 { } if (src.hasPurpose()) tgt.setRequirements(src.getPurpose()); - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getCopyrightElement())); if (src.hasKind()) { tgt.setKind(convertConformanceStatementKind(src.getKind())); } @@ -171,8 +180,8 @@ public class Conformance14_50 { return null; org.hl7.fhir.dstu2016may.model.Conformance.ConformanceContactComponent tgt = new org.hl7.fhir.dstu2016may.model.Conformance.ConformanceContactComponent(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.r5.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_14_50.convertContactPoint(t)); } @@ -184,8 +193,8 @@ public class Conformance14_50 { return null; org.hl7.fhir.r5.model.ContactDetail tgt = new org.hl7.fhir.r5.model.ContactDetail(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu2016may.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_14_50.convertContactPoint(t)); } @@ -232,8 +241,8 @@ public class Conformance14_50 { if (src.hasDescription()) { tgt.setDescription(src.getDescription()); } - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((UrlType) VersionConvertor_14_50.convertType(src.getUrlElement())); return tgt; } @@ -245,8 +254,8 @@ public class Conformance14_50 { if (src.hasDescription()) { tgt.setDescription(src.getDescription()); } - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu2016may.model.UriType) VersionConvertor_14_50.convertType(src.getUrlElement())); return tgt; } @@ -258,8 +267,8 @@ public class Conformance14_50 { if (src.hasEndpoint()) { for (org.hl7.fhir.r5.model.CapabilityStatement.CapabilityStatementMessagingEndpointComponent t : src.getEndpoint()) tgt.addEndpoint(convertConformanceMessagingEndpointComponent(t)); } - if (src.hasReliableCache()) - tgt.setReliableCache(src.getReliableCache()); + if (src.hasReliableCacheElement()) + tgt.setReliableCacheElement((UnsignedIntType) VersionConvertor_14_50.convertType(src.getReliableCacheElement())); if (src.hasDocumentation()) tgt.setDocumentation(src.getDocumentation()); for (org.hl7.fhir.r5.model.Extension e : src.getExtensionsByUrl(VersionConvertorConstants.IG_CONFORMANCE_MESSAGE_EVENT)) { @@ -292,8 +301,8 @@ public class Conformance14_50 { if (src.hasEndpoint()) { for (org.hl7.fhir.dstu2016may.model.Conformance.ConformanceMessagingEndpointComponent t : src.getEndpoint()) tgt.addEndpoint(convertConformanceMessagingEndpointComponent(t)); } - if (src.hasReliableCache()) - tgt.setReliableCache(src.getReliableCache()); + if (src.hasReliableCacheElement()) + tgt.setReliableCacheElement((org.hl7.fhir.r5.model.UnsignedIntType) VersionConvertor_14_50.convertType(src.getReliableCacheElement())); if (src.hasDocumentation()) tgt.setDocumentation(src.getDocumentation()); for (org.hl7.fhir.dstu2016may.model.Conformance.ConformanceMessagingEventComponent t : src.getEvent()) { @@ -327,8 +336,8 @@ public class Conformance14_50 { if (src.hasProtocol()) { tgt.setProtocol(VersionConvertor_14_50.convertCoding(src.getProtocol())); } - if (src.hasAddress()) { - tgt.setAddress(src.getAddress()); + if (src.hasAddressElement()) { + tgt.setAddressElement((org.hl7.fhir.dstu2016may.model.UriType) VersionConvertor_14_50.convertType(src.getAddressElement())); } return tgt; } @@ -341,8 +350,8 @@ public class Conformance14_50 { if (src.hasProtocol()) { tgt.setProtocol(VersionConvertor_14_50.convertCoding(src.getProtocol())); } - if (src.hasAddress()) { - tgt.setAddress(src.getAddress()); + if (src.hasAddressElement()) { + tgt.setAddressElement((UrlType) VersionConvertor_14_50.convertType(src.getAddressElement())); } return tgt; } @@ -414,8 +423,8 @@ public class Conformance14_50 { return null; org.hl7.fhir.dstu2016may.model.Conformance.ConformanceRestOperationComponent tgt = new org.hl7.fhir.dstu2016may.model.Conformance.ConformanceRestOperationComponent(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); + if (src.hasNameElement()) { + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getNameElement())); } if (src.hasDefinitionElement()) { tgt.setDefinition(VersionConvertor_14_50.convertCanonicalToReference(src.getDefinitionElement())); @@ -428,8 +437,8 @@ public class Conformance14_50 { return null; org.hl7.fhir.r5.model.CapabilityStatement.CapabilityStatementRestResourceOperationComponent tgt = new org.hl7.fhir.r5.model.CapabilityStatement.CapabilityStatementRestResourceOperationComponent(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); + if (src.hasNameElement()) { + tgt.setNameElement((StringType) VersionConvertor_14_50.convertType(src.getNameElement())); } if (src.hasDefinition()) { tgt.setDefinitionElement(VersionConvertor_14_50.convertReferenceToCanonical(src.getDefinition())); @@ -442,10 +451,8 @@ public class Conformance14_50 { return null; org.hl7.fhir.dstu2016may.model.Conformance.ConformanceRestResourceComponent tgt = new org.hl7.fhir.dstu2016may.model.Conformance.ConformanceRestResourceComponent(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasType()) { - if (src.hasType()) { - tgt.setType(src.getType()); - } + if (src.hasTypeElement()) { + tgt.setTypeElement((CodeType) VersionConvertor_14_50.convertType(src.getTypeElement())); } if (src.hasProfileElement()) { tgt.setProfile(VersionConvertor_14_50.convertCanonicalToReference(src.getProfileElement())); @@ -456,14 +463,14 @@ public class Conformance14_50 { if (src.hasVersioning()) { tgt.setVersioning(convertResourceVersionPolicy(src.getVersioning())); } - if (src.hasReadHistory()) - tgt.setReadHistory(src.getReadHistory()); - if (src.hasUpdateCreate()) - tgt.setUpdateCreate(src.getUpdateCreate()); - if (src.hasConditionalCreate()) - tgt.setConditionalCreate(src.getConditionalCreate()); - if (src.hasConditionalUpdate()) - tgt.setConditionalUpdate(src.getConditionalUpdate()); + if (src.hasReadHistoryElement()) + tgt.setReadHistoryElement((BooleanType) VersionConvertor_14_50.convertType(src.getReadHistoryElement())); + if (src.hasUpdateCreateElement()) + tgt.setUpdateCreateElement((BooleanType) VersionConvertor_14_50.convertType(src.getUpdateCreateElement())); + if (src.hasConditionalCreateElement()) + tgt.setConditionalCreateElement((BooleanType) VersionConvertor_14_50.convertType(src.getConditionalCreateElement())); + if (src.hasConditionalUpdateElement()) + tgt.setConditionalUpdateElement((BooleanType) VersionConvertor_14_50.convertType(src.getConditionalUpdateElement())); if (src.hasConditionalDelete()) { tgt.setConditionalDelete(convertConditionalDeleteStatus(src.getConditionalDelete())); } @@ -484,8 +491,8 @@ public class Conformance14_50 { return null; org.hl7.fhir.r5.model.CapabilityStatement.CapabilityStatementRestResourceComponent tgt = new org.hl7.fhir.r5.model.CapabilityStatement.CapabilityStatementRestResourceComponent(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasType()) { - tgt.setType(src.getType()); + if (src.hasTypeElement()) { + tgt.setTypeElement((org.hl7.fhir.r5.model.CodeType) VersionConvertor_14_50.convertType(src.getTypeElement())); } if (src.hasProfile()) { tgt.setProfileElement(VersionConvertor_14_50.convertReferenceToCanonical(src.getProfile())); @@ -496,14 +503,14 @@ public class Conformance14_50 { if (src.hasVersioning()) { tgt.setVersioning(convertResourceVersionPolicy(src.getVersioning())); } - if (src.hasReadHistory()) - tgt.setReadHistory(src.getReadHistory()); - if (src.hasUpdateCreate()) - tgt.setUpdateCreate(src.getUpdateCreate()); - if (src.hasConditionalCreate()) - tgt.setConditionalCreate(src.getConditionalCreate()); - if (src.hasConditionalUpdate()) - tgt.setConditionalUpdate(src.getConditionalUpdate()); + if (src.hasReadHistoryElement()) + tgt.setReadHistoryElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_14_50.convertType(src.getReadHistoryElement())); + if (src.hasUpdateCreateElement()) + tgt.setUpdateCreateElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_14_50.convertType(src.getUpdateCreateElement())); + if (src.hasConditionalCreateElement()) + tgt.setConditionalCreateElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_14_50.convertType(src.getConditionalCreateElement())); + if (src.hasConditionalUpdateElement()) + tgt.setConditionalUpdateElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_14_50.convertType(src.getConditionalUpdateElement())); if (src.hasConditionalDelete()) { tgt.setConditionalDelete(convertConditionalDeleteStatus(src.getConditionalDelete())); } @@ -524,8 +531,8 @@ public class Conformance14_50 { return null; org.hl7.fhir.dstu2016may.model.Conformance.ConformanceRestResourceSearchParamComponent tgt = new org.hl7.fhir.dstu2016may.model.Conformance.ConformanceRestResourceSearchParamComponent(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); + if (src.hasNameElement()) { + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getNameElement())); } if (src.hasDefinition()) tgt.setDefinition(src.getDefinition()); @@ -542,8 +549,8 @@ public class Conformance14_50 { return null; org.hl7.fhir.r5.model.CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent tgt = new org.hl7.fhir.r5.model.CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); + if (src.hasNameElement()) { + tgt.setNameElement((StringType) VersionConvertor_14_50.convertType(src.getNameElement())); } if (src.hasDefinition()) tgt.setDefinition(src.getDefinition()); @@ -575,13 +582,13 @@ public class Conformance14_50 { return null; org.hl7.fhir.dstu2016may.model.Conformance.ConformanceRestSecurityComponent tgt = new org.hl7.fhir.dstu2016may.model.Conformance.ConformanceRestSecurityComponent(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasCors()) - tgt.setCors(src.getCors()); + if (src.hasCorsElement()) + tgt.setCorsElement((BooleanType) VersionConvertor_14_50.convertType(src.getCorsElement())); if (src.hasService()) { for (org.hl7.fhir.r5.model.CodeableConcept t : src.getService()) tgt.addService(VersionConvertor_14_50.convertCodeableConcept(t)); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getDescriptionElement())); return tgt; } @@ -590,13 +597,13 @@ public class Conformance14_50 { return null; org.hl7.fhir.r5.model.CapabilityStatement.CapabilityStatementSoftwareComponent tgt = new org.hl7.fhir.r5.model.CapabilityStatement.CapabilityStatementSoftwareComponent(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); + if (src.hasNameElement()) { + tgt.setNameElement((StringType) VersionConvertor_14_50.convertType(src.getNameElement())); } - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasReleaseDate()) - tgt.setReleaseDate(src.getReleaseDate()); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getVersionElement())); + if (src.hasReleaseDateElement()) + tgt.setReleaseDateElement((DateTimeType) VersionConvertor_14_50.convertType(src.getReleaseDateElement())); return tgt; } @@ -605,13 +612,13 @@ public class Conformance14_50 { return null; org.hl7.fhir.dstu2016may.model.Conformance.ConformanceSoftwareComponent tgt = new org.hl7.fhir.dstu2016may.model.Conformance.ConformanceSoftwareComponent(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); + if (src.hasNameElement()) { + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getNameElement())); } - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasReleaseDate()) - tgt.setReleaseDate(src.getReleaseDate()); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getVersionElement())); + if (src.hasReleaseDateElement()) + tgt.setReleaseDateElement((org.hl7.fhir.dstu2016may.model.DateTimeType) VersionConvertor_14_50.convertType(src.getReleaseDateElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/DataElement14_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/DataElement14_50.java index ffd4872b0..5dd224286 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/DataElement14_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/DataElement14_50.java @@ -2,7 +2,13 @@ package org.hl7.fhir.convertors.conv14_50; import org.hl7.fhir.convertors.VersionConvertor_14_50; import org.hl7.fhir.exceptions.FHIRException; +import org.hl7.fhir.r5.model.BooleanType; +import org.hl7.fhir.r5.model.DateTimeType; +import org.hl7.fhir.r5.model.StringType; import org.hl7.fhir.r5.model.StructureDefinition.StructureDefinitionKind; +import org.hl7.fhir.r5.model.UriType; + +import java.util.Collections; public class DataElement14_50 { @@ -11,24 +17,24 @@ public class DataElement14_50 { return null; org.hl7.fhir.r5.model.StructureDefinition tgt = new org.hl7.fhir.r5.model.StructureDefinition(); VersionConvertor_14_50.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((UriType) VersionConvertor_14_50.convertType(src.getUrlElement())); if (src.hasIdentifier()) { for (org.hl7.fhir.dstu2016may.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_14_50.convertIdentifier(t)); } - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); + if (src.hasVersionElement()) + tgt.setVersionElement((StringType) VersionConvertor_14_50.convertType(src.getVersionElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_14_50.convertConformanceResourceStatus(src.getStatus())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((BooleanType) VersionConvertor_14_50.convertType(src.getExperimentalElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((StringType) VersionConvertor_14_50.convertType(src.getPublisherElement())); + if (src.hasDateElement()) + tgt.setDateElement((DateTimeType) VersionConvertor_14_50.convertType(src.getDateElement())); + if (src.hasNameElement()) + tgt.setNameElement((StringType) VersionConvertor_14_50.convertType(src.getNameElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu2016may.model.DataElement.DataElementContactComponent t : src.getContact()) tgt.addContact(convertDataElementContactComponent(t)); } @@ -57,8 +63,8 @@ public class DataElement14_50 { return null; org.hl7.fhir.r5.model.ContactDetail tgt = new org.hl7.fhir.r5.model.ContactDetail(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((StringType) VersionConvertor_14_50.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu2016may.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_14_50.convertContactPoint(t)); } @@ -70,8 +76,8 @@ public class DataElement14_50 { return null; org.hl7.fhir.dstu2016may.model.DataElement.DataElementContactComponent tgt = new org.hl7.fhir.dstu2016may.model.DataElement.DataElementContactComponent(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.r5.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_14_50.convertContactPoint(t)); } @@ -86,12 +92,12 @@ public class DataElement14_50 { if (src.hasIdentity()) { tgt.setIdentity(src.getIdentity()); } - if (src.hasUri()) - tgt.setUri(src.getUri()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasComment()) - tgt.setComment(src.getComment()); + if (src.hasUriElement()) + tgt.setUriElement((UriType) VersionConvertor_14_50.convertType(src.getUriElement())); + if (src.hasNameElement()) + tgt.setNameElement((StringType) VersionConvertor_14_50.convertType(src.getNameElement())); + if (src.hasCommentElement()) + tgt.setCommentElement((StringType) VersionConvertor_14_50.convertType(src.getCommentElement())); return tgt; } } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/ImplementationGuide14_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/ImplementationGuide14_50.java index f4be63718..43b0c6b43 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/ImplementationGuide14_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/ImplementationGuide14_50.java @@ -2,13 +2,16 @@ package org.hl7.fhir.convertors.conv14_50; import org.hl7.fhir.convertors.VersionConvertorConstants; import org.hl7.fhir.convertors.VersionConvertor_14_50; +import org.hl7.fhir.dstu2016may.model.IdType; import org.hl7.fhir.dstu2016may.model.ImplementationGuide.GuidePageKind; +import org.hl7.fhir.dstu2016may.model.StringType; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r5.model.CanonicalType; import org.hl7.fhir.r5.model.DataType; import org.hl7.fhir.r5.model.Enumeration; import org.hl7.fhir.r5.model.ImplementationGuide.GuidePageGeneration; import java.util.List; +import java.util.Collections; public class ImplementationGuide14_50 { @@ -17,35 +20,33 @@ public class ImplementationGuide14_50 { return null; org.hl7.fhir.dstu2016may.model.ImplementationGuide tgt = new org.hl7.fhir.dstu2016may.model.ImplementationGuide(); VersionConvertor_14_50.copyDomainResource(src, tgt); - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu2016may.model.UriType) VersionConvertor_14_50.convertType(src.getUrlElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_14_50.convertConformanceResourceStatus(src.getStatus())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu2016may.model.BooleanType) VersionConvertor_14_50.convertType(src.getExperimentalElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.r5.model.ContactDetail t : src.getContact()) tgt.addContact(convertImplementationGuideContactComponent(t)); } - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu2016may.model.DateTimeType) VersionConvertor_14_50.convertType(src.getDateElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getDescriptionElement())); for (org.hl7.fhir.r5.model.UsageContext t : src.getUseContext()) if (t.hasValueCodeableConcept()) tgt.addUseContext(VersionConvertor_14_50.convertCodeableConcept(t.getValueCodeableConcept())); if (src.hasJurisdiction()) { for (org.hl7.fhir.r5.model.CodeableConcept t : src.getJurisdiction()) tgt.addUseContext(VersionConvertor_14_50.convertCodeableConcept(t)); } - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getCopyrightElement())); if (src.hasFhirVersion()) for (Enumeration v : src.getFhirVersion()) { tgt.setFhirVersion(v.asStringValue()); @@ -73,26 +74,24 @@ public class ImplementationGuide14_50 { return null; org.hl7.fhir.r5.model.ImplementationGuide tgt = new org.hl7.fhir.r5.model.ImplementationGuide(); VersionConvertor_14_50.copyDomainResource(src, tgt); - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r5.model.UriType) VersionConvertor_14_50.convertType(src.getUrlElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_14_50.convertConformanceResourceStatus(src.getStatus())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_14_50.convertType(src.getExperimentalElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu2016may.model.ImplementationGuide.ImplementationGuideContactComponent t : src.getContact()) tgt.addContact(convertImplementationGuideContactComponent(t)); } - if (src.hasDate()) - tgt.setDate(src.getDate()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.r5.model.DateTimeType) VersionConvertor_14_50.convertType(src.getDateElement())); if (src.hasDescription()) tgt.setDescription(src.getDescription()); for (org.hl7.fhir.dstu2016may.model.CodeableConcept t : src.getUseContext()) if (VersionConvertor_14_50.isJurisdiction(t)) @@ -123,8 +122,8 @@ public class ImplementationGuide14_50 { return null; org.hl7.fhir.dstu2016may.model.ImplementationGuide.ImplementationGuideContactComponent tgt = new org.hl7.fhir.dstu2016may.model.ImplementationGuide.ImplementationGuideContactComponent(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((StringType) VersionConvertor_14_50.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.r5.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_14_50.convertContactPoint(t)); } @@ -136,8 +135,8 @@ public class ImplementationGuide14_50 { return null; org.hl7.fhir.r5.model.ContactDetail tgt = new org.hl7.fhir.r5.model.ContactDetail(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu2016may.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_14_50.convertContactPoint(t)); } @@ -149,9 +148,8 @@ public class ImplementationGuide14_50 { return null; org.hl7.fhir.r5.model.ImplementationGuide.ImplementationGuideDependsOnComponent tgt = new org.hl7.fhir.r5.model.ImplementationGuide.ImplementationGuideDependsOnComponent(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasUri()) { - tgt.setUri(src.getUri()); - } + if (src.hasUriElement()) + tgt.setUriElement((org.hl7.fhir.r5.model.CanonicalType) VersionConvertor_14_50.convertType(src.getUriElement())); if (org.hl7.fhir.dstu2016may.utils.ToolingExtensions.hasExtension(src, VersionConvertorConstants.IG_DEPENDSON_PACKAGE_EXTENSION)) { tgt.setPackageId(org.hl7.fhir.dstu2016may.utils.ToolingExtensions.readStringExtension(src, VersionConvertorConstants.IG_DEPENDSON_PACKAGE_EXTENSION)); } @@ -167,9 +165,8 @@ public class ImplementationGuide14_50 { org.hl7.fhir.dstu2016may.model.ImplementationGuide.ImplementationGuideDependencyComponent tgt = new org.hl7.fhir.dstu2016may.model.ImplementationGuide.ImplementationGuideDependencyComponent(); VersionConvertor_14_50.copyElement(src, tgt); tgt.setType(org.hl7.fhir.dstu2016may.model.ImplementationGuide.GuideDependencyType.REFERENCE); - if (src.hasUri()) { - tgt.setUri(src.getUri()); - } + if (src.hasUriElement()) + tgt.setUriElement((org.hl7.fhir.dstu2016may.model.UriType) VersionConvertor_14_50.convertType(src.getUriElement())); if (src.hasPackageId()) tgt.addExtension(new org.hl7.fhir.dstu2016may.model.Extension(VersionConvertorConstants.IG_DEPENDSON_PACKAGE_EXTENSION, new org.hl7.fhir.dstu2016may.model.IdType(src.getPackageId()))); if (src.hasVersion()) @@ -183,9 +180,8 @@ public class ImplementationGuide14_50 { org.hl7.fhir.dstu2016may.model.ImplementationGuide.ImplementationGuideGlobalComponent tgt = new org.hl7.fhir.dstu2016may.model.ImplementationGuide.ImplementationGuideGlobalComponent(); VersionConvertor_14_50.copyElement(src, tgt); if (tgt.hasType()) { - if (src.hasType()) { - tgt.setType(src.getType()); - } + if (src.hasTypeElement()) + tgt.setTypeElement((org.hl7.fhir.dstu2016may.model.CodeType) VersionConvertor_14_50.convertType(src.getTypeElement())); } if (src.hasProfileElement()) { tgt.setProfile(VersionConvertor_14_50.convertCanonicalToReference(src.getProfileElement())); @@ -198,9 +194,8 @@ public class ImplementationGuide14_50 { return null; org.hl7.fhir.r5.model.ImplementationGuide.ImplementationGuideGlobalComponent tgt = new org.hl7.fhir.r5.model.ImplementationGuide.ImplementationGuideGlobalComponent(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasType()) { - tgt.setType(src.getType()); - } + if (src.hasTypeElement()) + tgt.setTypeElement((org.hl7.fhir.r5.model.CodeType) VersionConvertor_14_50.convertType(src.getTypeElement())); if (src.hasProfile()) { tgt.setProfileElement(VersionConvertor_14_50.convertReferenceToCanonical(src.getProfile())); } @@ -212,14 +207,13 @@ public class ImplementationGuide14_50 { return null; org.hl7.fhir.dstu2016may.model.ImplementationGuide.ImplementationGuidePackageComponent tgt = new org.hl7.fhir.dstu2016may.model.ImplementationGuide.ImplementationGuidePackageComponent(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasId()) { - tgt.setId(src.getId()); + if (src.hasIdElement()) { + tgt.setIdElement((IdType) VersionConvertor_14_50.convertType(src.getIdElement())); } - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getNameElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getDescriptionElement())); return tgt; } @@ -229,10 +223,10 @@ public class ImplementationGuide14_50 { org.hl7.fhir.r5.model.ImplementationGuide.ImplementationGuideDefinitionGroupingComponent tgt = new org.hl7.fhir.r5.model.ImplementationGuide.ImplementationGuideDefinitionGroupingComponent(); tgt.setId("p" + (context.getGrouping().size() + 1)); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getNameElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getDescriptionElement())); for (org.hl7.fhir.dstu2016may.model.ImplementationGuide.ImplementationGuidePackageResourceComponent t : src.getResource()) { org.hl7.fhir.r5.model.ImplementationGuide.ImplementationGuideDefinitionResourceComponent tn = convertImplementationGuidePackageResourceComponent(t); tn.setGroupingId(tgt.getId()); @@ -255,10 +249,10 @@ public class ImplementationGuide14_50 { tgt.setExample(src.getExampleBooleanType().getValue()); else tgt.setExample(false); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getNameElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getDescriptionElement())); if (src.hasReference()) tgt.setSource(VersionConvertor_14_50.convertReference(src.getReference())); return tgt; @@ -273,11 +267,11 @@ public class ImplementationGuide14_50 { DataType t = VersionConvertor_14_50.convertType(src.getExampleFor()); tgt.setExample(t instanceof org.hl7.fhir.r5.model.Reference ? new CanonicalType(((org.hl7.fhir.r5.model.Reference) t).getReference()) : t); } else if (src.hasExample()) - tgt.setExample(new org.hl7.fhir.r5.model.BooleanType(src.getExample())); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + tgt.setExample(new org.hl7.fhir.r5.model.BooleanType(src.getExample())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getNameElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getDescriptionElement())); if (src.hasSourceReference()) tgt.setReference(VersionConvertor_14_50.convertReference(src.getSourceReference())); else if (src.hasSourceUriType()) @@ -292,8 +286,8 @@ public class ImplementationGuide14_50 { VersionConvertor_14_50.copyElement(src, tgt); if (src.hasNameUrlType()) tgt.setSource(src.getNameUrlType().getValue()); - if (src.hasTitle()) { - tgt.setName(src.getTitle()); + if (src.hasTitleElement()) { + tgt.setNameElement((StringType) VersionConvertor_14_50.convertType(src.getTitleElement())); } if (src.hasGeneration()) tgt.setKind(convertPageGeneration(src.getGeneration())); @@ -310,8 +304,8 @@ public class ImplementationGuide14_50 { VersionConvertor_14_50.copyElement(src, tgt); if (src.hasSource()) tgt.setName(convertUriToUrl(src.getSourceElement())); - if (src.hasName()) { - tgt.setTitle(src.getName()); + if (src.hasNameElement()) { + tgt.setTitleElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getNameElement())); } if (src.hasKind()) tgt.setGeneration(convertPageGeneration(src.getKind())); diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/NamingSystem14_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/NamingSystem14_50.java index 409ff8e5e..2c31138be 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/NamingSystem14_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/NamingSystem14_50.java @@ -1,7 +1,9 @@ package org.hl7.fhir.convertors.conv14_50; import org.hl7.fhir.convertors.VersionConvertor_14_50; +import org.hl7.fhir.dstu2016may.model.StringType; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class NamingSystem14_50 { @@ -10,25 +12,23 @@ public class NamingSystem14_50 { return null; org.hl7.fhir.r5.model.NamingSystem tgt = new org.hl7.fhir.r5.model.NamingSystem(); VersionConvertor_14_50.copyDomainResource(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_14_50.convertConformanceResourceStatus(src.getStatus())); } if (src.hasKind()) { tgt.setKind(convertNamingSystemType(src.getKind())); } - if (src.hasDate()) { - tgt.setDate(src.getDate()); - } - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.r5.model.DateTimeType) VersionConvertor_14_50.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu2016may.model.NamingSystem.NamingSystemContactComponent t : src.getContact()) tgt.addContact(convertNamingSystemContactComponent(t)); } - if (src.hasResponsible()) - tgt.setResponsible(src.getResponsible()); + if (src.hasResponsibleElement()) + tgt.setResponsibleElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getResponsibleElement())); if (src.hasType()) { tgt.setType(VersionConvertor_14_50.convertCodeableConcept(src.getType())); } @@ -38,8 +38,8 @@ public class NamingSystem14_50 { tgt.addJurisdiction(VersionConvertor_14_50.convertCodeableConcept(t)); else tgt.addUseContext(VersionConvertor_14_50.convertCodeableConceptToUsageContext(t)); - if (src.hasUsage()) - tgt.setUsage(src.getUsage()); + if (src.hasUsageElement()) + tgt.setUsageElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getUsageElement())); if (src.hasUniqueId()) { for (org.hl7.fhir.dstu2016may.model.NamingSystem.NamingSystemUniqueIdComponent t : src.getUniqueId()) tgt.addUniqueId(convertNamingSystemUniqueIdComponent(t)); } @@ -51,37 +51,35 @@ public class NamingSystem14_50 { return null; org.hl7.fhir.dstu2016may.model.NamingSystem tgt = new org.hl7.fhir.dstu2016may.model.NamingSystem(); VersionConvertor_14_50.copyDomainResource(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_14_50.convertConformanceResourceStatus(src.getStatus())); } if (src.hasKind()) { tgt.setKind(convertNamingSystemType(src.getKind())); } - if (src.hasDate()) { - tgt.setDate(src.getDate()); - } - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu2016may.model.DateTimeType) VersionConvertor_14_50.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.r5.model.ContactDetail t : src.getContact()) tgt.addContact(convertNamingSystemContactComponent(t)); } - if (src.hasResponsible()) - tgt.setResponsible(src.getResponsible()); + if (src.hasResponsibleElement()) + tgt.setResponsibleElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getResponsibleElement())); if (src.hasType()) { tgt.setType(VersionConvertor_14_50.convertCodeableConcept(src.getType())); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getDescriptionElement())); for (org.hl7.fhir.r5.model.UsageContext t : src.getUseContext()) if (t.hasValueCodeableConcept()) tgt.addUseContext(VersionConvertor_14_50.convertCodeableConcept(t.getValueCodeableConcept())); if (src.hasJurisdiction()) { for (org.hl7.fhir.r5.model.CodeableConcept t : src.getJurisdiction()) tgt.addUseContext(VersionConvertor_14_50.convertCodeableConcept(t)); } - if (src.hasUsage()) - tgt.setUsage(src.getUsage()); + if (src.hasUsageElement()) + tgt.setUsageElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getUsageElement())); if (src.hasUniqueId()) { for (org.hl7.fhir.r5.model.NamingSystem.NamingSystemUniqueIdComponent t : src.getUniqueId()) tgt.addUniqueId(convertNamingSystemUniqueIdComponent(t)); } @@ -93,8 +91,8 @@ public class NamingSystem14_50 { return null; org.hl7.fhir.dstu2016may.model.NamingSystem.NamingSystemContactComponent tgt = new org.hl7.fhir.dstu2016may.model.NamingSystem.NamingSystemContactComponent(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((StringType) VersionConvertor_14_50.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.r5.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_14_50.convertContactPoint(t)); } @@ -106,8 +104,8 @@ public class NamingSystem14_50 { return null; org.hl7.fhir.r5.model.ContactDetail tgt = new org.hl7.fhir.r5.model.ContactDetail(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu2016may.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_14_50.convertContactPoint(t)); } @@ -186,11 +184,10 @@ public class NamingSystem14_50 { if (src.hasType()) { tgt.setType(convertNamingSystemIdentifierType(src.getType())); } - if (src.hasValue()) { - tgt.setValue(src.getValue()); - } - if (src.hasPreferred()) - tgt.setPreferred(src.getPreferred()); + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getValueElement())); + if (src.hasPreferredElement()) + tgt.setPreferredElement((org.hl7.fhir.dstu2016may.model.BooleanType) VersionConvertor_14_50.convertType(src.getPreferredElement())); if (src.hasPeriod()) { tgt.setPeriod(VersionConvertor_14_50.convertPeriod(src.getPeriod())); } @@ -205,11 +202,10 @@ public class NamingSystem14_50 { if (src.hasType()) { tgt.setType(convertNamingSystemIdentifierType(src.getType())); } - if (src.hasValue()) { - tgt.setValue(src.getValue()); - } - if (src.hasPreferred()) - tgt.setPreferred(src.getPreferred()); + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getValueElement())); + if (src.hasPreferredElement()) + tgt.setPreferredElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_14_50.convertType(src.getPreferredElement())); if (src.hasPeriod()) { tgt.setPeriod(VersionConvertor_14_50.convertPeriod(src.getPeriod())); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/OperationDefinition14_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/OperationDefinition14_50.java index 8e6edacec..6ad81d753 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/OperationDefinition14_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/OperationDefinition14_50.java @@ -2,10 +2,12 @@ package org.hl7.fhir.convertors.conv14_50; import org.hl7.fhir.convertors.VersionConvertorConstants; import org.hl7.fhir.convertors.VersionConvertor_14_50; +import org.hl7.fhir.dstu2016may.model.StringType; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r5.model.CodeType; import org.hl7.fhir.r5.model.DataType; import org.hl7.fhir.r5.model.Enumerations; +import java.util.Collections; public class OperationDefinition14_50 { @@ -14,30 +16,29 @@ public class OperationDefinition14_50 { return null; org.hl7.fhir.dstu2016may.model.OperationDefinition tgt = new org.hl7.fhir.dstu2016may.model.OperationDefinition(); VersionConvertor_14_50.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu2016may.model.UriType) VersionConvertor_14_50.convertType(src.getUrlElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_14_50.convertConformanceResourceStatus(src.getStatus())); } if (src.hasKind()) { tgt.setKind(convertOperationKind(src.getKind())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu2016may.model.BooleanType) VersionConvertor_14_50.convertType(src.getExperimentalElement())); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu2016may.model.DateTimeType) VersionConvertor_14_50.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.r5.model.ContactDetail t : src.getContact()) tgt.addContact(convertOperationDefinitionContactComponent(t)); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getDescriptionElement())); for (org.hl7.fhir.r5.model.UsageContext t : src.getUseContext()) if (t.hasValueCodeableConcept()) tgt.addUseContext(VersionConvertor_14_50.convertCodeableConcept(t.getValueCodeableConcept())); if (src.hasJurisdiction()) { @@ -47,24 +48,21 @@ public class OperationDefinition14_50 { tgt.setRequirements(src.getPurpose()); if (src.hasAffectsState()) tgt.setIdempotent(!src.getAffectsState()); - if (src.hasCode()) { - tgt.setCode(src.getCode()); - } - if (src.hasComment()) - tgt.setComment(src.getComment()); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu2016may.model.CodeType) VersionConvertor_14_50.convertType(src.getCodeElement())); + if (src.hasCommentElement()) + tgt.setCommentElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getCommentElement())); if (src.hasBaseElement()) { tgt.setBase(VersionConvertor_14_50.convertCanonicalToReference(src.getBaseElement())); } - if (src.hasSystem()) { - tgt.setSystem(src.getSystem()); - } + if (src.hasSystemElement()) + tgt.setSystemElement((org.hl7.fhir.dstu2016may.model.BooleanType) VersionConvertor_14_50.convertType(src.getSystemElement())); if (src.getType()) if (src.hasResource()) { for (CodeType t : src.getResource()) tgt.addType(t.getValue()); } - if (src.hasInstance()) { - tgt.setInstance(src.getInstance()); - } + if (src.hasInstanceElement()) + tgt.setInstanceElement((org.hl7.fhir.dstu2016may.model.BooleanType) VersionConvertor_14_50.convertType(src.getInstanceElement())); if (src.hasParameter()) { for (org.hl7.fhir.r5.model.OperationDefinition.OperationDefinitionParameterComponent t : src.getParameter()) tgt.addParameter(convertOperationDefinitionParameterComponent(t)); } @@ -76,25 +74,24 @@ public class OperationDefinition14_50 { return null; org.hl7.fhir.r5.model.OperationDefinition tgt = new org.hl7.fhir.r5.model.OperationDefinition(); VersionConvertor_14_50.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r5.model.UriType) VersionConvertor_14_50.convertType(src.getUrlElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_14_50.convertConformanceResourceStatus(src.getStatus())); } if (src.hasKind()) { tgt.setKind(convertOperationKind(src.getKind())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_14_50.convertType(src.getExperimentalElement())); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.r5.model.DateTimeType) VersionConvertor_14_50.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu2016may.model.OperationDefinition.OperationDefinitionContactComponent t : src.getContact()) tgt.addContact(convertOperationDefinitionContactComponent(t)); } @@ -108,24 +105,21 @@ public class OperationDefinition14_50 { tgt.setPurpose(src.getRequirements()); if (src.hasIdempotent()) tgt.setAffectsState(!src.getIdempotent()); - if (src.hasCode()) { - tgt.setCode(src.getCode()); - } + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.r5.model.CodeType) VersionConvertor_14_50.convertType(src.getCodeElement())); if (src.hasComment()) tgt.setComment(src.getComment()); if (src.hasBase()) { tgt.setBaseElement(VersionConvertor_14_50.convertReferenceToCanonical(src.getBase())); } - if (src.hasSystem()) { - tgt.setSystem(src.getSystem()); - } + if (src.hasSystemElement()) + tgt.setSystemElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_14_50.convertType(src.getSystemElement())); if (src.hasType()) { for (org.hl7.fhir.dstu2016may.model.CodeType t : src.getType()) tgt.addResource(t.getValue()); } tgt.setType(tgt.hasResource()); - if (src.hasInstance()) { - tgt.setInstance(src.getInstance()); - } + if (src.hasInstanceElement()) + tgt.setInstanceElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_14_50.convertType(src.getInstanceElement())); if (src.hasParameter()) { for (org.hl7.fhir.dstu2016may.model.OperationDefinition.OperationDefinitionParameterComponent t : src.getParameter()) tgt.addParameter(convertOperationDefinitionParameterComponent(t)); } @@ -137,8 +131,8 @@ public class OperationDefinition14_50 { return null; org.hl7.fhir.dstu2016may.model.OperationDefinition.OperationDefinitionContactComponent tgt = new org.hl7.fhir.dstu2016may.model.OperationDefinition.OperationDefinitionContactComponent(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((StringType) VersionConvertor_14_50.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.r5.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_14_50.convertContactPoint(t)); } @@ -150,8 +144,8 @@ public class OperationDefinition14_50 { return null; org.hl7.fhir.r5.model.ContactDetail tgt = new org.hl7.fhir.r5.model.ContactDetail(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu2016may.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_14_50.convertContactPoint(t)); } @@ -196,24 +190,19 @@ public class OperationDefinition14_50 { return null; org.hl7.fhir.dstu2016may.model.OperationDefinition.OperationDefinitionParameterComponent tgt = new org.hl7.fhir.dstu2016may.model.OperationDefinition.OperationDefinitionParameterComponent(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.CodeType) VersionConvertor_14_50.convertType(src.getNameElement())); if (src.hasUse()) { tgt.setUse(convertOperationParameterUse(src.getUse())); } - if (src.hasMin()) { - tgt.setMin(src.getMin()); - } - if (src.hasMax()) { - tgt.setMax(src.getMax()); - } - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasMinElement()) + tgt.setMinElement((org.hl7.fhir.dstu2016may.model.IntegerType) VersionConvertor_14_50.convertType(src.getMinElement())); + if (src.hasMaxElement()) + tgt.setMaxElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getMaxElement())); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getDocumentationElement())); if (src.hasType()) { - if (src.hasType()) { - tgt.setType(src.getType().toCode()); - } + tgt.setType(src.getType().toCode()); } if (src.hasSearchType()) { tgt.setSearchType(VersionConvertor_14_50.convertSearchParamType(src.getSearchType())); @@ -235,22 +224,19 @@ public class OperationDefinition14_50 { return null; org.hl7.fhir.r5.model.OperationDefinition.OperationDefinitionParameterComponent tgt = new org.hl7.fhir.r5.model.OperationDefinition.OperationDefinitionParameterComponent(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.CodeType) VersionConvertor_14_50.convertType(src.getNameElement())); if (src.hasUse()) { tgt.setUse(convertOperationParameterUse(src.getUse())); } - if (src.hasMin()) { - tgt.setMin(src.getMin()); - } - if (src.hasMax()) { - tgt.setMax(src.getMax()); - } - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasMinElement()) + tgt.setMinElement((org.hl7.fhir.r5.model.IntegerType) VersionConvertor_14_50.convertType(src.getMinElement())); + if (src.hasMaxElement()) + tgt.setMaxElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getMaxElement())); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getDocumentationElement())); if (src.hasType()) - tgt.setType(Enumerations.FHIRAllTypes.fromCode(src.getType())); + tgt.setType(Enumerations.FHIRAllTypes.fromCode(src.getType())); if (src.hasSearchType()) { tgt.setSearchType(VersionConvertor_14_50.convertSearchParamType(src.getSearchType())); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/OperationOutcome14_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/OperationOutcome14_50.java index 0c6a49f6e..935984ad2 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/OperationOutcome14_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/OperationOutcome14_50.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv14_50; import org.hl7.fhir.convertors.VersionConvertor_14_50; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class OperationOutcome14_50 { @@ -209,8 +210,8 @@ public class OperationOutcome14_50 { if (src.hasDetails()) { tgt.setDetails(VersionConvertor_14_50.convertCodeableConcept(src.getDetails())); } - if (src.hasDiagnostics()) - tgt.setDiagnostics(src.getDiagnostics()); + if (src.hasDiagnosticsElement()) + tgt.setDiagnosticsElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getDiagnosticsElement())); if (src.hasLocation()) { for (org.hl7.fhir.r5.model.StringType t : src.getLocation()) tgt.addLocation(t.getValue()); } @@ -234,8 +235,8 @@ public class OperationOutcome14_50 { if (src.hasDetails()) { tgt.setDetails(VersionConvertor_14_50.convertCodeableConcept(src.getDetails())); } - if (src.hasDiagnostics()) - tgt.setDiagnostics(src.getDiagnostics()); + if (src.hasDiagnosticsElement()) + tgt.setDiagnosticsElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getDiagnosticsElement())); if (src.hasLocation()) { for (org.hl7.fhir.dstu2016may.model.StringType t : src.getLocation()) tgt.addLocation(t.getValue()); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/Parameters14_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/Parameters14_50.java index 07b4304ea..ed1413f44 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/Parameters14_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/Parameters14_50.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv14_50; import org.hl7.fhir.convertors.VersionConvertor_14_50; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Parameters14_50 { @@ -32,9 +33,8 @@ public class Parameters14_50 { return null; org.hl7.fhir.r5.model.Parameters.ParametersParameterComponent tgt = new org.hl7.fhir.r5.model.Parameters.ParametersParameterComponent(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getNameElement())); if (src.hasValue()) { tgt.setValue(VersionConvertor_14_50.convertType(src.getValue())); } @@ -52,9 +52,8 @@ public class Parameters14_50 { return null; org.hl7.fhir.dstu2016may.model.Parameters.ParametersParameterComponent tgt = new org.hl7.fhir.dstu2016may.model.Parameters.ParametersParameterComponent(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getNameElement())); if (src.hasValue()) { tgt.setValue(VersionConvertor_14_50.convertType(src.getValue())); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/Questionnaire14_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/Questionnaire14_50.java index fdc628846..f179bdfa7 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/Questionnaire14_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/Questionnaire14_50.java @@ -6,6 +6,7 @@ import org.hl7.fhir.r5.model.CodeType; import org.hl7.fhir.r5.model.ContactDetail; import org.hl7.fhir.r5.model.Questionnaire.QuestionnaireItemOperator; import org.hl7.fhir.r5.model.UsageContext; +import java.util.Collections; public class Questionnaire14_50 { @@ -14,20 +15,20 @@ public class Questionnaire14_50 { return null; org.hl7.fhir.r5.model.Questionnaire tgt = new org.hl7.fhir.r5.model.Questionnaire(); VersionConvertor_14_50.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r5.model.UriType) VersionConvertor_14_50.convertType(src.getUrlElement())); if (src.hasIdentifier()) { for (org.hl7.fhir.dstu2016may.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_14_50.convertIdentifier(t)); } - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getVersionElement())); if (src.hasStatus()) { tgt.setStatus(convertQuestionnaireStatus(src.getStatus())); } - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.r5.model.DateTimeType) VersionConvertor_14_50.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getPublisherElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu2016may.model.ContactPoint t : src.getTelecom()) tgt.addContact(convertQuestionnaireContactComponent(t)); } @@ -35,8 +36,8 @@ public class Questionnaire14_50 { tgt.addJurisdiction(VersionConvertor_14_50.convertCodeableConcept(t)); else tgt.addUseContext(VersionConvertor_14_50.convertCodeableConceptToUsageContext(t)); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getTitleElement())); if (src.hasConcept()) { for (org.hl7.fhir.dstu2016may.model.Coding t : src.getConcept()) tgt.addCode(VersionConvertor_14_50.convertCoding(t)); } @@ -54,20 +55,20 @@ public class Questionnaire14_50 { return null; org.hl7.fhir.dstu2016may.model.Questionnaire tgt = new org.hl7.fhir.dstu2016may.model.Questionnaire(); VersionConvertor_14_50.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu2016may.model.UriType) VersionConvertor_14_50.convertType(src.getUrlElement())); if (src.hasIdentifier()) { for (org.hl7.fhir.r5.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_14_50.convertIdentifier(t)); } - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getVersionElement())); if (src.hasStatus()) { tgt.setStatus(convertQuestionnaireStatus(src.getStatus())); } - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu2016may.model.DateTimeType) VersionConvertor_14_50.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getPublisherElement())); if (src.hasContact()) { for (ContactDetail t : src.getContact()) for (org.hl7.fhir.r5.model.ContactPoint t1 : t.getTelecom()) tgt.addTelecom(VersionConvertor_14_50.convertContactPoint(t1)); } @@ -77,8 +78,8 @@ public class Questionnaire14_50 { if (src.hasJurisdiction()) { for (org.hl7.fhir.r5.model.CodeableConcept t : src.getJurisdiction()) tgt.addUseContext(VersionConvertor_14_50.convertCodeableConcept(t)); } - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getTitleElement())); if (src.hasCode()) { for (org.hl7.fhir.r5.model.Coding t : src.getCode()) tgt.addConcept(VersionConvertor_14_50.convertCoding(t)); } @@ -105,29 +106,29 @@ public class Questionnaire14_50 { return null; org.hl7.fhir.dstu2016may.model.Questionnaire.QuestionnaireItemComponent tgt = new org.hl7.fhir.dstu2016may.model.Questionnaire.QuestionnaireItemComponent(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasLinkId()) - tgt.setLinkId(src.getLinkId()); + if (src.hasLinkIdElement()) + tgt.setLinkIdElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getLinkIdElement())); if (src.hasCode()) { for (org.hl7.fhir.r5.model.Coding t : src.getCode()) tgt.addConcept(VersionConvertor_14_50.convertCoding(t)); } - if (src.hasPrefix()) - tgt.setPrefix(src.getPrefix()); - if (src.hasText()) - tgt.setText(src.getText()); + if (src.hasPrefixElement()) + tgt.setPrefixElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getPrefixElement())); + if (src.hasTextElement()) + tgt.setTextElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getTextElement())); if (src.hasType()) { tgt.setType(convertQuestionnaireItemType(src.getType())); } if (src.hasEnableWhen()) { for (org.hl7.fhir.r5.model.Questionnaire.QuestionnaireItemEnableWhenComponent t : src.getEnableWhen()) tgt.addEnableWhen(convertQuestionnaireItemEnableWhenComponent(t)); } - if (src.hasRequired()) - tgt.setRequired(src.getRequired()); - if (src.hasRepeats()) - tgt.setRepeats(src.getRepeats()); - if (src.hasReadOnly()) - tgt.setReadOnly(src.getReadOnly()); - if (src.hasMaxLength()) - tgt.setMaxLength(src.getMaxLength()); + if (src.hasRequiredElement()) + tgt.setRequiredElement((org.hl7.fhir.dstu2016may.model.BooleanType) VersionConvertor_14_50.convertType(src.getRequiredElement())); + if (src.hasRepeatsElement()) + tgt.setRepeatsElement((org.hl7.fhir.dstu2016may.model.BooleanType) VersionConvertor_14_50.convertType(src.getRepeatsElement())); + if (src.hasReadOnlyElement()) + tgt.setReadOnlyElement((org.hl7.fhir.dstu2016may.model.BooleanType) VersionConvertor_14_50.convertType(src.getReadOnlyElement())); + if (src.hasMaxLengthElement()) + tgt.setMaxLengthElement((org.hl7.fhir.dstu2016may.model.IntegerType) VersionConvertor_14_50.convertType(src.getMaxLengthElement())); if (src.hasAnswerValueSetElement()) { tgt.setOptions(VersionConvertor_14_50.convertCanonicalToReference(src.getAnswerValueSetElement())); } @@ -147,29 +148,29 @@ public class Questionnaire14_50 { return null; org.hl7.fhir.r5.model.Questionnaire.QuestionnaireItemComponent tgt = new org.hl7.fhir.r5.model.Questionnaire.QuestionnaireItemComponent(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasLinkId()) - tgt.setLinkId(src.getLinkId()); + if (src.hasLinkIdElement()) + tgt.setLinkIdElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getLinkIdElement())); if (src.hasConcept()) { for (org.hl7.fhir.dstu2016may.model.Coding t : src.getConcept()) tgt.addCode(VersionConvertor_14_50.convertCoding(t)); } - if (src.hasPrefix()) - tgt.setPrefix(src.getPrefix()); - if (src.hasText()) - tgt.setText(src.getText()); + if (src.hasPrefixElement()) + tgt.setPrefixElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getPrefixElement())); + if (src.hasTextElement()) + tgt.setTextElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getTextElement())); if (src.hasType()) { tgt.setType(convertQuestionnaireItemType(src.getType())); } if (src.hasEnableWhen()) { for (org.hl7.fhir.dstu2016may.model.Questionnaire.QuestionnaireItemEnableWhenComponent t : src.getEnableWhen()) tgt.addEnableWhen(convertQuestionnaireItemEnableWhenComponent(t)); } - if (src.hasRequired()) - tgt.setRequired(src.getRequired()); - if (src.hasRepeats()) - tgt.setRepeats(src.getRepeats()); - if (src.hasReadOnly()) - tgt.setReadOnly(src.getReadOnly()); - if (src.hasMaxLength()) - tgt.setMaxLength(src.getMaxLength()); + if (src.hasRequiredElement()) + tgt.setRequiredElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_14_50.convertType(src.getRequiredElement())); + if (src.hasRepeatsElement()) + tgt.setRepeatsElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_14_50.convertType(src.getRepeatsElement())); + if (src.hasReadOnlyElement()) + tgt.setReadOnlyElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_14_50.convertType(src.getReadOnlyElement())); + if (src.hasMaxLengthElement()) + tgt.setMaxLengthElement((org.hl7.fhir.r5.model.IntegerType) VersionConvertor_14_50.convertType(src.getMaxLengthElement())); if (src.hasOptions()) { tgt.setAnswerValueSetElement(VersionConvertor_14_50.convertReferenceToCanonical(src.getOptions())); } @@ -190,9 +191,8 @@ public class Questionnaire14_50 { return null; org.hl7.fhir.r5.model.Questionnaire.QuestionnaireItemEnableWhenComponent tgt = new org.hl7.fhir.r5.model.Questionnaire.QuestionnaireItemEnableWhenComponent(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasQuestion()) { - tgt.setQuestion(src.getQuestion()); - } + if (src.hasQuestionElement()) + tgt.setQuestionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getQuestionElement())); if (src.hasAnswered()) { tgt.setOperator(QuestionnaireItemOperator.EXISTS); if (src.hasAnsweredElement()) { @@ -210,9 +210,8 @@ public class Questionnaire14_50 { return null; org.hl7.fhir.dstu2016may.model.Questionnaire.QuestionnaireItemEnableWhenComponent tgt = new org.hl7.fhir.dstu2016may.model.Questionnaire.QuestionnaireItemEnableWhenComponent(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasQuestion()) { - tgt.setQuestion(src.getQuestion()); - } + if (src.hasQuestionElement()) + tgt.setQuestionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getQuestionElement())); if (src.hasOperator() && src.getOperator() == QuestionnaireItemOperator.EXISTS) tgt.setAnswered(src.getAnswerBooleanType().getValue()); else diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/QuestionnaireResponse14_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/QuestionnaireResponse14_50.java index f5aa04527..5d1f92ed4 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/QuestionnaireResponse14_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/QuestionnaireResponse14_50.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv14_50; import org.hl7.fhir.convertors.VersionConvertor_14_50; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class QuestionnaireResponse14_50 { @@ -28,8 +29,8 @@ public class QuestionnaireResponse14_50 { if (src.hasAuthor()) { tgt.setAuthor(VersionConvertor_14_50.convertReference(src.getAuthor())); } - if (src.hasAuthored()) - tgt.setAuthored(src.getAuthored()); + if (src.hasAuthoredElement()) + tgt.setAuthoredElement((org.hl7.fhir.dstu2016may.model.DateTimeType) VersionConvertor_14_50.convertType(src.getAuthoredElement())); if (src.hasSource()) { tgt.setSource(VersionConvertor_14_50.convertReference(src.getSource())); } @@ -62,8 +63,8 @@ public class QuestionnaireResponse14_50 { if (src.hasAuthor()) { tgt.setAuthor(VersionConvertor_14_50.convertReference(src.getAuthor())); } - if (src.hasAuthored()) - tgt.setAuthored(src.getAuthored()); + if (src.hasAuthoredElement()) + tgt.setAuthoredElement((org.hl7.fhir.r5.model.DateTimeType) VersionConvertor_14_50.convertType(src.getAuthoredElement())); if (src.hasSource()) { tgt.setSource(VersionConvertor_14_50.convertReference(src.getSource())); } @@ -106,10 +107,10 @@ public class QuestionnaireResponse14_50 { return null; org.hl7.fhir.dstu2016may.model.QuestionnaireResponse.QuestionnaireResponseItemComponent tgt = new org.hl7.fhir.dstu2016may.model.QuestionnaireResponse.QuestionnaireResponseItemComponent(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasLinkId()) - tgt.setLinkId(src.getLinkId()); - if (src.hasText()) - tgt.setText(src.getText()); + if (src.hasLinkIdElement()) + tgt.setLinkIdElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getLinkIdElement())); + if (src.hasTextElement()) + tgt.setTextElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getTextElement())); if (src.hasAnswer()) { for (org.hl7.fhir.r5.model.QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent t : src.getAnswer()) tgt.addAnswer(convertQuestionnaireResponseItemAnswerComponent(t)); } @@ -124,10 +125,10 @@ public class QuestionnaireResponse14_50 { return null; org.hl7.fhir.r5.model.QuestionnaireResponse.QuestionnaireResponseItemComponent tgt = new org.hl7.fhir.r5.model.QuestionnaireResponse.QuestionnaireResponseItemComponent(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasLinkId()) - tgt.setLinkId(src.getLinkId()); - if (src.hasText()) - tgt.setText(src.getText()); + if (src.hasLinkIdElement()) + tgt.setLinkIdElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getLinkIdElement())); + if (src.hasTextElement()) + tgt.setTextElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getTextElement())); if (src.hasAnswer()) { for (org.hl7.fhir.dstu2016may.model.QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent t : src.getAnswer()) tgt.addAnswer(convertQuestionnaireResponseItemAnswerComponent(t)); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/SearchParameter14_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/SearchParameter14_50.java index ffedb2d22..6e46d94ed 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/SearchParameter14_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/SearchParameter14_50.java @@ -3,6 +3,9 @@ package org.hl7.fhir.convertors.conv14_50; import org.hl7.fhir.convertors.VersionConvertor_14_50; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r5.model.CodeType; +import org.hl7.fhir.r5.model.StringType; + +import java.util.Collections; public class SearchParameter14_50 { @@ -11,21 +14,19 @@ public class SearchParameter14_50 { return null; org.hl7.fhir.dstu2016may.model.SearchParameter tgt = new org.hl7.fhir.dstu2016may.model.SearchParameter(); VersionConvertor_14_50.copyDomainResource(src, tgt); - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu2016may.model.UriType) VersionConvertor_14_50.convertType(src.getUrlElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_14_50.convertConformanceResourceStatus(src.getStatus())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu2016may.model.BooleanType) VersionConvertor_14_50.convertType(src.getExperimentalElement())); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu2016may.model.DateTimeType) VersionConvertor_14_50.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.r5.model.ContactDetail t : src.getContact()) tgt.addContact(convertSearchParameterContactComponent(t)); } @@ -36,22 +37,20 @@ public class SearchParameter14_50 { } if (src.hasPurpose()) tgt.setRequirements(src.getPurpose()); - if (src.hasCode()) { - tgt.setCode(src.getCode()); - } + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu2016may.model.CodeType) VersionConvertor_14_50.convertType(src.getCodeElement())); if (src.hasBase()) { for (CodeType t : src.getBase()) tgt.setBase(t.asStringValue()); } if (src.hasType()) { tgt.setType(VersionConvertor_14_50.convertSearchParamType(src.getType())); } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } - if (src.hasExpression()) - tgt.setExpression(VersionConvertor_14_50.convertTo2016MayExpression(src.getExpression())); - if (src.hasXpath()) - tgt.setXpath(src.getXpath()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getDescriptionElement())); + if (src.hasExpressionElement()) + tgt.setExpressionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getExpressionElement())); + if (src.hasXpathElement()) + tgt.setXpathElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getXpathElement())); if (src.hasXpathUsage()) { tgt.setXpathUsage(convertXPathUsageType(src.getXpathUsage())); } @@ -66,21 +65,19 @@ public class SearchParameter14_50 { return null; org.hl7.fhir.r5.model.SearchParameter tgt = new org.hl7.fhir.r5.model.SearchParameter(); VersionConvertor_14_50.copyDomainResource(src, tgt); - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r5.model.UriType) VersionConvertor_14_50.convertType(src.getUrlElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_14_50.convertConformanceResourceStatus(src.getStatus())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_14_50.convertType(src.getExperimentalElement())); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.r5.model.DateTimeType) VersionConvertor_14_50.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu2016may.model.SearchParameter.SearchParameterContactComponent t : src.getContact()) tgt.addContact(convertSearchParameterContactComponent(t)); } @@ -90,22 +87,19 @@ public class SearchParameter14_50 { tgt.addUseContext(VersionConvertor_14_50.convertCodeableConceptToUsageContext(t)); if (src.hasRequirements()) tgt.setPurpose(src.getRequirements()); - if (src.hasCode()) { - tgt.setCode(src.getCode()); - } - if (src.hasBase()) { - tgt.addBase(src.getBase()); - } + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.r5.model.CodeType) VersionConvertor_14_50.convertType(src.getCodeElement())); + if (src.hasBaseElement()) + tgt.setBase(Collections.singletonList((org.hl7.fhir.r5.model.CodeType) VersionConvertor_14_50.convertType(src.getBaseElement()))); if (src.hasType()) { tgt.setType(VersionConvertor_14_50.convertSearchParamType(src.getType())); } - if (src.hasDescription()) { + if (src.hasDescription()) tgt.setDescription(src.getDescription()); - } - if (src.hasExpression()) - tgt.setExpression(VersionConvertor_14_50.convertToR4Expression(src.getExpression())); - if (src.hasXpath()) - tgt.setXpath(src.getXpath()); + if (src.hasExpressionElement()) + tgt.setExpressionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getExpressionElement())); + if (src.hasXpathElement()) + tgt.setXpathElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getXpathElement())); if (src.hasXpathUsage()) { tgt.setXpathUsage(convertXPathUsageType(src.getXpathUsage())); } @@ -120,8 +114,8 @@ public class SearchParameter14_50 { return null; org.hl7.fhir.r5.model.ContactDetail tgt = new org.hl7.fhir.r5.model.ContactDetail(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((StringType) VersionConvertor_14_50.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu2016may.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_14_50.convertContactPoint(t)); } @@ -133,8 +127,8 @@ public class SearchParameter14_50 { return null; org.hl7.fhir.dstu2016may.model.SearchParameter.SearchParameterContactComponent tgt = new org.hl7.fhir.dstu2016may.model.SearchParameter.SearchParameterContactComponent(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.r5.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_14_50.convertContactPoint(t)); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/StructureDefinition14_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/StructureDefinition14_50.java index 6f2cc246a..7aa5636c2 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/StructureDefinition14_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/StructureDefinition14_50.java @@ -1,10 +1,12 @@ package org.hl7.fhir.convertors.conv14_50; import org.hl7.fhir.convertors.VersionConvertor_14_50; +import org.hl7.fhir.dstu2016may.model.StringType; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r5.model.ElementDefinition; import org.hl7.fhir.r5.model.StructureDefinition.TypeDerivationRule; import org.hl7.fhir.utilities.Utilities; +import java.util.Collections; public class StructureDefinition14_50 { @@ -48,32 +50,31 @@ public class StructureDefinition14_50 { return null; org.hl7.fhir.dstu2016may.model.StructureDefinition tgt = new org.hl7.fhir.dstu2016may.model.StructureDefinition(); VersionConvertor_14_50.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu2016may.model.UriType) VersionConvertor_14_50.convertType(src.getUrlElement())); if (src.hasIdentifier()) { for (org.hl7.fhir.r5.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_14_50.convertIdentifier(t)); } - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasTitle()) - tgt.setDisplay(src.getTitle()); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getNameElement())); + if (src.hasTitleElement()) + tgt.setDisplayElement((StringType) VersionConvertor_14_50.convertType(src.getTitleElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_14_50.convertConformanceResourceStatus(src.getStatus())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu2016may.model.BooleanType) VersionConvertor_14_50.convertType(src.getExperimentalElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.r5.model.ContactDetail t : src.getContact()) tgt.addContact(convertStructureDefinitionContactComponent(t)); } - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu2016may.model.DateTimeType) VersionConvertor_14_50.convertType(src.getDateElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getDescriptionElement())); for (org.hl7.fhir.r5.model.UsageContext t : src.getUseContext()) if (t.hasValueCodeableConcept()) tgt.addUseContext(VersionConvertor_14_50.convertCodeableConcept(t.getValueCodeableConcept())); if (src.hasJurisdiction()) { @@ -81,8 +82,8 @@ public class StructureDefinition14_50 { } if (src.hasPurpose()) tgt.setRequirements(src.getPurpose()); - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getCopyrightElement())); if (src.hasKeyword()) { for (org.hl7.fhir.r5.model.Coding t : src.getKeyword()) tgt.addCode(VersionConvertor_14_50.convertCoding(t)); } @@ -94,16 +95,15 @@ public class StructureDefinition14_50 { if (src.hasKind()) { tgt.setKind(convertStructureDefinitionKind(src.getKind())); } - if (src.hasAbstract()) { - tgt.setAbstract(src.getAbstract()); - } + if (src.hasAbstractElement()) + tgt.setAbstractElement((org.hl7.fhir.dstu2016may.model.BooleanType) VersionConvertor_14_50.convertType(src.getAbstractElement())); for (org.hl7.fhir.r5.model.StructureDefinition.StructureDefinitionContextComponent t : src.getContext()) { if (!tgt.hasContextType()) tgt.setContextType(convertExtensionContext(t.getType(), t.getExpression())); tgt.addContext("Element".equals(t.getExpression()) ? "*" : t.getExpression()); } - if (src.hasBaseDefinition()) - tgt.setBaseDefinition(src.getBaseDefinition()); + if (src.hasBaseDefinitionElement()) + tgt.setBaseDefinitionElement((org.hl7.fhir.dstu2016may.model.UriType) VersionConvertor_14_50.convertType(src.getBaseDefinitionElement())); if (src.hasType() && src.getDerivation() == org.hl7.fhir.r5.model.StructureDefinition.TypeDerivationRule.CONSTRAINT) tgt.setBaseType(src.getType()); if (src.hasDerivation()) { @@ -122,30 +122,29 @@ public class StructureDefinition14_50 { return null; org.hl7.fhir.r5.model.StructureDefinition tgt = new org.hl7.fhir.r5.model.StructureDefinition(); VersionConvertor_14_50.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r5.model.UriType) VersionConvertor_14_50.convertType(src.getUrlElement())); if (src.hasIdentifier()) { for (org.hl7.fhir.dstu2016may.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_14_50.convertIdentifier(t)); } - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasDisplay()) - tgt.setTitle(src.getDisplay()); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getNameElement())); + if (src.hasDisplayElement()) + tgt.setTitleElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getDisplayElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_14_50.convertConformanceResourceStatus(src.getStatus())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_14_50.convertType(src.getExperimentalElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu2016may.model.StructureDefinition.StructureDefinitionContactComponent t : src.getContact()) tgt.addContact(convertStructureDefinitionContactComponent(t)); } - if (src.hasDate()) - tgt.setDate(src.getDate()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.r5.model.DateTimeType) VersionConvertor_14_50.convertType(src.getDateElement())); if (src.hasDescription()) tgt.setDescription(src.getDescription()); for (org.hl7.fhir.dstu2016may.model.CodeableConcept t : src.getUseContext()) if (VersionConvertor_14_50.isJurisdiction(t)) @@ -167,9 +166,8 @@ public class StructureDefinition14_50 { if (src.hasKind()) { tgt.setKind(convertStructureDefinitionKind(src.getKind(), src.getName())); } - if (src.hasAbstract()) { - tgt.setAbstract(src.getAbstract()); - } + if (src.hasAbstractElement()) + tgt.setAbstractElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_14_50.convertType(src.getAbstractElement())); for (org.hl7.fhir.dstu2016may.model.StringType t : src.getContext()) { org.hl7.fhir.r5.model.StructureDefinition.StructureDefinitionContextComponent ec = tgt.addContext(); if (src.hasContextType()) { @@ -181,8 +179,8 @@ public class StructureDefinition14_50 { tgt.setType(src.getBaseType()); else tgt.setType(src.getId()); - if (src.hasBaseDefinition()) - tgt.setBaseDefinition(src.getBaseDefinition()); + if (src.hasBaseDefinitionElement()) + tgt.setBaseDefinitionElement((org.hl7.fhir.r5.model.CanonicalType) VersionConvertor_14_50.convertType(src.getBaseDefinitionElement())); if (src.hasDerivation()) { tgt.setDerivation(convertTypeDerivationRule(src.getDerivation())); } @@ -213,8 +211,8 @@ public class StructureDefinition14_50 { return null; org.hl7.fhir.r5.model.ContactDetail tgt = new org.hl7.fhir.r5.model.ContactDetail(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu2016may.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_14_50.convertContactPoint(t)); } @@ -226,8 +224,8 @@ public class StructureDefinition14_50 { return null; org.hl7.fhir.dstu2016may.model.StructureDefinition.StructureDefinitionContactComponent tgt = new org.hl7.fhir.dstu2016may.model.StructureDefinition.StructureDefinitionContactComponent(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((StringType) VersionConvertor_14_50.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.r5.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_14_50.convertContactPoint(t)); } @@ -298,15 +296,14 @@ public class StructureDefinition14_50 { return null; org.hl7.fhir.r5.model.StructureDefinition.StructureDefinitionMappingComponent tgt = new org.hl7.fhir.r5.model.StructureDefinition.StructureDefinitionMappingComponent(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasIdentity()) { - tgt.setIdentity(src.getIdentity()); - } - if (src.hasUri()) - tgt.setUri(src.getUri()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasComments()) - tgt.setComment(src.getComments()); + if (src.hasIdentityElement()) + tgt.setIdentityElement((org.hl7.fhir.r5.model.IdType) VersionConvertor_14_50.convertType(src.getIdentityElement())); + if (src.hasUriElement()) + tgt.setUriElement((org.hl7.fhir.r5.model.UriType) VersionConvertor_14_50.convertType(src.getUriElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getNameElement())); + if (src.hasCommentsElement()) + tgt.setCommentElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getCommentsElement())); return tgt; } @@ -315,15 +312,14 @@ public class StructureDefinition14_50 { return null; org.hl7.fhir.dstu2016may.model.StructureDefinition.StructureDefinitionMappingComponent tgt = new org.hl7.fhir.dstu2016may.model.StructureDefinition.StructureDefinitionMappingComponent(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasIdentity()) { - tgt.setIdentity(src.getIdentity()); - } - if (src.hasUri()) - tgt.setUri(src.getUri()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasComment()) - tgt.setComments(src.getComment()); + if (src.hasIdentityElement()) + tgt.setIdentityElement((org.hl7.fhir.dstu2016may.model.IdType) VersionConvertor_14_50.convertType(src.getIdentityElement())); + if (src.hasUriElement()) + tgt.setUriElement((org.hl7.fhir.dstu2016may.model.UriType) VersionConvertor_14_50.convertType(src.getUriElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getNameElement())); + if (src.hasCommentElement()) + tgt.setCommentsElement((StringType) VersionConvertor_14_50.convertType(src.getCommentElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/StructureMap14_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/StructureMap14_50.java index d62e1dd2c..b0ad9c3f8 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/StructureMap14_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/StructureMap14_50.java @@ -6,6 +6,9 @@ import org.hl7.fhir.dstu2016may.model.StructureMap.StructureMapContextType; import org.hl7.fhir.dstu2016may.model.StructureMap.StructureMapListMode; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r5.model.Enumeration; +import org.hl7.fhir.r5.model.StringType; + +import java.util.Collections; public class StructureMap14_50 { @@ -14,29 +17,27 @@ public class StructureMap14_50 { return null; org.hl7.fhir.r5.model.StructureMap tgt = new org.hl7.fhir.r5.model.StructureMap(); VersionConvertor_14_50.copyDomainResource(src, tgt); - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r5.model.UriType) VersionConvertor_14_50.convertType(src.getUrlElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_14_50.convertConformanceResourceStatus(src.getStatus())); } if (src.hasIdentifier()) { for (org.hl7.fhir.dstu2016may.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_14_50.convertIdentifier(t)); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_14_50.convertType(src.getExperimentalElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu2016may.model.StructureMap.StructureMapContactComponent t : src.getContact()) tgt.addContact(convertStructureMapContactComponent(t)); } - if (src.hasDate()) - tgt.setDate(src.getDate()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.r5.model.DateTimeType) VersionConvertor_14_50.convertType(src.getDateElement())); if (src.hasDescription()) tgt.setDescription(src.getDescription()); for (org.hl7.fhir.dstu2016may.model.CodeableConcept t : src.getUseContext()) if (VersionConvertor_14_50.isJurisdiction(t)) @@ -64,31 +65,29 @@ public class StructureMap14_50 { return null; org.hl7.fhir.dstu2016may.model.StructureMap tgt = new org.hl7.fhir.dstu2016may.model.StructureMap(); VersionConvertor_14_50.copyDomainResource(src, tgt); - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu2016may.model.UriType) VersionConvertor_14_50.convertType(src.getUrlElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_14_50.convertConformanceResourceStatus(src.getStatus())); } if (src.hasIdentifier()) { for (org.hl7.fhir.r5.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_14_50.convertIdentifier(t)); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu2016may.model.BooleanType) VersionConvertor_14_50.convertType(src.getExperimentalElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.r5.model.ContactDetail t : src.getContact()) tgt.addContact(convertStructureMapContactComponent(t)); } - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu2016may.model.DateTimeType) VersionConvertor_14_50.convertType(src.getDateElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getDescriptionElement())); for (org.hl7.fhir.r5.model.UsageContext t : src.getUseContext()) if (t.hasValueCodeableConcept()) tgt.addUseContext(VersionConvertor_14_50.convertCodeableConcept(t.getValueCodeableConcept())); if (src.hasJurisdiction()) { @@ -96,8 +95,8 @@ public class StructureMap14_50 { } if (src.hasPurpose()) tgt.setRequirements(src.getPurpose()); - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getCopyrightElement())); if (src.hasStructure()) { for (org.hl7.fhir.r5.model.StructureMap.StructureMapStructureComponent t : src.getStructure()) tgt.addStructure(convertStructureMapStructureComponent(t)); } @@ -115,8 +114,8 @@ public class StructureMap14_50 { return null; org.hl7.fhir.r5.model.ContactDetail tgt = new org.hl7.fhir.r5.model.ContactDetail(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((StringType) VersionConvertor_14_50.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu2016may.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_14_50.convertContactPoint(t)); } @@ -128,8 +127,8 @@ public class StructureMap14_50 { return null; org.hl7.fhir.dstu2016may.model.StructureMap.StructureMapContactComponent tgt = new org.hl7.fhir.dstu2016may.model.StructureMap.StructureMapContactComponent(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.r5.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_14_50.convertContactPoint(t)); } @@ -167,14 +166,13 @@ public class StructureMap14_50 { return null; org.hl7.fhir.r5.model.StructureMap.StructureMapGroupComponent tgt = new org.hl7.fhir.r5.model.StructureMap.StructureMapGroupComponent(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasExtends()) - tgt.setExtends(src.getExtends()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.IdType) VersionConvertor_14_50.convertType(src.getNameElement())); + if (src.hasExtendsElement()) + tgt.setExtendsElement((org.hl7.fhir.r5.model.IdType) VersionConvertor_14_50.convertType(src.getExtendsElement())); tgt.setTypeMode(org.hl7.fhir.r5.model.StructureMap.StructureMapGroupTypeMode.NONE); - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getDocumentationElement())); if (src.hasInput()) { for (org.hl7.fhir.dstu2016may.model.StructureMap.StructureMapGroupInputComponent t : src.getInput()) tgt.addInput(convertStructureMapGroupInputComponent(t)); } @@ -189,15 +187,14 @@ public class StructureMap14_50 { return null; org.hl7.fhir.dstu2016may.model.StructureMap.StructureMapGroupComponent tgt = new org.hl7.fhir.dstu2016may.model.StructureMap.StructureMapGroupComponent(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasExtends()) - tgt.setExtends(src.getExtends()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.IdType) VersionConvertor_14_50.convertType(src.getNameElement())); + if (src.hasExtendsElement()) + tgt.setExtendsElement((org.hl7.fhir.dstu2016may.model.IdType) VersionConvertor_14_50.convertType(src.getExtendsElement())); if (!src.getTypeMode().equals(org.hl7.fhir.r5.model.StructureMap.StructureMapGroupTypeMode.NONE)) throw new FHIRException("Unable to downgrade structure map with group.typeMode other than 'None': " + src.getTypeMode().getDisplay()); - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getDocumentationElement())); if (src.hasInput()) { for (org.hl7.fhir.r5.model.StructureMap.StructureMapGroupInputComponent t : src.getInput()) tgt.addInput(convertStructureMapGroupInputComponent(t)); } @@ -212,16 +209,15 @@ public class StructureMap14_50 { return null; org.hl7.fhir.dstu2016may.model.StructureMap.StructureMapGroupInputComponent tgt = new org.hl7.fhir.dstu2016may.model.StructureMap.StructureMapGroupInputComponent(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasType()) - tgt.setType(src.getType()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.IdType) VersionConvertor_14_50.convertType(src.getNameElement())); + if (src.hasTypeElement()) + tgt.setTypeElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getTypeElement())); if (src.hasMode()) { tgt.setMode(convertStructureMapInputMode(src.getMode())); } - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getDocumentationElement())); return tgt; } @@ -230,16 +226,15 @@ public class StructureMap14_50 { return null; org.hl7.fhir.r5.model.StructureMap.StructureMapGroupInputComponent tgt = new org.hl7.fhir.r5.model.StructureMap.StructureMapGroupInputComponent(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } - if (src.hasType()) - tgt.setType(src.getType()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.IdType) VersionConvertor_14_50.convertType(src.getNameElement())); + if (src.hasTypeElement()) + tgt.setTypeElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getTypeElement())); if (src.hasMode()) { tgt.setMode(convertStructureMapInputMode(src.getMode())); } - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getDocumentationElement())); return tgt; } @@ -248,9 +243,8 @@ public class StructureMap14_50 { return null; org.hl7.fhir.dstu2016may.model.StructureMap.StructureMapGroupRuleComponent tgt = new org.hl7.fhir.dstu2016may.model.StructureMap.StructureMapGroupRuleComponent(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.IdType) VersionConvertor_14_50.convertType(src.getNameElement())); if (src.hasSource()) { for (org.hl7.fhir.r5.model.StructureMap.StructureMapGroupRuleSourceComponent t : src.getSource()) tgt.addSource(convertStructureMapGroupRuleSourceComponent(t)); } @@ -263,8 +257,8 @@ public class StructureMap14_50 { if (src.hasDependent()) { for (org.hl7.fhir.r5.model.StructureMap.StructureMapGroupRuleDependentComponent t : src.getDependent()) tgt.addDependent(convertStructureMapGroupRuleDependentComponent(t)); } - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getDocumentationElement())); return tgt; } @@ -273,9 +267,8 @@ public class StructureMap14_50 { return null; org.hl7.fhir.r5.model.StructureMap.StructureMapGroupRuleComponent tgt = new org.hl7.fhir.r5.model.StructureMap.StructureMapGroupRuleComponent(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.IdType) VersionConvertor_14_50.convertType(src.getNameElement())); if (src.hasSource()) { for (org.hl7.fhir.dstu2016may.model.StructureMap.StructureMapGroupRuleSourceComponent t : src.getSource()) tgt.addSource(convertStructureMapGroupRuleSourceComponent(t)); } @@ -288,8 +281,8 @@ public class StructureMap14_50 { if (src.hasDependent()) { for (org.hl7.fhir.dstu2016may.model.StructureMap.StructureMapGroupRuleDependentComponent t : src.getDependent()) tgt.addDependent(convertStructureMapGroupRuleDependentComponent(t)); } - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getDocumentationElement())); return tgt; } @@ -298,9 +291,8 @@ public class StructureMap14_50 { return null; org.hl7.fhir.dstu2016may.model.StructureMap.StructureMapGroupRuleDependentComponent tgt = new org.hl7.fhir.dstu2016may.model.StructureMap.StructureMapGroupRuleDependentComponent(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.IdType) VersionConvertor_14_50.convertType(src.getNameElement())); if (src.hasVariable()) { for (org.hl7.fhir.r5.model.StringType t : src.getVariable()) tgt.addVariable(t.asStringValue()); } @@ -312,9 +304,8 @@ public class StructureMap14_50 { return null; org.hl7.fhir.r5.model.StructureMap.StructureMapGroupRuleDependentComponent tgt = new org.hl7.fhir.r5.model.StructureMap.StructureMapGroupRuleDependentComponent(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.IdType) VersionConvertor_14_50.convertType(src.getNameElement())); if (src.hasVariable()) { for (org.hl7.fhir.dstu2016may.model.StringType t : src.getVariable()) tgt.addVariable(t.asStringValue()); } @@ -327,19 +318,18 @@ public class StructureMap14_50 { org.hl7.fhir.dstu2016may.model.StructureMap.StructureMapGroupRuleSourceComponent tgt = new org.hl7.fhir.dstu2016may.model.StructureMap.StructureMapGroupRuleSourceComponent(); VersionConvertor_14_50.copyElement(src, tgt); tgt.setContextType(StructureMapContextType.TYPE); - if (src.hasContext()) { - tgt.setContext(src.getContext()); - } - if (src.hasElement()) - tgt.setElement(src.getElement()); + if (src.hasContextElement()) + tgt.setContextElement((org.hl7.fhir.dstu2016may.model.IdType) VersionConvertor_14_50.convertType(src.getContextElement())); + if (src.hasElementElement()) + tgt.setElementElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getElementElement())); if (src.hasListMode()) tgt.setListMode(convertStructureMapSourceListMode(src.getListMode())); - if (src.hasVariable()) - tgt.setVariable(src.getVariable()); - if (src.hasCondition()) - tgt.setCondition(src.getCondition()); - if (src.hasCheck()) - tgt.setCheck(src.getCheck()); + if (src.hasVariableElement()) + tgt.setVariableElement((org.hl7.fhir.dstu2016may.model.IdType) VersionConvertor_14_50.convertType(src.getVariableElement())); + if (src.hasConditionElement()) + tgt.setConditionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getConditionElement())); + if (src.hasCheckElement()) + tgt.setCheckElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getCheckElement())); return tgt; } @@ -352,17 +342,17 @@ public class StructureMap14_50 { tgt.setMin(src.getRequired() ? 1 : 0); } if (src.getContextType().equals(StructureMap.StructureMapContextType.TYPE)) - tgt.setType(src.getContext()); - if (src.hasElement()) - tgt.setElement(src.getElement()); + tgt.setContextElement((org.hl7.fhir.r5.model.IdType) VersionConvertor_14_50.convertType(src.getContextElement())); + if (src.hasElementElement()) + tgt.setElementElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getElementElement())); if (src.hasListMode()) tgt.setListMode(convertStructureMapSourceListMode(src.getListMode())); - if (src.hasVariable()) - tgt.setVariable(src.getVariable()); - if (src.hasCondition()) - tgt.setCondition(src.getCondition()); - if (src.hasCheck()) - tgt.setCheck(src.getCheck()); + if (src.hasVariableElement()) + tgt.setVariableElement((org.hl7.fhir.r5.model.IdType) VersionConvertor_14_50.convertType(src.getVariableElement())); + if (src.hasConditionElement()) + tgt.setConditionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getConditionElement())); + if (src.hasCheckElement()) + tgt.setCheckElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getCheckElement())); return tgt; } @@ -371,19 +361,19 @@ public class StructureMap14_50 { return null; org.hl7.fhir.dstu2016may.model.StructureMap.StructureMapGroupRuleTargetComponent tgt = new org.hl7.fhir.dstu2016may.model.StructureMap.StructureMapGroupRuleTargetComponent(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasContext()) - tgt.setContext(src.getContext()); + if (src.hasContextElement()) + tgt.setContextElement((org.hl7.fhir.dstu2016may.model.IdType) VersionConvertor_14_50.convertType(src.getContextElement())); if (src.hasContextType()) tgt.setContextType(convertStructureMapContextType(src.getContextType())); - if (src.hasElement()) - tgt.setElement(src.getElement()); - if (src.hasVariable()) - tgt.setVariable(src.getVariable()); + if (src.hasElementElement()) + tgt.setElementElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getElementElement())); + if (src.hasVariableElement()) + tgt.setVariableElement((org.hl7.fhir.dstu2016may.model.IdType) VersionConvertor_14_50.convertType(src.getVariableElement())); if (src.hasListMode()) { for (Enumeration t : src.getListMode()) tgt.addListMode(convertStructureMapTargetListMode(t.getValue())); } - if (src.hasListRuleId()) - tgt.setListRuleId(src.getListRuleId()); + if (src.hasListRuleIdElement()) + tgt.setListRuleIdElement((org.hl7.fhir.dstu2016may.model.IdType) VersionConvertor_14_50.convertType(src.getListRuleIdElement())); if (src.hasTransform()) tgt.setTransform(convertStructureMapTransform(src.getTransform())); if (src.hasParameter()) { @@ -397,19 +387,19 @@ public class StructureMap14_50 { return null; org.hl7.fhir.r5.model.StructureMap.StructureMapGroupRuleTargetComponent tgt = new org.hl7.fhir.r5.model.StructureMap.StructureMapGroupRuleTargetComponent(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasContext()) - tgt.setContext(src.getContext()); + if (src.hasContextElement()) + tgt.setContextElement((org.hl7.fhir.r5.model.IdType) VersionConvertor_14_50.convertType(src.getContextElement())); if (src.hasContextType()) tgt.setContextType(convertStructureMapContextType(src.getContextType())); - if (src.hasElement()) - tgt.setElement(src.getElement()); - if (src.hasVariable()) - tgt.setVariable(src.getVariable()); + if (src.hasElementElement()) + tgt.setElementElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getElementElement())); + if (src.hasVariableElement()) + tgt.setVariableElement((org.hl7.fhir.r5.model.IdType) VersionConvertor_14_50.convertType(src.getVariableElement())); if (src.hasListMode()) { for (org.hl7.fhir.dstu2016may.model.Enumeration t : src.getListMode()) VersionConvertor_14_50.copyElement(t, tgt.addListModeElement().setValue(convertStructureMapTargetListMode(t.getValue()))); } - if (src.hasListRuleId()) - tgt.setListRuleId(src.getListRuleId()); + if (src.hasListRuleIdElement()) + tgt.setListRuleIdElement((org.hl7.fhir.r5.model.IdType) VersionConvertor_14_50.convertType(src.getListRuleIdElement())); if (src.hasTransform()) tgt.setTransform(convertStructureMapTransform(src.getTransform())); if (src.hasParameter()) { @@ -497,14 +487,13 @@ public class StructureMap14_50 { return null; org.hl7.fhir.dstu2016may.model.StructureMap.StructureMapStructureComponent tgt = new org.hl7.fhir.dstu2016may.model.StructureMap.StructureMapStructureComponent(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu2016may.model.UriType) VersionConvertor_14_50.convertType(src.getUrlElement())); if (src.hasMode()) { tgt.setMode(convertStructureMapStructureMode(src.getMode())); } - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getDocumentationElement())); return tgt; } @@ -513,14 +502,13 @@ public class StructureMap14_50 { return null; org.hl7.fhir.r5.model.StructureMap.StructureMapStructureComponent tgt = new org.hl7.fhir.r5.model.StructureMap.StructureMapStructureComponent(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasUrl()) { - tgt.setUrl(src.getUrl()); - } + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r5.model.CanonicalType) VersionConvertor_14_50.convertType(src.getUrlElement())); if (src.hasMode()) { tgt.setMode(convertStructureMapStructureMode(src.getMode())); } - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getDocumentationElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/ValueSet14_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/ValueSet14_50.java index 63cc558d1..613b50b6d 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/ValueSet14_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/ValueSet14_50.java @@ -3,6 +3,7 @@ package org.hl7.fhir.convertors.conv14_50; import org.hl7.fhir.convertors.VersionConvertor_14_50; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r5.model.BooleanType; +import java.util.Collections; public class ValueSet14_50 { @@ -11,11 +12,10 @@ public class ValueSet14_50 { return null; org.hl7.fhir.dstu2016may.model.ValueSet.ConceptReferenceComponent tgt = new org.hl7.fhir.dstu2016may.model.ValueSet.ConceptReferenceComponent(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasCode()) { - tgt.setCode(src.getCode()); - } - if (src.hasDisplay()) - tgt.setDisplay(src.getDisplay()); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu2016may.model.CodeType) VersionConvertor_14_50.convertType(src.getCodeElement())); + if (src.hasDisplayElement()) + tgt.setDisplayElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getDisplayElement())); if (src.hasDesignation()) { for (org.hl7.fhir.r5.model.ValueSet.ConceptReferenceDesignationComponent t : src.getDesignation()) tgt.addDesignation(convertConceptReferenceDesignationComponent(t)); } @@ -27,11 +27,10 @@ public class ValueSet14_50 { return null; org.hl7.fhir.r5.model.ValueSet.ConceptReferenceComponent tgt = new org.hl7.fhir.r5.model.ValueSet.ConceptReferenceComponent(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasCode()) { - tgt.setCode(src.getCode()); - } - if (src.hasDisplay()) - tgt.setDisplay(src.getDisplay()); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.r5.model.CodeType) VersionConvertor_14_50.convertType(src.getCodeElement())); + if (src.hasDisplayElement()) + tgt.setDisplayElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getDisplayElement())); if (src.hasDesignation()) { for (org.hl7.fhir.dstu2016may.model.ValueSet.ConceptReferenceDesignationComponent t : src.getDesignation()) tgt.addDesignation(convertConceptReferenceDesignationComponent(t)); } @@ -43,14 +42,13 @@ public class ValueSet14_50 { return null; org.hl7.fhir.r5.model.ValueSet.ConceptReferenceDesignationComponent tgt = new org.hl7.fhir.r5.model.ValueSet.ConceptReferenceDesignationComponent(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasLanguage()) - tgt.setLanguage(src.getLanguage()); + if (src.hasLanguageElement()) + tgt.setLanguageElement((org.hl7.fhir.r5.model.CodeType) VersionConvertor_14_50.convertType(src.getLanguageElement())); if (src.hasUse()) { tgt.setUse(VersionConvertor_14_50.convertCoding(src.getUse())); } - if (src.hasValue()) { - tgt.setValue(src.getValue()); - } + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getValueElement())); return tgt; } @@ -59,14 +57,13 @@ public class ValueSet14_50 { return null; org.hl7.fhir.dstu2016may.model.ValueSet.ConceptReferenceDesignationComponent tgt = new org.hl7.fhir.dstu2016may.model.ValueSet.ConceptReferenceDesignationComponent(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasLanguage()) - tgt.setLanguage(src.getLanguage()); + if (src.hasLanguageElement()) + tgt.setLanguageElement((org.hl7.fhir.dstu2016may.model.CodeType) VersionConvertor_14_50.convertType(src.getLanguageElement())); if (src.hasUse()) { tgt.setUse(VersionConvertor_14_50.convertCoding(src.getUse())); } - if (src.hasValue()) { - tgt.setValue(src.getValue()); - } + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getValueElement())); return tgt; } @@ -75,11 +72,10 @@ public class ValueSet14_50 { return null; org.hl7.fhir.r5.model.ValueSet.ConceptSetComponent tgt = new org.hl7.fhir.r5.model.ValueSet.ConceptSetComponent(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasSystem()) { - tgt.setSystem(src.getSystem()); - } - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); + if (src.hasSystemElement()) + tgt.setSystemElement((org.hl7.fhir.r5.model.UriType) VersionConvertor_14_50.convertType(src.getSystemElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getVersionElement())); if (src.hasConcept()) { for (org.hl7.fhir.dstu2016may.model.ValueSet.ConceptReferenceComponent t : src.getConcept()) tgt.addConcept(convertConceptReferenceComponent(t)); } @@ -94,11 +90,10 @@ public class ValueSet14_50 { return null; org.hl7.fhir.dstu2016may.model.ValueSet.ConceptSetComponent tgt = new org.hl7.fhir.dstu2016may.model.ValueSet.ConceptSetComponent(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasSystem()) { - tgt.setSystem(src.getSystem()); - } - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); + if (src.hasSystemElement()) + tgt.setSystemElement((org.hl7.fhir.dstu2016may.model.UriType) VersionConvertor_14_50.convertType(src.getSystemElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getVersionElement())); if (src.hasConcept()) { for (org.hl7.fhir.r5.model.ValueSet.ConceptReferenceComponent t : src.getConcept()) tgt.addConcept(convertConceptReferenceComponent(t)); } @@ -113,15 +108,13 @@ public class ValueSet14_50 { return null; org.hl7.fhir.dstu2016may.model.ValueSet.ConceptSetFilterComponent tgt = new org.hl7.fhir.dstu2016may.model.ValueSet.ConceptSetFilterComponent(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasProperty()) { - tgt.setProperty(src.getProperty()); - } + if (src.hasPropertyElement()) + tgt.setPropertyElement((org.hl7.fhir.dstu2016may.model.CodeType) VersionConvertor_14_50.convertType(src.getPropertyElement())); if (src.hasOp()) { tgt.setOp(convertFilterOperator(src.getOp())); } - if (src.hasValue()) { - tgt.setValue(src.getValue()); - } + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.dstu2016may.model.CodeType) VersionConvertor_14_50.convertType(src.getValueElement())); return tgt; } @@ -130,15 +123,13 @@ public class ValueSet14_50 { return null; org.hl7.fhir.r5.model.ValueSet.ConceptSetFilterComponent tgt = new org.hl7.fhir.r5.model.ValueSet.ConceptSetFilterComponent(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasProperty()) { - tgt.setProperty(src.getProperty()); - } + if (src.hasPropertyElement()) + tgt.setPropertyElement((org.hl7.fhir.r5.model.CodeType) VersionConvertor_14_50.convertType(src.getPropertyElement())); if (src.hasOp()) { tgt.setOp(convertFilterOperator(src.getOp())); } - if (src.hasValue()) { - tgt.setValue(src.getValue()); - } + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getValueElement())); return tgt; } @@ -189,34 +180,34 @@ public class ValueSet14_50 { return null; org.hl7.fhir.r5.model.ValueSet tgt = new org.hl7.fhir.r5.model.ValueSet(); VersionConvertor_14_50.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r5.model.UriType) VersionConvertor_14_50.convertType(src.getUrlElement())); if (src.hasIdentifier()) tgt.addIdentifier(VersionConvertor_14_50.convertIdentifier(src.getIdentifier())); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_14_50.convertConformanceResourceStatus(src.getStatus())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_14_50.convertType(src.getExperimentalElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu2016may.model.ValueSet.ValueSetContactComponent t : src.getContact()) tgt.addContact(convertValueSetContactComponent(t)); } - if (src.hasDate()) - tgt.setDate(src.getDate()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.r5.model.DateTimeType) VersionConvertor_14_50.convertType(src.getDateElement())); if (src.hasDescription()) tgt.setDescription(src.getDescription()); for (org.hl7.fhir.dstu2016may.model.CodeableConcept t : src.getUseContext()) if (VersionConvertor_14_50.isJurisdiction(t)) tgt.addJurisdiction(VersionConvertor_14_50.convertCodeableConcept(t)); else tgt.addUseContext(VersionConvertor_14_50.convertCodeableConceptToUsageContext(t)); - if (src.hasImmutable()) - tgt.setImmutable(src.getImmutable()); + if (src.hasImmutableElement()) + tgt.setImmutableElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_14_50.convertType(src.getImmutableElement())); if (src.hasRequirements()) tgt.setPurpose(src.getRequirements()); if (src.hasCopyright()) @@ -239,42 +230,42 @@ public class ValueSet14_50 { return null; org.hl7.fhir.dstu2016may.model.ValueSet tgt = new org.hl7.fhir.dstu2016may.model.ValueSet(); VersionConvertor_14_50.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu2016may.model.UriType) VersionConvertor_14_50.convertType(src.getUrlElement())); if (src.hasIdentifier()) { for (org.hl7.fhir.r5.model.Identifier t : src.getIdentifier()) tgt.setIdentifier(VersionConvertor_14_50.convertIdentifier(t)); } - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getNameElement())); if (src.hasStatus()) { tgt.setStatus(VersionConvertor_14_50.convertConformanceResourceStatus(src.getStatus())); } - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu2016may.model.BooleanType) VersionConvertor_14_50.convertType(src.getExperimentalElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.r5.model.ContactDetail t : src.getContact()) tgt.addContact(convertValueSetContactComponent(t)); } - if (src.hasDate()) - tgt.setDate(src.getDate()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu2016may.model.DateTimeType) VersionConvertor_14_50.convertType(src.getDateElement())); if (src.getCompose().hasLockedDate()) tgt.setLockedDate(src.getCompose().getLockedDate()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getDescriptionElement())); for (org.hl7.fhir.r5.model.UsageContext t : src.getUseContext()) if (t.hasValueCodeableConcept()) tgt.addUseContext(VersionConvertor_14_50.convertCodeableConcept(t.getValueCodeableConcept())); if (src.hasJurisdiction()) { for (org.hl7.fhir.r5.model.CodeableConcept t : src.getJurisdiction()) tgt.addUseContext(VersionConvertor_14_50.convertCodeableConcept(t)); } - if (src.hasImmutable()) - tgt.setImmutable(src.getImmutable()); + if (src.hasImmutableElement()) + tgt.setImmutableElement((org.hl7.fhir.dstu2016may.model.BooleanType) VersionConvertor_14_50.convertType(src.getImmutableElement())); if (src.hasPurpose()) tgt.setRequirements(src.getPurpose()); - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getCopyrightElement())); if (src.hasExtension("http://hl7.org/fhir/StructureDefinition/valueset-extensible")) tgt.setExtensible(((BooleanType) src.getExtensionByUrl("http://hl7.org/fhir/StructureDefinition/valueset-extensible").getValue()).booleanValue()); if (src.hasCompose()) { @@ -322,8 +313,8 @@ public class ValueSet14_50 { return null; org.hl7.fhir.dstu2016may.model.ValueSet.ValueSetContactComponent tgt = new org.hl7.fhir.dstu2016may.model.ValueSet.ValueSetContactComponent(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.r5.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_14_50.convertContactPoint(t)); } @@ -335,8 +326,8 @@ public class ValueSet14_50 { return null; org.hl7.fhir.r5.model.ContactDetail tgt = new org.hl7.fhir.r5.model.ContactDetail(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getNameElement())); if (src.hasTelecom()) { for (org.hl7.fhir.dstu2016may.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_14_50.convertContactPoint(t)); } @@ -348,16 +339,14 @@ public class ValueSet14_50 { return null; org.hl7.fhir.r5.model.ValueSet.ValueSetExpansionComponent tgt = new org.hl7.fhir.r5.model.ValueSet.ValueSetExpansionComponent(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasIdentifier()) { - tgt.setIdentifier(src.getIdentifier()); - } - if (src.hasTimestamp()) { - tgt.setTimestamp(src.getTimestamp()); - } - if (src.hasTotal()) - tgt.setTotal(src.getTotal()); - if (src.hasOffset()) - tgt.setOffset(src.getOffset()); + if (src.hasIdentifierElement()) + tgt.setIdentifierElement((org.hl7.fhir.r5.model.UriType) VersionConvertor_14_50.convertType(src.getIdentifierElement())); + if (src.hasTimestampElement()) + tgt.setTimestampElement((org.hl7.fhir.r5.model.DateTimeType) VersionConvertor_14_50.convertType(src.getTimestampElement())); + if (src.hasTotalElement()) + tgt.setTotalElement((org.hl7.fhir.r5.model.IntegerType) VersionConvertor_14_50.convertType(src.getTotalElement())); + if (src.hasOffsetElement()) + tgt.setOffsetElement((org.hl7.fhir.r5.model.IntegerType) VersionConvertor_14_50.convertType(src.getOffsetElement())); if (src.hasParameter()) { for (org.hl7.fhir.dstu2016may.model.ValueSet.ValueSetExpansionParameterComponent t : src.getParameter()) tgt.addParameter(convertValueSetExpansionParameterComponent(t)); } @@ -372,16 +361,14 @@ public class ValueSet14_50 { return null; org.hl7.fhir.dstu2016may.model.ValueSet.ValueSetExpansionComponent tgt = new org.hl7.fhir.dstu2016may.model.ValueSet.ValueSetExpansionComponent(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasIdentifier()) { - tgt.setIdentifier(src.getIdentifier()); - } - if (src.hasTimestamp()) { - tgt.setTimestamp(src.getTimestamp()); - } - if (src.hasTotal()) - tgt.setTotal(src.getTotal()); - if (src.hasOffset()) - tgt.setOffset(src.getOffset()); + if (src.hasIdentifierElement()) + tgt.setIdentifierElement((org.hl7.fhir.dstu2016may.model.UriType) VersionConvertor_14_50.convertType(src.getIdentifierElement())); + if (src.hasTimestampElement()) + tgt.setTimestampElement((org.hl7.fhir.dstu2016may.model.DateTimeType) VersionConvertor_14_50.convertType(src.getTimestampElement())); + if (src.hasTotalElement()) + tgt.setTotalElement((org.hl7.fhir.dstu2016may.model.IntegerType) VersionConvertor_14_50.convertType(src.getTotalElement())); + if (src.hasOffsetElement()) + tgt.setOffsetElement((org.hl7.fhir.dstu2016may.model.IntegerType) VersionConvertor_14_50.convertType(src.getOffsetElement())); if (src.hasParameter()) { for (org.hl7.fhir.r5.model.ValueSet.ValueSetExpansionParameterComponent t : src.getParameter()) tgt.addParameter(convertValueSetExpansionParameterComponent(t)); } @@ -396,16 +383,16 @@ public class ValueSet14_50 { return null; org.hl7.fhir.r5.model.ValueSet.ValueSetExpansionContainsComponent tgt = new org.hl7.fhir.r5.model.ValueSet.ValueSetExpansionContainsComponent(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasSystem()) - tgt.setSystem(src.getSystem()); - if (src.hasAbstract()) - tgt.setAbstract(src.getAbstract()); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasCode()) - tgt.setCode(src.getCode()); - if (src.hasDisplay()) - tgt.setDisplay(src.getDisplay()); + if (src.hasSystemElement()) + tgt.setSystemElement((org.hl7.fhir.r5.model.UriType) VersionConvertor_14_50.convertType(src.getSystemElement())); + if (src.hasAbstractElement()) + tgt.setAbstractElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_14_50.convertType(src.getAbstractElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getVersionElement())); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.r5.model.CodeType) VersionConvertor_14_50.convertType(src.getCodeElement())); + if (src.hasDisplayElement()) + tgt.setDisplayElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getDisplayElement())); if (src.hasContains()) { for (org.hl7.fhir.dstu2016may.model.ValueSet.ValueSetExpansionContainsComponent t : src.getContains()) tgt.addContains(convertValueSetExpansionContainsComponent(t)); } @@ -417,16 +404,16 @@ public class ValueSet14_50 { return null; org.hl7.fhir.dstu2016may.model.ValueSet.ValueSetExpansionContainsComponent tgt = new org.hl7.fhir.dstu2016may.model.ValueSet.ValueSetExpansionContainsComponent(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasSystem()) - tgt.setSystem(src.getSystem()); - if (src.hasAbstract()) - tgt.setAbstract(src.getAbstract()); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasCode()) - tgt.setCode(src.getCode()); - if (src.hasDisplay()) - tgt.setDisplay(src.getDisplay()); + if (src.hasSystemElement()) + tgt.setSystemElement((org.hl7.fhir.dstu2016may.model.UriType) VersionConvertor_14_50.convertType(src.getSystemElement())); + if (src.hasAbstractElement()) + tgt.setAbstractElement((org.hl7.fhir.dstu2016may.model.BooleanType) VersionConvertor_14_50.convertType(src.getAbstractElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getVersionElement())); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu2016may.model.CodeType) VersionConvertor_14_50.convertType(src.getCodeElement())); + if (src.hasDisplayElement()) + tgt.setDisplayElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getDisplayElement())); if (src.hasContains()) { for (org.hl7.fhir.r5.model.ValueSet.ValueSetExpansionContainsComponent t : src.getContains()) tgt.addContains(convertValueSetExpansionContainsComponent(t)); } @@ -438,9 +425,8 @@ public class ValueSet14_50 { return null; org.hl7.fhir.r5.model.ValueSet.ValueSetExpansionParameterComponent tgt = new org.hl7.fhir.r5.model.ValueSet.ValueSetExpansionParameterComponent(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getNameElement())); if (src.hasValue()) { tgt.setValue(VersionConvertor_14_50.convertType(src.getValue())); } @@ -452,9 +438,8 @@ public class ValueSet14_50 { return null; org.hl7.fhir.dstu2016may.model.ValueSet.ValueSetExpansionParameterComponent tgt = new org.hl7.fhir.dstu2016may.model.ValueSet.ValueSetExpansionParameterComponent(); VersionConvertor_14_50.copyElement(src, tgt); - if (src.hasName()) { - tgt.setName(src.getName()); - } + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getNameElement())); if (src.hasValue()) { tgt.setValue(VersionConvertor_14_50.convertType(src.getValue())); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/parser/Parser.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/parser/Parser.java index 7712e7e4c..964f91658 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/parser/Parser.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/parser/Parser.java @@ -92,7 +92,7 @@ public class Parser { // VERSION_FILES.forEach(version -> { - String version = "14_40"; + String version = "14_50"; List filenames = listAllJavaFilesInDirectory(new File("").getAbsolutePath() + "/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv" + version + "/"); System.out.println("Checking the following files:"); Collections.sort(filenames); From 69b615b91550a714b25a7a6a6821b2400a367d21 Mon Sep 17 00:00:00 2001 From: markiantorno Date: Fri, 7 Feb 2020 15:51:24 -0500 Subject: [PATCH 10/12] convo30_40 updated --- .../conv30_40/ActivityDefinition30_40.java | 124 ++++---- .../conv30_40/AllergyIntolerance30_40.java | 9 +- .../conv30_40/Appointment30_40.java | 41 +-- .../conv30_40/AppointmentResponse30_40.java | 17 +- .../convertors/conv30_40/AuditEvent30_40.java | 73 ++--- .../fhir/convertors/conv30_40/Basic30_40.java | 1 + .../convertors/conv30_40/Binary30_40.java | 18 +- .../convertors/conv30_40/BodySite30_40.java | 17 +- .../convertors/conv30_40/Bundle30_40.java | 105 +++---- .../conv30_40/CapabilityStatement30_40.java | 257 ++++++++--------- .../convertors/conv30_40/CarePlan30_40.java | 117 +++----- .../convertors/conv30_40/CareTeam30_40.java | 9 +- .../conv30_40/ClinicalImpression30_40.java | 25 +- .../convertors/conv30_40/CodeSystem30_40.java | 220 +++++++-------- .../conv30_40/Communication30_40.java | 1 + .../conv30_40/CompartmentDefinition30_40.java | 82 +++--- .../conv30_40/Composition30_40.java | 17 +- .../convertors/conv30_40/ConceptMap30_40.java | 200 ++++++------- .../convertors/conv30_40/Condition30_40.java | 1 + .../convertors/conv30_40/Consent30_40.java | 21 +- .../conv30_40/DataElement30_40.java | 42 +-- .../conv30_40/DetectedIssue30_40.java | 17 +- .../conv30_40/DeviceUseStatement30_40.java | 1 + .../conv30_40/DiagnosticReport30_40.java | 17 +- .../conv30_40/DocumentReference30_40.java | 9 +- .../convertors/conv30_40/Encounter30_40.java | 1 + .../convertors/conv30_40/Endpoint30_40.java | 17 +- .../conv30_40/EpisodeOfCare30_40.java | 1 + .../conv30_40/ExpansionProfile30_40.java | 1 + .../conv30_40/FamilyMemberHistory30_40.java | 17 +- .../fhir/convertors/conv30_40/Flag30_40.java | 1 + .../fhir/convertors/conv30_40/Goal30_40.java | 13 +- .../conv30_40/GraphDefinition30_40.java | 137 ++++----- .../fhir/convertors/conv30_40/Group30_40.java | 49 ++-- .../conv30_40/HealthcareService30_40.java | 81 +++--- .../conv30_40/ImagingStudy30_40.java | 159 ++++------- .../conv30_40/Immunization30_40.java | 21 +- .../conv30_40/ImplementationGuide30_40.java | 119 ++++---- .../convertors/conv30_40/Library30_40.java | 89 +++--- .../convertors/conv30_40/Linkage30_40.java | 9 +- .../fhir/convertors/conv30_40/List30_40.java | 20 +- .../convertors/conv30_40/Location30_40.java | 41 +-- .../fhir/convertors/conv30_40/Media30_40.java | 85 ++---- .../convertors/conv30_40/Medication30_40.java | 17 +- .../MedicationAdministration30_40.java | 9 +- .../conv30_40/MedicationDispense30_40.java | 9 +- .../conv30_40/MedicationRequest30_40.java | 9 +- .../conv30_40/MedicationStatement30_40.java | 1 + .../conv30_40/MessageDefinition30_40.java | 105 +++---- .../conv30_40/MessageHeader30_40.java | 57 ++-- .../conv30_40/NamingSystem30_40.java | 65 ++--- .../conv30_40/Observation30_40.java | 9 +- .../conv30_40/OperationDefinition30_40.java | 145 +++++----- .../conv30_40/OperationOutcome30_40.java | 9 +- .../conv30_40/Organization30_40.java | 17 +- .../convertors/conv30_40/Parameters30_40.java | 9 +- .../convertors/conv30_40/Patient30_40.java | 17 +- .../conv30_40/PaymentNotice30_40.java | 1 + .../convertors/conv30_40/Person30_40.java | 9 +- .../conv30_40/PlanDefinition30_40.java | 180 ++++++------ .../conv30_40/Practitioner30_40.java | 9 +- .../conv30_40/PractitionerRole30_40.java | 49 ++-- .../convertors/conv30_40/Procedure30_40.java | 73 ++--- .../conv30_40/ProcedureRequest30_40.java | 6 +- .../convertors/conv30_40/Provenance30_40.java | 27 +- .../conv30_40/Questionnaire30_40.java | 153 +++++----- .../conv30_40/QuestionnaireResponse30_40.java | 25 +- .../conv30_40/RelatedPerson30_40.java | 39 +-- .../conv30_40/RiskAssessment30_40.java | 25 +- .../convertors/conv30_40/Schedule30_40.java | 17 +- .../conv30_40/SearchParameter30_40.java | 97 +++---- .../convertors/conv30_40/Sequence30_40.java | 214 +++++++------- .../fhir/convertors/conv30_40/Slot30_40.java | 25 +- .../convertors/conv30_40/Specimen30_40.java | 17 +- .../conv30_40/StructureDefinition30_40.java | 132 ++++----- .../conv30_40/StructureMap30_40.java | 265 +++++++++--------- .../conv30_40/Subscription30_40.java | 49 ++-- .../convertors/conv30_40/Substance30_40.java | 9 +- .../conv30_40/SupplyDelivery30_40.java | 1 + .../convertors/conv30_40/TestReport30_40.java | 57 ++-- .../convertors/conv30_40/TestScript30_40.java | 233 +++++++-------- .../convertors/conv30_40/ValueSet30_40.java | 237 ++++++++-------- .../hl7/fhir/convertors/parser/Parser.java | 2 +- 83 files changed, 2324 insertions(+), 2407 deletions(-) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/ActivityDefinition30_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/ActivityDefinition30_40.java index bd5c1297c..c9b06f56a 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/ActivityDefinition30_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/ActivityDefinition30_40.java @@ -4,6 +4,10 @@ import org.hl7.fhir.convertors.VersionConvertor_30_40; import org.hl7.fhir.dstu3.model.ContactDetail; import org.hl7.fhir.dstu3.model.Contributor.ContributorType; import org.hl7.fhir.exceptions.FHIRException; +import org.hl7.fhir.r4.model.CodeType; +import org.hl7.fhir.r4.model.StringType; + +import java.util.Collections; public class ActivityDefinition30_40 { @@ -12,35 +16,35 @@ public class ActivityDefinition30_40 { return null; org.hl7.fhir.dstu3.model.ActivityDefinition tgt = new org.hl7.fhir.dstu3.model.ActivityDefinition(); VersionConvertor_30_40.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_40.convertType(src.getUrlElement())); if (src.hasIdentifier()) { for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_30_40.convertIdentifier(t)); } - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getNameElement())); + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getTitleElement())); if (src.hasStatus()) tgt.setStatus(VersionConvertor_30_40.convertPublicationStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_40.convertType(src.getExperimentalElement())); if (src.hasDateElement()) tgt.setDateElement(VersionConvertor_30_40.convertDateTime(src.getDateElement())); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - if (src.hasPurpose()) - tgt.setPurpose(src.getPurpose()); - if (src.hasUsage()) - tgt.setUsage(src.getUsage()); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getPublisherElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); + if (src.hasPurposeElement()) + tgt.setPurposeElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_40.convertType(src.getPurposeElement())); + if (src.hasUsageElement()) + tgt.setUsageElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getUsageElement())); if (src.hasApprovalDate()) - tgt.setApprovalDateElement(VersionConvertor_30_40.convertDate(src.getApprovalDateElement())); + tgt.setApprovalDateElement(VersionConvertor_30_40.convertDate(src.getApprovalDateElement())); if (src.hasLastReviewDate()) - tgt.setLastReviewDateElement(VersionConvertor_30_40.convertDate(src.getLastReviewDateElement())); + tgt.setLastReviewDateElement(VersionConvertor_30_40.convertDate(src.getLastReviewDateElement())); if (src.hasEffectivePeriod()) tgt.setEffectivePeriod(VersionConvertor_30_40.convertPeriod(src.getEffectivePeriod())); if (src.hasUseContext()) { @@ -79,8 +83,8 @@ public class ActivityDefinition30_40 { if (src.hasContact()) { for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact()) tgt.addContact(VersionConvertor_30_40.convertContactDetail(t)); } - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_40.convertType(src.getCopyrightElement())); if (src.hasRelatedArtifact()) { for (org.hl7.fhir.r4.model.RelatedArtifact t : src.getRelatedArtifact()) tgt.addRelatedArtifact(VersionConvertor_30_40.convertRelatedArtifact(t)); } @@ -121,35 +125,35 @@ public class ActivityDefinition30_40 { return null; org.hl7.fhir.r4.model.ActivityDefinition tgt = new org.hl7.fhir.r4.model.ActivityDefinition(); VersionConvertor_30_40.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_30_40.convertType(src.getUrlElement())); if (src.hasIdentifier()) { for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_30_40.convertIdentifier(t)); } - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getNameElement())); + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getTitleElement())); if (src.hasStatus()) tgt.setStatus(VersionConvertor_30_40.convertPublicationStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_30_40.convertType(src.getExperimentalElement())); if (src.hasDateElement()) tgt.setDateElement(VersionConvertor_30_40.convertDateTime(src.getDateElement())); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - if (src.hasPurpose()) - tgt.setPurpose(src.getPurpose()); - if (src.hasUsage()) - tgt.setUsage(src.getUsage()); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getPublisherElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r4.model.MarkdownType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); + if (src.hasPurposeElement()) + tgt.setPurposeElement((org.hl7.fhir.r4.model.MarkdownType) VersionConvertor_30_40.convertType(src.getPurposeElement())); + if (src.hasUsageElement()) + tgt.setUsageElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getUsageElement())); if (src.hasApprovalDate()) - tgt.setApprovalDateElement(VersionConvertor_30_40.convertDate(src.getApprovalDateElement())); + tgt.setApprovalDateElement(VersionConvertor_30_40.convertDate(src.getApprovalDateElement())); if (src.hasLastReviewDate()) - tgt.setLastReviewDateElement(VersionConvertor_30_40.convertDate(src.getLastReviewDateElement())); + tgt.setLastReviewDateElement(VersionConvertor_30_40.convertDate(src.getLastReviewDateElement())); if (src.hasEffectivePeriod()) tgt.setEffectivePeriod(VersionConvertor_30_40.convertPeriod(src.getEffectivePeriod())); if (src.hasUseContext()) { @@ -174,8 +178,8 @@ public class ActivityDefinition30_40 { if (src.hasContact()) { for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) tgt.addContact(VersionConvertor_30_40.convertContactDetail(t)); } - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.r4.model.MarkdownType) VersionConvertor_30_40.convertType(src.getCopyrightElement())); if (src.hasRelatedArtifact()) { for (org.hl7.fhir.dstu3.model.RelatedArtifact t : src.getRelatedArtifact()) tgt.addRelatedArtifact(VersionConvertor_30_40.convertRelatedArtifact(t)); } @@ -216,14 +220,14 @@ public class ActivityDefinition30_40 { return null; org.hl7.fhir.r4.model.ActivityDefinition.ActivityDefinitionDynamicValueComponent tgt = new org.hl7.fhir.r4.model.ActivityDefinition.ActivityDefinitionDynamicValueComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasDescription()) - tgt.getExpression().setDescription(src.getDescription()); - if (src.hasPath()) - tgt.setPath(src.getPath()); - if (src.hasLanguage()) - tgt.getExpression().setLanguage(src.getLanguage()); - if (src.hasExpression()) - tgt.getExpression().setExpression(src.getExpression()); + if (src.hasDescriptionElement()) + tgt.getExpression().setDescriptionElement((StringType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); + if (src.hasPathElement()) + tgt.setPathElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getPathElement())); + if (src.hasLanguageElement()) + tgt.getExpression().setLanguageElement((CodeType) VersionConvertor_30_40.convertType(src.getLanguageElement())); + if (src.hasExpressionElement()) + tgt.getExpression().setExpressionElement((StringType) VersionConvertor_30_40.convertType(src.getExpressionElement())); return tgt; } @@ -232,14 +236,14 @@ public class ActivityDefinition30_40 { return null; org.hl7.fhir.dstu3.model.ActivityDefinition.ActivityDefinitionDynamicValueComponent tgt = new org.hl7.fhir.dstu3.model.ActivityDefinition.ActivityDefinitionDynamicValueComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasPath()) - tgt.setPath(src.getPath()); - if (src.getExpression().hasDescription()) - tgt.setDescription(src.getExpression().getDescription()); - if (src.getExpression().hasLanguage()) - tgt.setLanguage(src.getExpression().getLanguage()); - if (src.getExpression().hasExpression()) - tgt.setExpression(src.getExpression().getExpression()); + if (src.hasPathElement()) + tgt.setPathElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getPathElement())); + if (src.getExpression().hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getExpression().getDescriptionElement())); + if (src.getExpression().hasLanguageElement()) + tgt.setLanguageElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getExpression().getLanguageElement())); + if (src.getExpression().hasExpressionElement()) + tgt.setExpressionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getExpression().getExpressionElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/AllergyIntolerance30_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/AllergyIntolerance30_40.java index e69834e77..64e108ca5 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/AllergyIntolerance30_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/AllergyIntolerance30_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_40; import org.hl7.fhir.convertors.VersionConvertor_30_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class AllergyIntolerance30_40 { @@ -190,8 +191,8 @@ public class AllergyIntolerance30_40 { if (src.hasManifestation()) { for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getManifestation()) tgt.addManifestation(VersionConvertor_30_40.convertCodeableConcept(t)); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); if (src.hasOnset()) tgt.setOnsetElement(VersionConvertor_30_40.convertDateTime(src.getOnsetElement())); if (src.hasSeverity()) @@ -214,8 +215,8 @@ public class AllergyIntolerance30_40 { if (src.hasManifestation()) { for (org.hl7.fhir.r4.model.CodeableConcept t : src.getManifestation()) tgt.addManifestation(VersionConvertor_30_40.convertCodeableConcept(t)); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); if (src.hasOnset()) tgt.setOnsetElement(VersionConvertor_30_40.convertDateTime(src.getOnsetElement())); if (src.hasSeverity()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Appointment30_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Appointment30_40.java index 5c9cf3176..192be8409 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Appointment30_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Appointment30_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_40; import org.hl7.fhir.convertors.VersionConvertor_30_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Appointment30_40 { @@ -31,26 +32,26 @@ public class Appointment30_40 { if (src.hasIndication()) { for (org.hl7.fhir.dstu3.model.Reference t : src.getIndication()) tgt.addReasonReference(VersionConvertor_30_40.convertReference(t)); } - if (src.hasPriority()) - tgt.setPriority(src.getPriority()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasPriorityElement()) + tgt.setPriorityElement((org.hl7.fhir.r4.model.UnsignedIntType) VersionConvertor_30_40.convertType(src.getPriorityElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); if (src.hasSupportingInformation()) { for (org.hl7.fhir.dstu3.model.Reference t : src.getSupportingInformation()) tgt.addSupportingInformation(VersionConvertor_30_40.convertReference(t)); } if (src.hasStart()) tgt.setStartElement(VersionConvertor_30_40.convertInstant(src.getStartElement())); - if (src.hasEnd()) - tgt.setEnd(src.getEnd()); - if (src.hasMinutesDuration()) - tgt.setMinutesDuration(src.getMinutesDuration()); + if (src.hasEndElement()) + tgt.setEndElement((org.hl7.fhir.r4.model.InstantType) VersionConvertor_30_40.convertType(src.getEndElement())); + if (src.hasMinutesDurationElement()) + tgt.setMinutesDurationElement((org.hl7.fhir.r4.model.PositiveIntType) VersionConvertor_30_40.convertType(src.getMinutesDurationElement())); if (src.hasSlot()) { for (org.hl7.fhir.dstu3.model.Reference t : src.getSlot()) tgt.addSlot(VersionConvertor_30_40.convertReference(t)); } if (src.hasCreated()) tgt.setCreatedElement(VersionConvertor_30_40.convertDateTime(src.getCreatedElement())); - if (src.hasComment()) - tgt.setComment(src.getComment()); + if (src.hasCommentElement()) + tgt.setCommentElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getCommentElement())); if (src.hasIncomingReferral()) { for (org.hl7.fhir.dstu3.model.Reference t : src.getIncomingReferral()) tgt.addBasedOn(VersionConvertor_30_40.convertReference(t)); } @@ -89,26 +90,26 @@ public class Appointment30_40 { if (src.hasReasonReference()) { for (org.hl7.fhir.r4.model.Reference t : src.getReasonReference()) tgt.addIndication(VersionConvertor_30_40.convertReference(t)); } - if (src.hasPriority()) - tgt.setPriority(src.getPriority()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasPriorityElement()) + tgt.setPriorityElement((org.hl7.fhir.dstu3.model.UnsignedIntType) VersionConvertor_30_40.convertType(src.getPriorityElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); if (src.hasSupportingInformation()) { for (org.hl7.fhir.r4.model.Reference t : src.getSupportingInformation()) tgt.addSupportingInformation(VersionConvertor_30_40.convertReference(t)); } if (src.hasStart()) tgt.setStartElement(VersionConvertor_30_40.convertInstant(src.getStartElement())); - if (src.hasEnd()) - tgt.setEnd(src.getEnd()); - if (src.hasMinutesDuration()) - tgt.setMinutesDuration(src.getMinutesDuration()); + if (src.hasEndElement()) + tgt.setEndElement((org.hl7.fhir.dstu3.model.InstantType) VersionConvertor_30_40.convertType(src.getEndElement())); + if (src.hasMinutesDurationElement()) + tgt.setMinutesDurationElement((org.hl7.fhir.dstu3.model.PositiveIntType) VersionConvertor_30_40.convertType(src.getMinutesDurationElement())); if (src.hasSlot()) { for (org.hl7.fhir.r4.model.Reference t : src.getSlot()) tgt.addSlot(VersionConvertor_30_40.convertReference(t)); } if (src.hasCreated()) tgt.setCreatedElement(VersionConvertor_30_40.convertDateTime(src.getCreatedElement())); - if (src.hasComment()) - tgt.setComment(src.getComment()); + if (src.hasCommentElement()) + tgt.setCommentElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getCommentElement())); if (src.hasBasedOn()) { for (org.hl7.fhir.r4.model.Reference t : src.getBasedOn()) tgt.addIncomingReferral(VersionConvertor_30_40.convertReference(t)); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/AppointmentResponse30_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/AppointmentResponse30_40.java index c70be99d0..304e97485 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/AppointmentResponse30_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/AppointmentResponse30_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_40; import org.hl7.fhir.convertors.VersionConvertor_30_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class AppointmentResponse30_40 { @@ -17,8 +18,8 @@ public class AppointmentResponse30_40 { tgt.setAppointment(VersionConvertor_30_40.convertReference(src.getAppointment())); if (src.hasStart()) tgt.setStartElement(VersionConvertor_30_40.convertInstant(src.getStartElement())); - if (src.hasEnd()) - tgt.setEnd(src.getEnd()); + if (src.hasEndElement()) + tgt.setEndElement((org.hl7.fhir.r4.model.InstantType) VersionConvertor_30_40.convertType(src.getEndElement())); if (src.hasParticipantType()) { for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getParticipantType()) tgt.addParticipantType(VersionConvertor_30_40.convertCodeableConcept(t)); } @@ -26,8 +27,8 @@ public class AppointmentResponse30_40 { tgt.setActor(VersionConvertor_30_40.convertReference(src.getActor())); if (src.hasParticipantStatus()) tgt.setParticipantStatus(convertParticipantStatus(src.getParticipantStatus())); - if (src.hasComment()) - tgt.setComment(src.getComment()); + if (src.hasCommentElement()) + tgt.setCommentElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getCommentElement())); return tgt; } @@ -43,8 +44,8 @@ public class AppointmentResponse30_40 { tgt.setAppointment(VersionConvertor_30_40.convertReference(src.getAppointment())); if (src.hasStart()) tgt.setStartElement(VersionConvertor_30_40.convertInstant(src.getStartElement())); - if (src.hasEnd()) - tgt.setEnd(src.getEnd()); + if (src.hasEndElement()) + tgt.setEndElement((org.hl7.fhir.dstu3.model.InstantType) VersionConvertor_30_40.convertType(src.getEndElement())); if (src.hasParticipantType()) { for (org.hl7.fhir.r4.model.CodeableConcept t : src.getParticipantType()) tgt.addParticipantType(VersionConvertor_30_40.convertCodeableConcept(t)); } @@ -52,8 +53,8 @@ public class AppointmentResponse30_40 { tgt.setActor(VersionConvertor_30_40.convertReference(src.getActor())); if (src.hasParticipantStatus()) tgt.setParticipantStatus(convertParticipantStatus(src.getParticipantStatus())); - if (src.hasComment()) - tgt.setComment(src.getComment()); + if (src.hasCommentElement()) + tgt.setCommentElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getCommentElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/AuditEvent30_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/AuditEvent30_40.java index 04bdc6792..8e465485c 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/AuditEvent30_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/AuditEvent30_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_40; import org.hl7.fhir.convertors.VersionConvertor_30_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class AuditEvent30_40 { @@ -21,8 +22,8 @@ public class AuditEvent30_40 { tgt.setRecordedElement(VersionConvertor_30_40.convertInstant(src.getRecordedElement())); if (src.hasOutcome()) tgt.setOutcome(convertAuditEventOutcome(src.getOutcome())); - if (src.hasOutcomeDesc()) - tgt.setOutcomeDesc(src.getOutcomeDesc()); + if (src.hasOutcomeDescElement()) + tgt.setOutcomeDescElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getOutcomeDescElement())); if (src.hasPurposeOfEvent()) { for (org.hl7.fhir.r4.model.CodeableConcept t : src.getPurposeOfEvent()) tgt.addPurposeOfEvent(VersionConvertor_30_40.convertCodeableConcept(t)); } @@ -53,8 +54,8 @@ public class AuditEvent30_40 { tgt.setRecordedElement(VersionConvertor_30_40.convertInstant(src.getRecordedElement())); if (src.hasOutcome()) tgt.setOutcome(convertAuditEventOutcome(src.getOutcome())); - if (src.hasOutcomeDesc()) - tgt.setOutcomeDesc(src.getOutcomeDesc()); + if (src.hasOutcomeDescElement()) + tgt.setOutcomeDescElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getOutcomeDescElement())); if (src.hasPurposeOfEvent()) { for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getPurposeOfEvent()) tgt.addPurposeOfEvent(VersionConvertor_30_40.convertCodeableConcept(t)); } @@ -121,12 +122,12 @@ public class AuditEvent30_40 { if (src.getWho().hasReference() || src.getWho().hasDisplay() || src.getWho().hasExtension() || src.getWho().hasId()) tgt.setReference(VersionConvertor_30_40.convertReference(src.getWho())); } - if (src.hasAltId()) - tgt.setAltId(src.getAltId()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasRequestor()) - tgt.setRequestor(src.getRequestor()); + if (src.hasAltIdElement()) + tgt.setAltIdElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getAltIdElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getNameElement())); + if (src.hasRequestorElement()) + tgt.setRequestorElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_40.convertType(src.getRequestorElement())); if (src.hasLocation()) tgt.setLocation(VersionConvertor_30_40.convertReference(src.getLocation())); if (src.hasPolicy()) { @@ -154,12 +155,12 @@ public class AuditEvent30_40 { tgt.setWho(VersionConvertor_30_40.convertReference(src.getReference())); if (src.hasUserId()) tgt.getWho().setIdentifier(VersionConvertor_30_40.convertIdentifier(src.getUserId())); - if (src.hasAltId()) - tgt.setAltId(src.getAltId()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasRequestor()) - tgt.setRequestor(src.getRequestor()); + if (src.hasAltIdElement()) + tgt.setAltIdElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getAltIdElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getNameElement())); + if (src.hasRequestorElement()) + tgt.setRequestorElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_30_40.convertType(src.getRequestorElement())); if (src.hasLocation()) tgt.setLocation(VersionConvertor_30_40.convertReference(src.getLocation())); if (src.hasPolicy()) { @@ -180,8 +181,8 @@ public class AuditEvent30_40 { return null; org.hl7.fhir.r4.model.AuditEvent.AuditEventAgentNetworkComponent tgt = new org.hl7.fhir.r4.model.AuditEvent.AuditEventAgentNetworkComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasAddress()) - tgt.setAddress(src.getAddress()); + if (src.hasAddressElement()) + tgt.setAddressElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getAddressElement())); if (src.hasType()) tgt.setType(convertAuditEventAgentNetworkType(src.getType())); return tgt; @@ -192,8 +193,8 @@ public class AuditEvent30_40 { return null; org.hl7.fhir.dstu3.model.AuditEvent.AuditEventAgentNetworkComponent tgt = new org.hl7.fhir.dstu3.model.AuditEvent.AuditEventAgentNetworkComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasAddress()) - tgt.setAddress(src.getAddress()); + if (src.hasAddressElement()) + tgt.setAddressElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getAddressElement())); if (src.hasType()) tgt.setType(convertAuditEventAgentNetworkType(src.getType())); return tgt; @@ -255,10 +256,10 @@ public class AuditEvent30_40 { if (src.hasSecurityLabel()) { for (org.hl7.fhir.dstu3.model.Coding t : src.getSecurityLabel()) tgt.addSecurityLabel(VersionConvertor_30_40.convertCoding(t)); } - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getNameElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); if (src.hasQuery()) tgt.setQuery(src.getQuery()); if (src.hasDetail()) { @@ -287,10 +288,10 @@ public class AuditEvent30_40 { if (src.hasSecurityLabel()) { for (org.hl7.fhir.r4.model.Coding t : src.getSecurityLabel()) tgt.addSecurityLabel(VersionConvertor_30_40.convertCoding(t)); } - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getNameElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); if (src.hasQuery()) tgt.setQuery(src.getQuery()); if (src.hasDetail()) { @@ -304,8 +305,8 @@ public class AuditEvent30_40 { return null; org.hl7.fhir.r4.model.AuditEvent.AuditEventEntityDetailComponent tgt = new org.hl7.fhir.r4.model.AuditEvent.AuditEventEntityDetailComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasType()) - tgt.setType(src.getType()); + if (src.hasTypeElement()) + tgt.setTypeElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getTypeElement())); if (src.hasValue()) tgt.setValue(new org.hl7.fhir.r4.model.Base64BinaryType(src.getValue())); return tgt; @@ -316,8 +317,8 @@ public class AuditEvent30_40 { return null; org.hl7.fhir.dstu3.model.AuditEvent.AuditEventEntityDetailComponent tgt = new org.hl7.fhir.dstu3.model.AuditEvent.AuditEventEntityDetailComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasType()) - tgt.setType(src.getType()); + if (src.hasTypeElement()) + tgt.setTypeElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getTypeElement())); if (src.hasValueStringType()) tgt.setValue(src.getValueStringType().getValue().getBytes()); else if (src.hasValueBase64BinaryType()) @@ -364,8 +365,8 @@ public class AuditEvent30_40 { return null; org.hl7.fhir.dstu3.model.AuditEvent.AuditEventSourceComponent tgt = new org.hl7.fhir.dstu3.model.AuditEvent.AuditEventSourceComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasSite()) - tgt.setSite(src.getSite()); + if (src.hasSiteElement()) + tgt.setSiteElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getSiteElement())); if (src.hasObserver()) tgt.setIdentifier(VersionConvertor_30_40.convertIdentifier(src.getObserver().getIdentifier())); if (src.hasType()) { @@ -379,8 +380,8 @@ public class AuditEvent30_40 { return null; org.hl7.fhir.r4.model.AuditEvent.AuditEventSourceComponent tgt = new org.hl7.fhir.r4.model.AuditEvent.AuditEventSourceComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasSite()) - tgt.setSite(src.getSite()); + if (src.hasSiteElement()) + tgt.setSiteElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getSiteElement())); if (src.hasIdentifier()) tgt.getObserver().setIdentifier(VersionConvertor_30_40.convertIdentifier(src.getIdentifier())); if (src.hasType()) { diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Basic30_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Basic30_40.java index a6c4f4ec7..e1cac7f63 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Basic30_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Basic30_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_40; import org.hl7.fhir.convertors.VersionConvertor_30_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Basic30_40 { diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Binary30_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Binary30_40.java index 3498e9163..76e7b0cae 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Binary30_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Binary30_40.java @@ -1,7 +1,9 @@ package org.hl7.fhir.convertors.conv30_40; import org.hl7.fhir.convertors.VersionConvertor_30_40; +import org.hl7.fhir.dstu3.model.Base64BinaryType; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Binary30_40 { @@ -10,12 +12,12 @@ public class Binary30_40 { return null; org.hl7.fhir.dstu3.model.Binary tgt = new org.hl7.fhir.dstu3.model.Binary(); VersionConvertor_30_40.copyResource(src, tgt); - if (src.hasContentType()) - tgt.setContentType(src.getContentType()); + if (src.hasContentTypeElement()) + tgt.setContentTypeElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_30_40.convertType(src.getContentTypeElement())); if (src.hasSecurityContext()) tgt.setSecurityContext(VersionConvertor_30_40.convertReference(src.getSecurityContext())); - if (src.hasData()) - tgt.setContent(src.getData()); + if (src.hasDataElement()) + tgt.setContentElement((Base64BinaryType) VersionConvertor_30_40.convertType(src.getDataElement())); return tgt; } @@ -24,12 +26,12 @@ public class Binary30_40 { return null; org.hl7.fhir.r4.model.Binary tgt = new org.hl7.fhir.r4.model.Binary(); VersionConvertor_30_40.copyResource(src, tgt); - if (src.hasContentType()) - tgt.setContentType(src.getContentType()); + if (src.hasContentTypeElement()) + tgt.setContentTypeElement((org.hl7.fhir.r4.model.CodeType) VersionConvertor_30_40.convertType(src.getContentTypeElement())); if (src.hasSecurityContext()) tgt.setSecurityContext(VersionConvertor_30_40.convertReference(src.getSecurityContext())); - if (src.hasContent()) - tgt.setData(src.getContent()); + if (src.hasContentElement()) + tgt.setDataElement((org.hl7.fhir.r4.model.Base64BinaryType) VersionConvertor_30_40.convertType(src.getContentElement())); return tgt; } } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/BodySite30_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/BodySite30_40.java index 95b0cf715..6f90de8df 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/BodySite30_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/BodySite30_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_40; import org.hl7.fhir.convertors.VersionConvertor_30_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class BodySite30_40 { @@ -13,10 +14,10 @@ public class BodySite30_40 { if (src.hasIdentifier()) { for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_30_40.convertIdentifier(t)); } - if (src.hasActive()) - tgt.setActive(src.getActive()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasActiveElement()) + tgt.setActiveElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_40.convertType(src.getActiveElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); if (src.hasImage()) { for (org.hl7.fhir.r4.model.Attachment t : src.getImage()) tgt.addImage(VersionConvertor_30_40.convertAttachment(t)); } @@ -33,10 +34,10 @@ public class BodySite30_40 { if (src.hasIdentifier()) { for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_30_40.convertIdentifier(t)); } - if (src.hasActive()) - tgt.setActive(src.getActive()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasActiveElement()) + tgt.setActiveElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_30_40.convertType(src.getActiveElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); if (src.hasImage()) { for (org.hl7.fhir.dstu3.model.Attachment t : src.getImage()) tgt.addImage(VersionConvertor_30_40.convertAttachment(t)); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Bundle30_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Bundle30_40.java index 21760a229..2353677c7 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Bundle30_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Bundle30_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_40; import org.hl7.fhir.convertors.VersionConvertor_30_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Bundle30_40 { @@ -14,8 +15,8 @@ public class Bundle30_40 { tgt.setIdentifier(VersionConvertor_30_40.convertIdentifier(src.getIdentifier())); if (src.hasType()) tgt.setType(convertBundleType(src.getType())); - if (src.hasTotal()) - tgt.setTotal(src.getTotal()); + if (src.hasTotalElement()) + tgt.setTotalElement((org.hl7.fhir.r4.model.UnsignedIntType) VersionConvertor_30_40.convertType(src.getTotalElement())); if (src.hasLink()) { for (org.hl7.fhir.dstu3.model.Bundle.BundleLinkComponent t : src.getLink()) tgt.addLink(convertBundleLinkComponent(t)); } @@ -36,8 +37,8 @@ public class Bundle30_40 { tgt.setIdentifier(VersionConvertor_30_40.convertIdentifier(src.getIdentifier())); if (src.hasType()) tgt.setType(convertBundleType(src.getType())); - if (src.hasTotal()) - tgt.setTotal(src.getTotal()); + if (src.hasTotalElement()) + tgt.setTotalElement((org.hl7.fhir.dstu3.model.UnsignedIntType) VersionConvertor_30_40.convertType(src.getTotalElement())); if (src.hasLink()) { for (org.hl7.fhir.r4.model.Bundle.BundleLinkComponent t : src.getLink()) tgt.addLink(convertBundleLinkComponent(t)); } @@ -57,8 +58,8 @@ public class Bundle30_40 { if (src.hasLink()) { for (org.hl7.fhir.r4.model.Bundle.BundleLinkComponent t : src.getLink()) tgt.addLink(convertBundleLinkComponent(t)); } - if (src.hasFullUrl()) - tgt.setFullUrl(src.getFullUrl()); + if (src.hasFullUrlElement()) + tgt.setFullUrlElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_40.convertType(src.getFullUrlElement())); if (src.hasResource()) tgt.setResource(VersionConvertor_30_40.convertResource(src.getResource(), false)); if (src.hasSearch()) @@ -78,8 +79,8 @@ public class Bundle30_40 { if (src.hasLink()) { for (org.hl7.fhir.dstu3.model.Bundle.BundleLinkComponent t : src.getLink()) tgt.addLink(convertBundleLinkComponent(t)); } - if (src.hasFullUrl()) - tgt.setFullUrl(src.getFullUrl()); + if (src.hasFullUrlElement()) + tgt.setFullUrlElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_30_40.convertType(src.getFullUrlElement())); if (src.hasResource()) tgt.setResource(VersionConvertor_30_40.convertResource(src.getResource(), false)); if (src.hasSearch()) @@ -98,16 +99,16 @@ public class Bundle30_40 { VersionConvertor_30_40.copyElement(src, tgt); if (src.hasMethod()) tgt.setMethod(convertHTTPVerb(src.getMethod())); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); - if (src.hasIfNoneMatch()) - tgt.setIfNoneMatch(src.getIfNoneMatch()); - if (src.hasIfModifiedSince()) - tgt.setIfModifiedSince(src.getIfModifiedSince()); - if (src.hasIfMatch()) - tgt.setIfMatch(src.getIfMatch()); - if (src.hasIfNoneExist()) - tgt.setIfNoneExist(src.getIfNoneExist()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_30_40.convertType(src.getUrlElement())); + if (src.hasIfNoneMatchElement()) + tgt.setIfNoneMatchElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getIfNoneMatchElement())); + if (src.hasIfModifiedSinceElement()) + tgt.setIfModifiedSinceElement((org.hl7.fhir.r4.model.InstantType) VersionConvertor_30_40.convertType(src.getIfModifiedSinceElement())); + if (src.hasIfMatchElement()) + tgt.setIfMatchElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getIfMatchElement())); + if (src.hasIfNoneExistElement()) + tgt.setIfNoneExistElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getIfNoneExistElement())); return tgt; } @@ -118,16 +119,16 @@ public class Bundle30_40 { VersionConvertor_30_40.copyElement(src, tgt); if (src.hasMethod()) tgt.setMethod(convertHTTPVerb(src.getMethod())); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); - if (src.hasIfNoneMatch()) - tgt.setIfNoneMatch(src.getIfNoneMatch()); - if (src.hasIfModifiedSince()) - tgt.setIfModifiedSince(src.getIfModifiedSince()); - if (src.hasIfMatch()) - tgt.setIfMatch(src.getIfMatch()); - if (src.hasIfNoneExist()) - tgt.setIfNoneExist(src.getIfNoneExist()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_40.convertType(src.getUrlElement())); + if (src.hasIfNoneMatchElement()) + tgt.setIfNoneMatchElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getIfNoneMatchElement())); + if (src.hasIfModifiedSinceElement()) + tgt.setIfModifiedSinceElement((org.hl7.fhir.dstu3.model.InstantType) VersionConvertor_30_40.convertType(src.getIfModifiedSinceElement())); + if (src.hasIfMatchElement()) + tgt.setIfMatchElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getIfMatchElement())); + if (src.hasIfNoneExistElement()) + tgt.setIfNoneExistElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getIfNoneExistElement())); return tgt; } @@ -136,12 +137,12 @@ public class Bundle30_40 { return null; org.hl7.fhir.r4.model.Bundle.BundleEntryResponseComponent tgt = new org.hl7.fhir.r4.model.Bundle.BundleEntryResponseComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasStatus()) - tgt.setStatus(src.getStatus()); - if (src.hasLocation()) - tgt.setLocation(src.getLocation()); - if (src.hasEtag()) - tgt.setEtag(src.getEtag()); + if (src.hasStatusElement()) + tgt.setStatusElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getStatusElement())); + if (src.hasLocationElement()) + tgt.setLocationElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_30_40.convertType(src.getLocationElement())); + if (src.hasEtagElement()) + tgt.setEtagElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getEtagElement())); if (src.hasLastModified()) tgt.setLastModifiedElement(VersionConvertor_30_40.convertInstant(src.getLastModifiedElement())); if (src.hasOutcome()) @@ -154,12 +155,12 @@ public class Bundle30_40 { return null; org.hl7.fhir.dstu3.model.Bundle.BundleEntryResponseComponent tgt = new org.hl7.fhir.dstu3.model.Bundle.BundleEntryResponseComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasStatus()) - tgt.setStatus(src.getStatus()); - if (src.hasLocation()) - tgt.setLocation(src.getLocation()); - if (src.hasEtag()) - tgt.setEtag(src.getEtag()); + if (src.hasStatusElement()) + tgt.setStatusElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getStatusElement())); + if (src.hasLocationElement()) + tgt.setLocationElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_40.convertType(src.getLocationElement())); + if (src.hasEtagElement()) + tgt.setEtagElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getEtagElement())); if (src.hasLastModified()) tgt.setLastModifiedElement(VersionConvertor_30_40.convertInstant(src.getLastModifiedElement())); if (src.hasOutcome()) @@ -174,8 +175,8 @@ public class Bundle30_40 { VersionConvertor_30_40.copyElement(src, tgt); if (src.hasMode()) tgt.setMode(convertSearchEntryMode(src.getMode())); - if (src.hasScore()) - tgt.setScore(src.getScore()); + if (src.hasScoreElement()) + tgt.setScoreElement((org.hl7.fhir.r4.model.DecimalType) VersionConvertor_30_40.convertType(src.getScoreElement())); return tgt; } @@ -186,8 +187,8 @@ public class Bundle30_40 { VersionConvertor_30_40.copyElement(src, tgt); if (src.hasMode()) tgt.setMode(convertSearchEntryMode(src.getMode())); - if (src.hasScore()) - tgt.setScore(src.getScore()); + if (src.hasScoreElement()) + tgt.setScoreElement((org.hl7.fhir.dstu3.model.DecimalType) VersionConvertor_30_40.convertType(src.getScoreElement())); return tgt; } @@ -196,10 +197,10 @@ public class Bundle30_40 { return null; org.hl7.fhir.dstu3.model.Bundle.BundleLinkComponent tgt = new org.hl7.fhir.dstu3.model.Bundle.BundleLinkComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasRelation()) - tgt.setRelation(src.getRelation()); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasRelationElement()) + tgt.setRelationElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getRelationElement())); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_40.convertType(src.getUrlElement())); return tgt; } @@ -208,10 +209,10 @@ public class Bundle30_40 { return null; org.hl7.fhir.r4.model.Bundle.BundleLinkComponent tgt = new org.hl7.fhir.r4.model.Bundle.BundleLinkComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasRelation()) - tgt.setRelation(src.getRelation()); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasRelationElement()) + tgt.setRelationElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getRelationElement())); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_30_40.convertType(src.getUrlElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/CapabilityStatement30_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/CapabilityStatement30_40.java index 229530876..d05403552 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/CapabilityStatement30_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/CapabilityStatement30_40.java @@ -3,6 +3,7 @@ package org.hl7.fhir.convertors.conv30_40; import org.hl7.fhir.convertors.VersionConvertorConstants; import org.hl7.fhir.convertors.VersionConvertor_30_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class CapabilityStatement30_40 { @@ -11,37 +12,37 @@ public class CapabilityStatement30_40 { return null; org.hl7.fhir.dstu3.model.CapabilityStatement tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement(); VersionConvertor_30_40.copyDomainResource(src, tgt, "http://hl7.org/fhir/3.0/StructureDefinition/extension-CapabilityStatement.acceptUnknown"); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_40.convertType(src.getUrlElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getNameElement())); + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getTitleElement())); if (src.hasStatus()) tgt.setStatus(VersionConvertor_30_40.convertPublicationStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_40.convertType(src.getExperimentalElement())); if (src.hasDateElement()) tgt.setDateElement(VersionConvertor_30_40.convertDateTime(src.getDateElement())); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact()) tgt.addContact(VersionConvertor_30_40.convertContactDetail(t)); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); if (src.hasUseContext()) { for (org.hl7.fhir.r4.model.UsageContext t : src.getUseContext()) tgt.addUseContext(VersionConvertor_30_40.convertUsageContext(t)); } if (src.hasJurisdiction()) { for (org.hl7.fhir.r4.model.CodeableConcept t : src.getJurisdiction()) tgt.addJurisdiction(VersionConvertor_30_40.convertCodeableConcept(t)); } - if (src.hasPurpose()) - tgt.setPurpose(src.getPurpose()); - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); + if (src.hasPurposeElement()) + tgt.setPurposeElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_40.convertType(src.getPurposeElement())); + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_40.convertType(src.getCopyrightElement())); if (src.hasKind()) tgt.setKind(convertCapabilityStatementKind(src.getKind())); if (src.hasInstantiates()) { @@ -89,37 +90,37 @@ public class CapabilityStatement30_40 { return null; org.hl7.fhir.r4.model.CapabilityStatement tgt = new org.hl7.fhir.r4.model.CapabilityStatement(); VersionConvertor_30_40.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_30_40.convertType(src.getUrlElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getNameElement())); + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getTitleElement())); if (src.hasStatus()) tgt.setStatus(VersionConvertor_30_40.convertPublicationStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_30_40.convertType(src.getExperimentalElement())); if (src.hasDateElement()) tgt.setDateElement(VersionConvertor_30_40.convertDateTime(src.getDateElement())); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) tgt.addContact(VersionConvertor_30_40.convertContactDetail(t)); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r4.model.MarkdownType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); if (src.hasUseContext()) { for (org.hl7.fhir.dstu3.model.UsageContext t : src.getUseContext()) tgt.addUseContext(VersionConvertor_30_40.convertUsageContext(t)); } if (src.hasJurisdiction()) { for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getJurisdiction()) tgt.addJurisdiction(VersionConvertor_30_40.convertCodeableConcept(t)); } - if (src.hasPurpose()) - tgt.setPurpose(src.getPurpose()); - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); + if (src.hasPurposeElement()) + tgt.setPurposeElement((org.hl7.fhir.r4.model.MarkdownType) VersionConvertor_30_40.convertType(src.getPurposeElement())); + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.r4.model.MarkdownType) VersionConvertor_30_40.convertType(src.getCopyrightElement())); if (src.hasKind()) tgt.setKind(convertCapabilityStatementKind(src.getKind())); if (src.hasInstantiates()) { @@ -164,8 +165,8 @@ public class CapabilityStatement30_40 { VersionConvertor_30_40.copyElement(src, tgt); if (src.hasMode()) tgt.setMode(convertDocumentMode(src.getMode())); - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getDocumentationElement())); if (src.hasProfile()) tgt.setProfile(VersionConvertor_30_40.convertCanonicalToReference(src.getProfileElement())); return tgt; @@ -178,8 +179,8 @@ public class CapabilityStatement30_40 { VersionConvertor_30_40.copyElement(src, tgt); if (src.hasMode()) tgt.setMode(convertDocumentMode(src.getMode())); - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.r4.model.MarkdownType) VersionConvertor_30_40.convertType(src.getDocumentationElement())); if (src.hasProfile()) tgt.setProfileElement(VersionConvertor_30_40.convertReferenceToCanonical(src.getProfile())); return tgt; @@ -190,10 +191,10 @@ public class CapabilityStatement30_40 { return null; org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementImplementationComponent tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementImplementationComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_40.convertType(src.getUrlElement())); return tgt; } @@ -202,10 +203,10 @@ public class CapabilityStatement30_40 { return null; org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementImplementationComponent tgt = new org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementImplementationComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r4.model.UrlType) VersionConvertor_30_40.convertType(src.getUrlElement())); return tgt; } @@ -247,10 +248,10 @@ public class CapabilityStatement30_40 { if (src.hasEndpoint()) { for (org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementMessagingEndpointComponent t : src.getEndpoint()) tgt.addEndpoint(convertCapabilityStatementMessagingEndpointComponent(t)); } - if (src.hasReliableCache()) - tgt.setReliableCache(src.getReliableCache()); - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasReliableCacheElement()) + tgt.setReliableCacheElement((org.hl7.fhir.dstu3.model.UnsignedIntType) VersionConvertor_30_40.convertType(src.getReliableCacheElement())); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getDocumentationElement())); if (src.hasSupportedMessage()) { for (org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementMessagingSupportedMessageComponent t : src.getSupportedMessage()) tgt.addSupportedMessage(convertCapabilityStatementMessagingSupportedMessageComponent(t)); } @@ -288,10 +289,10 @@ public class CapabilityStatement30_40 { if (src.hasEndpoint()) { for (org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingEndpointComponent t : src.getEndpoint()) tgt.addEndpoint(convertCapabilityStatementMessagingEndpointComponent(t)); } - if (src.hasReliableCache()) - tgt.setReliableCache(src.getReliableCache()); - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasReliableCacheElement()) + tgt.setReliableCacheElement((org.hl7.fhir.r4.model.UnsignedIntType) VersionConvertor_30_40.convertType(src.getReliableCacheElement())); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.r4.model.MarkdownType) VersionConvertor_30_40.convertType(src.getDocumentationElement())); if (src.hasSupportedMessage()) { for (org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingSupportedMessageComponent t : src.getSupportedMessage()) tgt.addSupportedMessage(convertCapabilityStatementMessagingSupportedMessageComponent(t)); } @@ -325,8 +326,8 @@ public class CapabilityStatement30_40 { VersionConvertor_30_40.copyElement(src, tgt); if (src.hasProtocol()) tgt.setProtocol(VersionConvertor_30_40.convertCoding(src.getProtocol())); - if (src.hasAddress()) - tgt.setAddress(src.getAddress()); + if (src.hasAddressElement()) + tgt.setAddressElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_40.convertType(src.getAddressElement())); return tgt; } @@ -337,8 +338,8 @@ public class CapabilityStatement30_40 { VersionConvertor_30_40.copyElement(src, tgt); if (src.hasProtocol()) tgt.setProtocol(VersionConvertor_30_40.convertCoding(src.getProtocol())); - if (src.hasAddress()) - tgt.setAddress(src.getAddress()); + if (src.hasAddressElement()) + tgt.setAddressElement((org.hl7.fhir.r4.model.UrlType) VersionConvertor_30_40.convertType(src.getAddressElement())); return tgt; } @@ -373,8 +374,8 @@ public class CapabilityStatement30_40 { VersionConvertor_30_40.copyElement(src, tgt); if (src.hasMode()) tgt.setMode(convertRestfulCapabilityMode(src.getMode())); - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.r4.model.MarkdownType) VersionConvertor_30_40.convertType(src.getDocumentationElement())); if (src.hasSecurity()) tgt.setSecurity(convertCapabilityStatementRestSecurityComponent(src.getSecurity())); if (src.hasResource()) { @@ -402,8 +403,8 @@ public class CapabilityStatement30_40 { VersionConvertor_30_40.copyElement(src, tgt); if (src.hasMode()) tgt.setMode(convertRestfulCapabilityMode(src.getMode())); - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getDocumentationElement())); if (src.hasSecurity()) tgt.setSecurity(convertCapabilityStatementRestSecurityComponent(src.getSecurity())); if (src.hasResource()) { @@ -429,8 +430,8 @@ public class CapabilityStatement30_40 { return null; org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestOperationComponent tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestOperationComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getNameElement())); if (src.hasDefinition()) tgt.setDefinition(VersionConvertor_30_40.convertCanonicalToReference(src.getDefinitionElement())); return tgt; @@ -441,8 +442,8 @@ public class CapabilityStatement30_40 { return null; org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestResourceOperationComponent tgt = new org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestResourceOperationComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getNameElement())); if (src.hasDefinition()) tgt.setDefinitionElement(VersionConvertor_30_40.convertReferenceToCanonical(src.getDefinition())); return tgt; @@ -453,27 +454,27 @@ public class CapabilityStatement30_40 { return null; org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestResourceComponent tgt = new org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestResourceComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasType()) - tgt.setType(src.getType()); + if (src.hasTypeElement()) + tgt.setTypeElement((org.hl7.fhir.r4.model.CodeType) VersionConvertor_30_40.convertType(src.getTypeElement())); if (src.hasProfile()) tgt.setProfileElement(VersionConvertor_30_40.convertReferenceToCanonical(src.getProfile())); - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.r4.model.MarkdownType) VersionConvertor_30_40.convertType(src.getDocumentationElement())); if (src.hasInteraction()) { for (org.hl7.fhir.dstu3.model.CapabilityStatement.ResourceInteractionComponent t : src.getInteraction()) tgt.addInteraction(convertResourceInteractionComponent(t)); } if (src.hasVersioning()) tgt.setVersioning(convertResourceVersionPolicy(src.getVersioning())); - if (src.hasReadHistory()) - tgt.setReadHistory(src.getReadHistory()); - if (src.hasUpdateCreate()) - tgt.setUpdateCreate(src.getUpdateCreate()); - if (src.hasConditionalCreate()) - tgt.setConditionalCreate(src.getConditionalCreate()); + if (src.hasReadHistoryElement()) + tgt.setReadHistoryElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_30_40.convertType(src.getReadHistoryElement())); + if (src.hasUpdateCreateElement()) + tgt.setUpdateCreateElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_30_40.convertType(src.getUpdateCreateElement())); + if (src.hasConditionalCreateElement()) + tgt.setConditionalCreateElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_30_40.convertType(src.getConditionalCreateElement())); if (src.hasConditionalRead()) tgt.setConditionalRead(convertConditionalReadStatus(src.getConditionalRead())); - if (src.hasConditionalUpdate()) - tgt.setConditionalUpdate(src.getConditionalUpdate()); + if (src.hasConditionalUpdateElement()) + tgt.setConditionalUpdateElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_30_40.convertType(src.getConditionalUpdateElement())); if (src.hasConditionalDelete()) tgt.setConditionalDelete(convertConditionalDeleteStatus(src.getConditionalDelete())); if (src.hasReferencePolicy()) { @@ -496,27 +497,27 @@ public class CapabilityStatement30_40 { return null; org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestResourceComponent tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestResourceComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasType()) - tgt.setType(src.getType()); + if (src.hasTypeElement()) + tgt.setTypeElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_30_40.convertType(src.getTypeElement())); if (src.hasProfile()) tgt.setProfile(VersionConvertor_30_40.convertCanonicalToReference(src.getProfileElement())); - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_40.convertType(src.getDocumentationElement())); if (src.hasInteraction()) { for (org.hl7.fhir.r4.model.CapabilityStatement.ResourceInteractionComponent t : src.getInteraction()) tgt.addInteraction(convertResourceInteractionComponent(t)); } if (src.hasVersioning()) tgt.setVersioning(convertResourceVersionPolicy(src.getVersioning())); - if (src.hasReadHistory()) - tgt.setReadHistory(src.getReadHistory()); - if (src.hasUpdateCreate()) - tgt.setUpdateCreate(src.getUpdateCreate()); - if (src.hasConditionalCreate()) - tgt.setConditionalCreate(src.getConditionalCreate()); + if (src.hasReadHistoryElement()) + tgt.setReadHistoryElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_40.convertType(src.getReadHistoryElement())); + if (src.hasUpdateCreateElement()) + tgt.setUpdateCreateElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_40.convertType(src.getUpdateCreateElement())); + if (src.hasConditionalCreateElement()) + tgt.setConditionalCreateElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_40.convertType(src.getConditionalCreateElement())); if (src.hasConditionalRead()) tgt.setConditionalRead(convertConditionalReadStatus(src.getConditionalRead())); - if (src.hasConditionalUpdate()) - tgt.setConditionalUpdate(src.getConditionalUpdate()); + if (src.hasConditionalUpdateElement()) + tgt.setConditionalUpdateElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_40.convertType(src.getConditionalUpdateElement())); if (src.hasConditionalDelete()) tgt.setConditionalDelete(convertConditionalDeleteStatus(src.getConditionalDelete())); if (src.hasReferencePolicy()) { @@ -539,14 +540,14 @@ public class CapabilityStatement30_40 { return null; org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent tgt = new org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasDefinition()) - tgt.setDefinition(src.getDefinition()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getNameElement())); + if (src.hasDefinitionElement()) + tgt.setDefinitionElement((org.hl7.fhir.r4.model.CanonicalType) VersionConvertor_30_40.convertType(src.getDefinitionElement())); if (src.hasType()) tgt.setType(VersionConvertor_30_40.convertSearchParamType(src.getType())); - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.r4.model.MarkdownType) VersionConvertor_30_40.convertType(src.getDocumentationElement())); return tgt; } @@ -555,14 +556,14 @@ public class CapabilityStatement30_40 { return null; org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasDefinition()) - tgt.setDefinition(src.getDefinition()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getNameElement())); + if (src.hasDefinitionElement()) + tgt.setDefinitionElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_40.convertType(src.getDefinitionElement())); if (src.hasType()) tgt.setType(VersionConvertor_30_40.convertSearchParamType(src.getType())); - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getDocumentationElement())); return tgt; } @@ -571,13 +572,13 @@ public class CapabilityStatement30_40 { return null; org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestSecurityComponent tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestSecurityComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasCors()) - tgt.setCors(src.getCors()); + if (src.hasCorsElement()) + tgt.setCorsElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_40.convertType(src.getCorsElement())); if (src.hasService()) { for (org.hl7.fhir.r4.model.CodeableConcept t : src.getService()) tgt.addService(VersionConvertor_30_40.convertCodeableConcept(t)); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); return tgt; } @@ -586,13 +587,13 @@ public class CapabilityStatement30_40 { return null; org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestSecurityComponent tgt = new org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestSecurityComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasCors()) - tgt.setCors(src.getCors()); + if (src.hasCorsElement()) + tgt.setCorsElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_30_40.convertType(src.getCorsElement())); if (src.hasService()) { for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getService()) tgt.addService(VersionConvertor_30_40.convertCodeableConcept(t)); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r4.model.MarkdownType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); return tgt; } @@ -601,10 +602,10 @@ public class CapabilityStatement30_40 { return null; org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementSoftwareComponent tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementSoftwareComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getNameElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getVersionElement())); if (src.hasReleaseDate()) tgt.setReleaseDateElement(VersionConvertor_30_40.convertDateTime(src.getReleaseDateElement())); return tgt; @@ -615,10 +616,10 @@ public class CapabilityStatement30_40 { return null; org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementSoftwareComponent tgt = new org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementSoftwareComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getNameElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getVersionElement())); if (src.hasReleaseDate()) tgt.setReleaseDateElement(VersionConvertor_30_40.convertDateTime(src.getReleaseDateElement())); return tgt; @@ -785,8 +786,8 @@ public class CapabilityStatement30_40 { VersionConvertor_30_40.copyElement(src, tgt); if (src.hasCode()) tgt.setCode(convertTypeRestfulInteraction(src.getCode())); - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getDocumentationElement())); return tgt; } @@ -797,8 +798,8 @@ public class CapabilityStatement30_40 { VersionConvertor_30_40.copyElement(src, tgt); if (src.hasCode()) tgt.setCode(convertTypeRestfulInteraction(src.getCode())); - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.r4.model.MarkdownType) VersionConvertor_30_40.convertType(src.getDocumentationElement())); return tgt; } @@ -865,8 +866,8 @@ public class CapabilityStatement30_40 { VersionConvertor_30_40.copyElement(src, tgt); if (src.hasCode()) tgt.setCode(convertSystemRestfulInteraction(src.getCode())); - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getDocumentationElement())); return tgt; } @@ -877,8 +878,8 @@ public class CapabilityStatement30_40 { VersionConvertor_30_40.copyElement(src, tgt); if (src.hasCode()) tgt.setCode(convertSystemRestfulInteraction(src.getCode())); - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.r4.model.MarkdownType) VersionConvertor_30_40.convertType(src.getDocumentationElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/CarePlan30_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/CarePlan30_40.java index a9ab6d378..5a22a95ac 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/CarePlan30_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/CarePlan30_40.java @@ -2,7 +2,10 @@ package org.hl7.fhir.convertors.conv30_40; import org.hl7.fhir.convertors.VersionConvertor_30_40; import org.hl7.fhir.exceptions.FHIRException; +import org.hl7.fhir.r4.model.BooleanType; + import java.util.List; +import java.util.Collections; public class CarePlan30_40 { @@ -26,47 +29,29 @@ public class CarePlan30_40 { tgt.addPartOf(VersionConvertor_30_40.convertReference(t)); } if (src.hasStatus()) { - if (src.hasStatus()) { - tgt.setStatus(convertCarePlanStatus(src.getStatus())); - } + tgt.setStatus(convertCarePlanStatus(src.getStatus())); } if (src.hasIntent()) { - if (src.hasIntent()) { - tgt.setIntent(convertCarePlanIntent(src.getIntent())); - } + tgt.setIntent(convertCarePlanIntent(src.getIntent())); } for (org.hl7.fhir.r4.model.CodeableConcept t : src.getCategory()) { tgt.addCategory(VersionConvertor_30_40.convertCodeableConcept(t)); } - if (src.hasTitle()) { - if (src.hasTitle()) { - tgt.setTitle(src.getTitle()); - } - } - if (src.hasDescription()) { - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } - } + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getTitleElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); if (src.hasSubject()) { - if (src.hasSubject()) { - tgt.setSubject(VersionConvertor_30_40.convertReference(src.getSubject())); - } + tgt.setSubject(VersionConvertor_30_40.convertReference(src.getSubject())); } if (src.hasEncounter()) { - if (src.hasEncounter()) { - tgt.setContext(VersionConvertor_30_40.convertReference(src.getEncounter())); - } + tgt.setContext(VersionConvertor_30_40.convertReference(src.getEncounter())); } if (src.hasPeriod()) { - if (src.hasPeriod()) { - tgt.setPeriod(VersionConvertor_30_40.convertPeriod(src.getPeriod())); - } + tgt.setPeriod(VersionConvertor_30_40.convertPeriod(src.getPeriod())); } if (src.hasAuthor()) { - if (src.hasAuthor()) { - tgt.addAuthor(VersionConvertor_30_40.convertReference(src.getAuthor())); - } + tgt.addAuthor(VersionConvertor_30_40.convertReference(src.getAuthor())); } for (org.hl7.fhir.r4.model.Reference t : src.getCareTeam()) { tgt.addCareTeam(VersionConvertor_30_40.convertReference(t)); @@ -113,12 +98,10 @@ public class CarePlan30_40 { for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getCategory()) { tgt.addCategory(VersionConvertor_30_40.convertCodeableConcept(t)); } - if (src.hasTitle()) { - tgt.setTitle(src.getTitle()); - } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getTitleElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); if (src.hasSubject()) { tgt.setSubject(VersionConvertor_30_40.convertReference(src.getSubject())); } @@ -170,14 +153,10 @@ public class CarePlan30_40 { tgt.addProgress(VersionConvertor_30_40.convertAnnotation(t)); } if (src.hasReference()) { - if (src.hasReference()) { - tgt.setReference(VersionConvertor_30_40.convertReference(src.getReference())); - } + tgt.setReference(VersionConvertor_30_40.convertReference(src.getReference())); } if (src.hasDetail()) { - if (src.hasDetail()) { - tgt.setDetail(convertCarePlanActivityDetailComponent(src.getDetail())); - } + tgt.setDetail(convertCarePlanActivityDetailComponent(src.getDetail())); } return tgt; } @@ -197,14 +176,10 @@ public class CarePlan30_40 { tgt.addProgress(VersionConvertor_30_40.convertAnnotation(t)); } if (src.hasReference()) { - if (src.hasReference()) { - tgt.setReference(VersionConvertor_30_40.convertReference(src.getReference())); - } + tgt.setReference(VersionConvertor_30_40.convertReference(src.getReference())); } if (src.hasDetail()) { - if (src.hasDetail()) { - tgt.setDetail(convertCarePlanActivityDetailComponent(src.getDetail())); - } + tgt.setDetail(convertCarePlanActivityDetailComponent(src.getDetail())); } return tgt; } @@ -223,9 +198,7 @@ public class CarePlan30_40 { tgt.addExtension(t); } if (src.hasCode()) { - if (src.hasCode()) { - tgt.setCode(VersionConvertor_30_40.convertCodeableConcept(src.getCode())); - } + tgt.setCode(VersionConvertor_30_40.convertCodeableConcept(src.getCode())); } for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getReasonCode()) { tgt.addReasonCode(VersionConvertor_30_40.convertCodeableConcept(t)); @@ -237,9 +210,7 @@ public class CarePlan30_40 { tgt.addGoal(VersionConvertor_30_40.convertReference(t)); } if (src.hasStatus()) { - if (src.hasStatus()) { - tgt.setStatus(convertCarePlanActivityStatus(src.getStatus())); - } + tgt.setStatus(convertCarePlanActivityStatus(src.getStatus())); } if (src.hasStatusReason()) { org.hl7.fhir.r4.model.Coding code = new org.hl7.fhir.r4.model.Coding(); @@ -249,44 +220,29 @@ public class CarePlan30_40 { org.hl7.fhir.r4.model.CodeableConcept t = new org.hl7.fhir.r4.model.CodeableConcept(code); tgt.setStatusReason(t); } - if (src.hasProhibited()) { - if (src.hasProhibited()) { - tgt.setDoNotPerform(src.getProhibited()); - } + if (src.hasProhibitedElement()) { + tgt.setDoNotPerformElement((BooleanType) VersionConvertor_30_40.convertType(src.getProhibitedElement())); } if (src.hasScheduled()) { - if (src.hasScheduled()) { - tgt.setScheduled(VersionConvertor_30_40.convertType(src.getScheduled())); - } + tgt.setScheduled(VersionConvertor_30_40.convertType(src.getScheduled())); } if (src.hasLocation()) { - if (src.hasLocation()) { - tgt.setLocation(VersionConvertor_30_40.convertReference(src.getLocation())); - } + tgt.setLocation(VersionConvertor_30_40.convertReference(src.getLocation())); } for (org.hl7.fhir.dstu3.model.Reference t : src.getPerformer()) { tgt.addPerformer(VersionConvertor_30_40.convertReference(t)); } if (src.hasProduct()) { - if (src.hasProduct()) { - tgt.setProduct(VersionConvertor_30_40.convertType(src.getProduct())); - } + tgt.setProduct(VersionConvertor_30_40.convertType(src.getProduct())); } if (src.hasDailyAmount()) { - if (src.hasDailyAmount()) { - tgt.setDailyAmount(VersionConvertor_30_40.convertSimpleQuantity(src.getDailyAmount())); - } + tgt.setDailyAmount(VersionConvertor_30_40.convertSimpleQuantity(src.getDailyAmount())); } if (src.hasQuantity()) { - if (src.hasQuantity()) { - tgt.setQuantity(VersionConvertor_30_40.convertSimpleQuantity(src.getQuantity())); - } - } - if (src.hasDescription()) { - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + tgt.setQuantity(VersionConvertor_30_40.convertSimpleQuantity(src.getQuantity())); } + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); return tgt; } @@ -325,8 +281,8 @@ public class CarePlan30_40 { tgt.setStatusReason(coding.get(0).getCode()); } } - if (src.hasDoNotPerform()) { - tgt.setProhibited(src.getDoNotPerform()); + if (src.hasDoNotPerformElement()) { + tgt.setProhibitedElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_40.convertType(src.getDoNotPerformElement())); } if (src.hasScheduled()) { tgt.setScheduled(VersionConvertor_30_40.convertType(src.getScheduled())); @@ -346,9 +302,8 @@ public class CarePlan30_40 { if (src.hasQuantity()) { tgt.setQuantity(VersionConvertor_30_40.convertSimpleQuantity(src.getQuantity())); } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/CareTeam30_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/CareTeam30_40.java index 569ad8e6a..d66f2c27c 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/CareTeam30_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/CareTeam30_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_40; import org.hl7.fhir.convertors.VersionConvertor_30_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class CareTeam30_40 { @@ -18,8 +19,8 @@ public class CareTeam30_40 { if (src.hasCategory()) { for (org.hl7.fhir.r4.model.CodeableConcept t : src.getCategory()) tgt.addCategory(VersionConvertor_30_40.convertCodeableConcept(t)); } - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getNameElement())); if (src.hasSubject()) tgt.setSubject(VersionConvertor_30_40.convertReference(src.getSubject())); if (src.hasEncounter()) @@ -57,8 +58,8 @@ public class CareTeam30_40 { if (src.hasCategory()) { for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getCategory()) tgt.addCategory(VersionConvertor_30_40.convertCodeableConcept(t)); } - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getNameElement())); if (src.hasSubject()) tgt.setSubject(VersionConvertor_30_40.convertReference(src.getSubject())); if (src.hasContext()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/ClinicalImpression30_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/ClinicalImpression30_40.java index f2518dfc8..f4e976618 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/ClinicalImpression30_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/ClinicalImpression30_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_40; import org.hl7.fhir.convertors.VersionConvertor_30_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class ClinicalImpression30_40 { @@ -17,8 +18,8 @@ public class ClinicalImpression30_40 { tgt.setStatus(convertClinicalImpressionStatus(src.getStatus())); if (src.hasCode()) tgt.setCode(VersionConvertor_30_40.convertCodeableConcept(src.getCode())); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); if (src.hasSubject()) tgt.setSubject(VersionConvertor_30_40.convertReference(src.getSubject())); if (src.hasEncounter()) @@ -40,8 +41,8 @@ public class ClinicalImpression30_40 { if (src.hasProtocol()) { for (org.hl7.fhir.r4.model.UriType t : src.getProtocol()) tgt.addProtocol(t.getValue()); } - if (src.hasSummary()) - tgt.setSummary(src.getSummary()); + if (src.hasSummaryElement()) + tgt.setSummaryElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getSummaryElement())); if (src.hasFinding()) { for (org.hl7.fhir.r4.model.ClinicalImpression.ClinicalImpressionFindingComponent t : src.getFinding()) tgt.addFinding(convertClinicalImpressionFindingComponent(t)); } @@ -69,8 +70,8 @@ public class ClinicalImpression30_40 { tgt.setStatus(convertClinicalImpressionStatus(src.getStatus())); if (src.hasCode()) tgt.setCode(VersionConvertor_30_40.convertCodeableConcept(src.getCode())); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); if (src.hasSubject()) tgt.setSubject(VersionConvertor_30_40.convertReference(src.getSubject())); if (src.hasContext()) @@ -92,8 +93,8 @@ public class ClinicalImpression30_40 { if (src.hasProtocol()) { for (org.hl7.fhir.dstu3.model.UriType t : src.getProtocol()) tgt.addProtocol(t.getValue()); } - if (src.hasSummary()) - tgt.setSummary(src.getSummary()); + if (src.hasSummaryElement()) + tgt.setSummaryElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getSummaryElement())); if (src.hasFinding()) { for (org.hl7.fhir.dstu3.model.ClinicalImpression.ClinicalImpressionFindingComponent t : src.getFinding()) tgt.addFinding(convertClinicalImpressionFindingComponent(t)); } @@ -118,8 +119,8 @@ public class ClinicalImpression30_40 { tgt.setItemCodeableConcept(VersionConvertor_30_40.convertCodeableConcept(src.getItemCodeableConcept())); if (src.hasItemReference()) tgt.setItemReference(VersionConvertor_30_40.convertReference(src.getItemReference())); - if (src.hasBasis()) - tgt.setBasis(src.getBasis()); + if (src.hasBasisElement()) + tgt.setBasisElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getBasisElement())); return tgt; } @@ -132,8 +133,8 @@ public class ClinicalImpression30_40 { tgt.setItem(VersionConvertor_30_40.convertType(src.getItemCodeableConcept())); else if (src.hasItemReference()) tgt.setItem(VersionConvertor_30_40.convertType(src.getItemReference())); - if (src.hasBasis()) - tgt.setBasis(src.getBasis()); + if (src.hasBasisElement()) + tgt.setBasisElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getBasisElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/CodeSystem30_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/CodeSystem30_40.java index d9c6e1856..06fdb956c 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/CodeSystem30_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/CodeSystem30_40.java @@ -1,7 +1,9 @@ package org.hl7.fhir.convertors.conv30_40; import org.hl7.fhir.convertors.VersionConvertor_30_40; +import org.hl7.fhir.dstu3.model.StringType; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class CodeSystem30_40 { @@ -10,53 +12,53 @@ public class CodeSystem30_40 { return null; org.hl7.fhir.r4.model.CodeSystem tgt = new org.hl7.fhir.r4.model.CodeSystem(); VersionConvertor_30_40.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_30_40.convertType(src.getUrlElement())); if (src.hasIdentifier()) tgt.addIdentifier(VersionConvertor_30_40.convertIdentifier(src.getIdentifier())); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getNameElement())); + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getTitleElement())); if (src.hasStatus()) tgt.setStatus(VersionConvertor_30_40.convertPublicationStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_30_40.convertType(src.getExperimentalElement())); if (src.hasDateElement()) tgt.setDateElement(VersionConvertor_30_40.convertDateTime(src.getDateElement())); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) tgt.addContact(VersionConvertor_30_40.convertContactDetail(t)); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r4.model.MarkdownType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); if (src.hasUseContext()) { for (org.hl7.fhir.dstu3.model.UsageContext t : src.getUseContext()) tgt.addUseContext(VersionConvertor_30_40.convertUsageContext(t)); } if (src.hasJurisdiction()) { for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getJurisdiction()) tgt.addJurisdiction(VersionConvertor_30_40.convertCodeableConcept(t)); } - if (src.hasPurpose()) - tgt.setPurpose(src.getPurpose()); - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); - if (src.hasCaseSensitive()) - tgt.setCaseSensitive(src.getCaseSensitive()); - if (src.hasValueSet()) - tgt.setValueSet(src.getValueSet()); + if (src.hasPurposeElement()) + tgt.setPurposeElement((org.hl7.fhir.r4.model.MarkdownType) VersionConvertor_30_40.convertType(src.getPurposeElement())); + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.r4.model.MarkdownType) VersionConvertor_30_40.convertType(src.getCopyrightElement())); + if (src.hasCaseSensitiveElement()) + tgt.setCaseSensitiveElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_30_40.convertType(src.getCaseSensitiveElement())); + if (src.hasValueSetElement()) + tgt.setValueSetElement((org.hl7.fhir.r4.model.CanonicalType) VersionConvertor_30_40.convertType(src.getValueSetElement())); if (src.hasHierarchyMeaning()) tgt.setHierarchyMeaning(convertCodeSystemHierarchyMeaning(src.getHierarchyMeaning())); - if (src.hasCompositional()) - tgt.setCompositional(src.getCompositional()); - if (src.hasVersionNeeded()) - tgt.setVersionNeeded(src.getVersionNeeded()); + if (src.hasCompositionalElement()) + tgt.setCompositionalElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_30_40.convertType(src.getCompositionalElement())); + if (src.hasVersionNeededElement()) + tgt.setVersionNeededElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_30_40.convertType(src.getVersionNeededElement())); if (src.hasContent()) tgt.setContent(convertCodeSystemContentMode(src.getContent())); - if (src.hasCount()) - tgt.setCount(src.getCount()); + if (src.hasCountElement()) + tgt.setCountElement((org.hl7.fhir.r4.model.UnsignedIntType) VersionConvertor_30_40.convertType(src.getCountElement())); if (src.hasFilter()) { for (org.hl7.fhir.dstu3.model.CodeSystem.CodeSystemFilterComponent t : src.getFilter()) tgt.addFilter(convertCodeSystemFilterComponent(t)); } @@ -74,53 +76,53 @@ public class CodeSystem30_40 { return null; org.hl7.fhir.dstu3.model.CodeSystem tgt = new org.hl7.fhir.dstu3.model.CodeSystem(); VersionConvertor_30_40.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_40.convertType(src.getUrlElement())); if (src.hasIdentifier()) tgt.setIdentifier(VersionConvertor_30_40.convertIdentifier(src.getIdentifierFirstRep())); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getNameElement())); + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getTitleElement())); if (src.hasStatus()) tgt.setStatus(VersionConvertor_30_40.convertPublicationStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_40.convertType(src.getExperimentalElement())); if (src.hasDateElement()) tgt.setDateElement(VersionConvertor_30_40.convertDateTime(src.getDateElement())); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact()) tgt.addContact(VersionConvertor_30_40.convertContactDetail(t)); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); if (src.hasUseContext()) { for (org.hl7.fhir.r4.model.UsageContext t : src.getUseContext()) tgt.addUseContext(VersionConvertor_30_40.convertUsageContext(t)); } if (src.hasJurisdiction()) { for (org.hl7.fhir.r4.model.CodeableConcept t : src.getJurisdiction()) tgt.addJurisdiction(VersionConvertor_30_40.convertCodeableConcept(t)); } - if (src.hasPurpose()) - tgt.setPurpose(src.getPurpose()); - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); - if (src.hasCaseSensitive()) - tgt.setCaseSensitive(src.getCaseSensitive()); - if (src.hasValueSet()) - tgt.setValueSet(src.getValueSet()); + if (src.hasPurposeElement()) + tgt.setPurposeElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_40.convertType(src.getPurposeElement())); + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_40.convertType(src.getCopyrightElement())); + if (src.hasCaseSensitiveElement()) + tgt.setCaseSensitiveElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_40.convertType(src.getCaseSensitiveElement())); + if (src.hasValueSetElement()) + tgt.setValueSetElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_40.convertType(src.getValueSetElement())); if (src.hasHierarchyMeaning()) tgt.setHierarchyMeaning(convertCodeSystemHierarchyMeaning(src.getHierarchyMeaning())); - if (src.hasCompositional()) - tgt.setCompositional(src.getCompositional()); - if (src.hasVersionNeeded()) - tgt.setVersionNeeded(src.getVersionNeeded()); + if (src.hasCompositionalElement()) + tgt.setCompositionalElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_40.convertType(src.getCompositionalElement())); + if (src.hasVersionNeededElement()) + tgt.setVersionNeededElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_40.convertType(src.getVersionNeededElement())); if (src.hasContent()) tgt.setContent(convertCodeSystemContentMode(src.getContent())); - if (src.hasCount()) - tgt.setCount(src.getCount()); + if (src.hasCountElement()) + tgt.setCountElement((org.hl7.fhir.dstu3.model.UnsignedIntType) VersionConvertor_30_40.convertType(src.getCountElement())); if (src.hasFilter()) { for (org.hl7.fhir.r4.model.CodeSystem.CodeSystemFilterComponent t : src.getFilter()) tgt.addFilter(convertCodeSystemFilterComponent(t)); } @@ -172,15 +174,14 @@ public class CodeSystem30_40 { return null; org.hl7.fhir.dstu3.model.CodeSystem.CodeSystemFilterComponent tgt = new org.hl7.fhir.dstu3.model.CodeSystem.CodeSystemFilterComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasCode()) - tgt.setCode(src.getCode()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - if (src.hasOperator()) { - for (org.hl7.fhir.r4.model.Enumeration t : src.getOperator()) VersionConvertor_30_40.copyElement(t, tgt.addOperatorElement().setValue(VersionConvertor_30_40.convertFilterOperator(t.getValue()))); - } - if (src.hasValue()) - tgt.setValue(src.getValue()); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_30_40.convertType(src.getCodeElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getValueElement())); + if (src.hasValueElement()) + tgt.setValueElement((StringType) VersionConvertor_30_40.convertType(src.getValueElement())); return tgt; } @@ -189,15 +190,14 @@ public class CodeSystem30_40 { return null; org.hl7.fhir.r4.model.CodeSystem.CodeSystemFilterComponent tgt = new org.hl7.fhir.r4.model.CodeSystem.CodeSystemFilterComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasCode()) - tgt.setCode(src.getCode()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - if (src.hasOperator()) { - for (org.hl7.fhir.dstu3.model.Enumeration t : src.getOperator()) VersionConvertor_30_40.copyElement(t, tgt.addOperatorElement().setValue(VersionConvertor_30_40.convertFilterOperator(t.getValue()))); - } - if (src.hasValue()) - tgt.setValue(src.getValue()); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.r4.model.CodeType) VersionConvertor_30_40.convertType(src.getCodeElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getValueElement())); + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getValueElement())); return tgt; } @@ -240,12 +240,12 @@ public class CodeSystem30_40 { return null; org.hl7.fhir.dstu3.model.CodeSystem.ConceptDefinitionComponent tgt = new org.hl7.fhir.dstu3.model.CodeSystem.ConceptDefinitionComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasCode()) - tgt.setCode(src.getCode()); - if (src.hasDisplay()) - tgt.setDisplay(src.getDisplay()); - if (src.hasDefinition()) - tgt.setDefinition(src.getDefinition()); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_30_40.convertType(src.getCodeElement())); + if (src.hasDisplayElement()) + tgt.setDisplayElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getDisplayElement())); + if (src.hasDefinitionElement()) + tgt.setDefinitionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getDefinitionElement())); if (src.hasDesignation()) { for (org.hl7.fhir.r4.model.CodeSystem.ConceptDefinitionDesignationComponent t : src.getDesignation()) tgt.addDesignation(convertConceptDefinitionDesignationComponent(t)); } @@ -263,12 +263,12 @@ public class CodeSystem30_40 { return null; org.hl7.fhir.r4.model.CodeSystem.ConceptDefinitionComponent tgt = new org.hl7.fhir.r4.model.CodeSystem.ConceptDefinitionComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasCode()) - tgt.setCode(src.getCode()); - if (src.hasDisplay()) - tgt.setDisplay(src.getDisplay()); - if (src.hasDefinition()) - tgt.setDefinition(src.getDefinition()); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.r4.model.CodeType) VersionConvertor_30_40.convertType(src.getCodeElement())); + if (src.hasDisplayElement()) + tgt.setDisplayElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getDisplayElement())); + if (src.hasDefinitionElement()) + tgt.setDefinitionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getDefinitionElement())); if (src.hasDesignation()) { for (org.hl7.fhir.dstu3.model.CodeSystem.ConceptDefinitionDesignationComponent t : src.getDesignation()) tgt.addDesignation(convertConceptDefinitionDesignationComponent(t)); } @@ -286,12 +286,12 @@ public class CodeSystem30_40 { return null; org.hl7.fhir.dstu3.model.CodeSystem.ConceptDefinitionDesignationComponent tgt = new org.hl7.fhir.dstu3.model.CodeSystem.ConceptDefinitionDesignationComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasLanguage()) - tgt.setLanguage(src.getLanguage()); + if (src.hasLanguageElement()) + tgt.setLanguageElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_30_40.convertType(src.getLanguageElement())); if (src.hasUse()) tgt.setUse(VersionConvertor_30_40.convertCoding(src.getUse())); - if (src.hasValue()) - tgt.setValue(src.getValue()); + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getValueElement())); return tgt; } @@ -300,12 +300,12 @@ public class CodeSystem30_40 { return null; org.hl7.fhir.r4.model.CodeSystem.ConceptDefinitionDesignationComponent tgt = new org.hl7.fhir.r4.model.CodeSystem.ConceptDefinitionDesignationComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasLanguage()) - tgt.setLanguage(src.getLanguage()); + if (src.hasLanguageElement()) + tgt.setLanguageElement((org.hl7.fhir.r4.model.CodeType) VersionConvertor_30_40.convertType(src.getLanguageElement())); if (src.hasUse()) tgt.setUse(VersionConvertor_30_40.convertCoding(src.getUse())); - if (src.hasValue()) - tgt.setValue(src.getValue()); + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getValueElement())); return tgt; } @@ -314,8 +314,8 @@ public class CodeSystem30_40 { return null; org.hl7.fhir.dstu3.model.CodeSystem.ConceptPropertyComponent tgt = new org.hl7.fhir.dstu3.model.CodeSystem.ConceptPropertyComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasCode()) - tgt.setCode(src.getCode()); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_30_40.convertType(src.getCodeElement())); if (src.hasValue()) tgt.setValue(VersionConvertor_30_40.convertType(src.getValue())); return tgt; @@ -326,8 +326,8 @@ public class CodeSystem30_40 { return null; org.hl7.fhir.r4.model.CodeSystem.ConceptPropertyComponent tgt = new org.hl7.fhir.r4.model.CodeSystem.ConceptPropertyComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasCode()) - tgt.setCode(src.getCode()); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.r4.model.CodeType) VersionConvertor_30_40.convertType(src.getCodeElement())); if (src.hasValue()) tgt.setValue(VersionConvertor_30_40.convertType(src.getValue())); return tgt; @@ -338,12 +338,12 @@ public class CodeSystem30_40 { return null; org.hl7.fhir.r4.model.CodeSystem.PropertyComponent tgt = new org.hl7.fhir.r4.model.CodeSystem.PropertyComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasCode()) - tgt.setCode(src.getCode()); - if (src.hasUri()) - tgt.setUri(src.getUri()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.r4.model.CodeType) VersionConvertor_30_40.convertType(src.getCodeElement())); + if (src.hasUriElement()) + tgt.setUriElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_30_40.convertType(src.getUriElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); if (src.hasType()) tgt.setType(convertPropertyType(src.getType())); return tgt; @@ -354,12 +354,12 @@ public class CodeSystem30_40 { return null; org.hl7.fhir.dstu3.model.CodeSystem.PropertyComponent tgt = new org.hl7.fhir.dstu3.model.CodeSystem.PropertyComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasCode()) - tgt.setCode(src.getCode()); - if (src.hasUri()) - tgt.setUri(src.getUri()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_30_40.convertType(src.getCodeElement())); + if (src.hasUriElement()) + tgt.setUriElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_40.convertType(src.getUriElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); if (src.hasType()) tgt.setType(convertPropertyType(src.getType())); return tgt; diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Communication30_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Communication30_40.java index d61f7676a..36622ad68 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Communication30_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Communication30_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_40; import org.hl7.fhir.convertors.VersionConvertor_30_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Communication30_40 { diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/CompartmentDefinition30_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/CompartmentDefinition30_40.java index eb18ce686..1f037bde2 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/CompartmentDefinition30_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/CompartmentDefinition30_40.java @@ -1,7 +1,9 @@ package org.hl7.fhir.convertors.conv30_40; import org.hl7.fhir.convertors.VersionConvertor_30_40; +import org.hl7.fhir.dstu3.model.StringType; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class CompartmentDefinition30_40 { @@ -10,27 +12,27 @@ public class CompartmentDefinition30_40 { return null; org.hl7.fhir.dstu3.model.CompartmentDefinition tgt = new org.hl7.fhir.dstu3.model.CompartmentDefinition(); VersionConvertor_30_40.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_40.convertType(src.getUrlElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getNameElement())); + if (src.hasTitleElement()) + tgt.setTitleElement((StringType) VersionConvertor_30_40.convertType(src.getTitleElement())); if (src.hasStatus()) tgt.setStatus(VersionConvertor_30_40.convertPublicationStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_40.convertType(src.getExperimentalElement())); if (src.hasDateElement()) tgt.setDateElement(VersionConvertor_30_40.convertDateTime(src.getDateElement())); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact()) tgt.addContact(VersionConvertor_30_40.convertContactDetail(t)); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - if (src.hasPurpose()) - tgt.setPurpose(src.getPurpose()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); + if (src.hasPurposeElement()) + tgt.setPurposeElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_40.convertType(src.getPurposeElement())); if (src.hasUseContext()) { for (org.hl7.fhir.r4.model.UsageContext t : src.getUseContext()) tgt.addUseContext(VersionConvertor_30_40.convertUsageContext(t)); } @@ -39,8 +41,8 @@ public class CompartmentDefinition30_40 { } if (src.hasCode()) tgt.setCode(convertCompartmentType(src.getCode())); - if (src.hasSearch()) - tgt.setSearch(src.getSearch()); + if (src.hasSearchElement()) + tgt.setSearchElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_40.convertType(src.getSearchElement())); if (src.hasResource()) { for (org.hl7.fhir.r4.model.CompartmentDefinition.CompartmentDefinitionResourceComponent t : src.getResource()) tgt.addResource(convertCompartmentDefinitionResourceComponent(t)); } @@ -52,27 +54,27 @@ public class CompartmentDefinition30_40 { return null; org.hl7.fhir.r4.model.CompartmentDefinition tgt = new org.hl7.fhir.r4.model.CompartmentDefinition(); VersionConvertor_30_40.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_30_40.convertType(src.getUrlElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getNameElement())); + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getTitleElement())); if (src.hasStatus()) tgt.setStatus(VersionConvertor_30_40.convertPublicationStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_30_40.convertType(src.getExperimentalElement())); if (src.hasDateElement()) tgt.setDateElement(VersionConvertor_30_40.convertDateTime(src.getDateElement())); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) tgt.addContact(VersionConvertor_30_40.convertContactDetail(t)); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - if (src.hasPurpose()) - tgt.setPurpose(src.getPurpose()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r4.model.MarkdownType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); + if (src.hasPurposeElement()) + tgt.setPurposeElement((org.hl7.fhir.r4.model.MarkdownType) VersionConvertor_30_40.convertType(src.getPurposeElement())); if (src.hasUseContext()) { for (org.hl7.fhir.dstu3.model.UsageContext t : src.getUseContext()) tgt.addUseContext(VersionConvertor_30_40.convertUsageContext(t)); } @@ -81,8 +83,8 @@ public class CompartmentDefinition30_40 { } if (src.hasCode()) tgt.setCode(convertCompartmentType(src.getCode())); - if (src.hasSearch()) - tgt.setSearch(src.getSearch()); + if (src.hasSearchElement()) + tgt.setSearchElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_30_40.convertType(src.getSearchElement())); if (src.hasResource()) { for (org.hl7.fhir.dstu3.model.CompartmentDefinition.CompartmentDefinitionResourceComponent t : src.getResource()) tgt.addResource(convertCompartmentDefinitionResourceComponent(t)); } @@ -94,13 +96,13 @@ public class CompartmentDefinition30_40 { return null; org.hl7.fhir.r4.model.CompartmentDefinition.CompartmentDefinitionResourceComponent tgt = new org.hl7.fhir.r4.model.CompartmentDefinition.CompartmentDefinitionResourceComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasCode()) - tgt.setCode(src.getCode()); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.r4.model.CodeType) VersionConvertor_30_40.convertType(src.getCodeElement())); if (src.hasParam()) { for (org.hl7.fhir.dstu3.model.StringType t : src.getParam()) tgt.addParam(t.getValue()); } - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getDocumentationElement())); return tgt; } @@ -109,13 +111,13 @@ public class CompartmentDefinition30_40 { return null; org.hl7.fhir.dstu3.model.CompartmentDefinition.CompartmentDefinitionResourceComponent tgt = new org.hl7.fhir.dstu3.model.CompartmentDefinition.CompartmentDefinitionResourceComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasCode()) - tgt.setCode(src.getCode()); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_30_40.convertType(src.getCodeElement())); if (src.hasParam()) { for (org.hl7.fhir.r4.model.StringType t : src.getParam()) tgt.addParam(t.getValue()); } - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getDocumentationElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Composition30_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Composition30_40.java index 09395e561..4cd257c13 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Composition30_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Composition30_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_40; import org.hl7.fhir.convertors.VersionConvertor_30_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Composition30_40 { @@ -27,8 +28,8 @@ public class Composition30_40 { if (src.hasAuthor()) { for (org.hl7.fhir.r4.model.Reference t : src.getAuthor()) tgt.addAuthor(VersionConvertor_30_40.convertReference(t)); } - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getTitleElement())); if (src.hasConfidentiality()) tgt.setConfidentiality(convertDocumentConfidentiality(src.getConfidentiality())); if (src.hasAttester()) { @@ -70,8 +71,8 @@ public class Composition30_40 { if (src.hasAuthor()) { for (org.hl7.fhir.dstu3.model.Reference t : src.getAuthor()) tgt.addAuthor(VersionConvertor_30_40.convertReference(t)); } - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getTitleElement())); if (src.hasConfidentiality()) tgt.setConfidentiality(convertDocumentConfidentiality(src.getConfidentiality())); if (src.hasAttester()) { @@ -290,8 +291,8 @@ public class Composition30_40 { return null; org.hl7.fhir.dstu3.model.Composition.SectionComponent tgt = new org.hl7.fhir.dstu3.model.Composition.SectionComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getTitleElement())); if (src.hasCode()) tgt.setCode(VersionConvertor_30_40.convertCodeableConcept(src.getCode())); if (src.hasText()) @@ -316,8 +317,8 @@ public class Composition30_40 { return null; org.hl7.fhir.r4.model.Composition.SectionComponent tgt = new org.hl7.fhir.r4.model.Composition.SectionComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getTitleElement())); if (src.hasCode()) tgt.setCode(VersionConvertor_30_40.convertCodeableConcept(src.getCode())); if (src.hasText()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/ConceptMap30_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/ConceptMap30_40.java index 50acbac77..97607e4e8 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/ConceptMap30_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/ConceptMap30_40.java @@ -1,7 +1,11 @@ package org.hl7.fhir.convertors.conv30_40; import org.hl7.fhir.convertors.VersionConvertor_30_40; +import org.hl7.fhir.dstu3.model.StringType; import org.hl7.fhir.exceptions.FHIRException; +import org.hl7.fhir.r4.model.UriType; + +import java.util.Collections; public class ConceptMap30_40 { @@ -10,39 +14,39 @@ public class ConceptMap30_40 { return null; org.hl7.fhir.dstu3.model.ConceptMap tgt = new org.hl7.fhir.dstu3.model.ConceptMap(); VersionConvertor_30_40.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_40.convertType(src.getUrlElement())); if (src.hasIdentifier()) tgt.setIdentifier(VersionConvertor_30_40.convertIdentifier(src.getIdentifier())); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getNameElement())); + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getTitleElement())); if (src.hasStatus()) tgt.setStatus(VersionConvertor_30_40.convertPublicationStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_40.convertType(src.getExperimentalElement())); if (src.hasDateElement()) tgt.setDateElement(VersionConvertor_30_40.convertDateTime(src.getDateElement())); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact()) tgt.addContact(VersionConvertor_30_40.convertContactDetail(t)); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); if (src.hasUseContext()) { for (org.hl7.fhir.r4.model.UsageContext t : src.getUseContext()) tgt.addUseContext(VersionConvertor_30_40.convertUsageContext(t)); } if (src.hasJurisdiction()) { for (org.hl7.fhir.r4.model.CodeableConcept t : src.getJurisdiction()) tgt.addJurisdiction(VersionConvertor_30_40.convertCodeableConcept(t)); } - if (src.hasPurpose()) - tgt.setPurpose(src.getPurpose()); - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); + if (src.hasPurposeElement()) + tgt.setPurposeElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_40.convertType(src.getPurposeElement())); + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_40.convertType(src.getCopyrightElement())); if (src.hasSource()) tgt.setSource(VersionConvertor_30_40.convertType(src.getSource())); if (src.hasTarget()) @@ -58,33 +62,33 @@ public class ConceptMap30_40 { return null; org.hl7.fhir.r4.model.ConceptMap tgt = new org.hl7.fhir.r4.model.ConceptMap(); VersionConvertor_30_40.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_30_40.convertType(src.getUrlElement())); if (src.hasIdentifier()) tgt.setIdentifier(VersionConvertor_30_40.convertIdentifier(src.getIdentifier())); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getNameElement())); + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getTitleElement())); if (src.hasStatus()) tgt.setStatus(VersionConvertor_30_40.convertPublicationStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_30_40.convertType(src.getExperimentalElement())); if (src.hasDateElement()) tgt.setDateElement(VersionConvertor_30_40.convertDateTime(src.getDateElement())); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getPublisherElement())); for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) tgt.addContact(VersionConvertor_30_40.convertContactDetail(t)); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r4.model.MarkdownType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); for (org.hl7.fhir.dstu3.model.UsageContext t : src.getUseContext()) tgt.addUseContext(VersionConvertor_30_40.convertUsageContext(t)); for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getJurisdiction()) tgt.addJurisdiction(VersionConvertor_30_40.convertCodeableConcept(t)); - if (src.hasPurpose()) - tgt.setPurpose(src.getPurpose()); - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); + if (src.hasPurposeElement()) + tgt.setPurposeElement((org.hl7.fhir.r4.model.MarkdownType) VersionConvertor_30_40.convertType(src.getPurposeElement())); + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.r4.model.MarkdownType) VersionConvertor_30_40.convertType(src.getCopyrightElement())); if (src.hasSource()) { org.hl7.fhir.r4.model.Type t = VersionConvertor_30_40.convertType(src.getSource()); tgt.setSource(t instanceof org.hl7.fhir.r4.model.Reference ? new org.hl7.fhir.r4.model.CanonicalType(((org.hl7.fhir.r4.model.Reference) t).getReference()) : t); @@ -160,12 +164,12 @@ public class ConceptMap30_40 { return null; org.hl7.fhir.r4.model.ConceptMap.ConceptMapGroupComponent tgt = new org.hl7.fhir.r4.model.ConceptMap.ConceptMapGroupComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasSource()) - tgt.setSource(src.getSource()); - if (src.hasSourceVersion()) - tgt.setSourceVersion(src.getSourceVersion()); - if (src.hasTarget()) - tgt.setTarget(src.getTarget()); + if (src.hasSourceElement()) + tgt.setSourceElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_30_40.convertType(src.getSourceElement())); + if (src.hasSourceVersionElement()) + tgt.setSourceVersionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getSourceVersionElement())); + if (src.hasTargetElement()) + tgt.setTargetElement((UriType) VersionConvertor_30_40.convertType(src.getTargetElement())); if (src.hasTargetVersion()) tgt.setTargetVersion(src.getTargetVersion()); if (src.hasElement()) { @@ -181,14 +185,14 @@ public class ConceptMap30_40 { return null; org.hl7.fhir.dstu3.model.ConceptMap.ConceptMapGroupComponent tgt = new org.hl7.fhir.dstu3.model.ConceptMap.ConceptMapGroupComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasSource()) - tgt.setSource(src.getSource()); - if (src.hasSourceVersion()) - tgt.setSourceVersion(src.getSourceVersion()); - if (src.hasTarget()) - tgt.setTarget(src.getTarget()); - if (src.hasTargetVersion()) - tgt.setTargetVersion(src.getTargetVersion()); + if (src.hasSourceElement()) + tgt.setSourceElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_40.convertType(src.getSourceElement())); + if (src.hasSourceVersionElement()) + tgt.setSourceVersionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getSourceVersionElement())); + if (src.hasTargetElement()) + tgt.setTargetElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_40.convertType(src.getTargetElement())); + if (src.hasTargetVersionElement()) + tgt.setTargetVersionElement((StringType) VersionConvertor_30_40.convertType(src.getTargetVersionElement())); if (src.hasElement()) { for (org.hl7.fhir.r4.model.ConceptMap.SourceElementComponent t : src.getElement()) tgt.addElement(convertSourceElementComponent(t)); } @@ -204,12 +208,12 @@ public class ConceptMap30_40 { VersionConvertor_30_40.copyElement(src, tgt); if (src.hasMode()) tgt.setMode(convertConceptMapGroupUnmappedMode(src.getMode())); - if (src.hasCode()) - tgt.setCode(src.getCode()); - if (src.hasDisplay()) - tgt.setDisplay(src.getDisplay()); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.r4.model.CodeType) VersionConvertor_30_40.convertType(src.getCodeElement())); + if (src.hasDisplayElement()) + tgt.setDisplayElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getDisplayElement())); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r4.model.CanonicalType) VersionConvertor_30_40.convertType(src.getUrlElement())); return tgt; } @@ -220,12 +224,12 @@ public class ConceptMap30_40 { VersionConvertor_30_40.copyElement(src, tgt); if (src.hasMode()) tgt.setMode(convertConceptMapGroupUnmappedMode(src.getMode())); - if (src.hasCode()) - tgt.setCode(src.getCode()); - if (src.hasDisplay()) - tgt.setDisplay(src.getDisplay()); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_30_40.convertType(src.getCodeElement())); + if (src.hasDisplayElement()) + tgt.setDisplayElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getDisplayElement())); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_40.convertType(src.getUrlElement())); return tgt; } @@ -264,14 +268,14 @@ public class ConceptMap30_40 { return null; org.hl7.fhir.dstu3.model.ConceptMap.OtherElementComponent tgt = new org.hl7.fhir.dstu3.model.ConceptMap.OtherElementComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasProperty()) - tgt.setProperty(src.getProperty()); - if (src.hasSystem()) - tgt.setSystem(src.getSystem()); - if (src.hasValue()) - tgt.setCode(src.getValue()); - if (src.hasDisplay()) - tgt.setDisplay(src.getDisplay()); + if (src.hasPropertyElement()) + tgt.setPropertyElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_40.convertType(src.getPropertyElement())); + if (src.hasSystemElement()) + tgt.setSystemElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_40.convertType(src.getSystemElement())); + if (src.hasValueElement()) + tgt.setCodeElement((StringType) VersionConvertor_30_40.convertType(src.getValueElement())); + if (src.hasDisplayElement()) + tgt.setDisplayElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getDisplayElement())); return tgt; } @@ -280,14 +284,14 @@ public class ConceptMap30_40 { return null; org.hl7.fhir.r4.model.ConceptMap.OtherElementComponent tgt = new org.hl7.fhir.r4.model.ConceptMap.OtherElementComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasProperty()) - tgt.setProperty(src.getProperty()); - if (src.hasSystem()) - tgt.setSystem(src.getSystem()); - if (src.hasCode()) - tgt.setValue(src.getCode()); - if (src.hasDisplay()) - tgt.setDisplay(src.getDisplay()); + if (src.hasPropertyElement()) + tgt.setPropertyElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_30_40.convertType(src.getPropertyElement())); + if (src.hasSystemElement()) + tgt.setSystemElement((org.hl7.fhir.r4.model.CanonicalType) VersionConvertor_30_40.convertType(src.getSystemElement())); + if (src.hasCodeElement()) + tgt.setValueElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getCodeElement())); + if (src.hasDisplayElement()) + tgt.setDisplayElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getDisplayElement())); return tgt; } @@ -296,10 +300,10 @@ public class ConceptMap30_40 { return null; org.hl7.fhir.dstu3.model.ConceptMap.SourceElementComponent tgt = new org.hl7.fhir.dstu3.model.ConceptMap.SourceElementComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasCode()) - tgt.setCode(src.getCode()); - if (src.hasDisplay()) - tgt.setDisplay(src.getDisplay()); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_30_40.convertType(src.getCodeElement())); + if (src.hasDisplayElement()) + tgt.setDisplayElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getDisplayElement())); if (src.hasTarget()) { for (org.hl7.fhir.r4.model.ConceptMap.TargetElementComponent t : src.getTarget()) tgt.addTarget(convertTargetElementComponent(t)); } @@ -311,10 +315,10 @@ public class ConceptMap30_40 { return null; org.hl7.fhir.r4.model.ConceptMap.SourceElementComponent tgt = new org.hl7.fhir.r4.model.ConceptMap.SourceElementComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasCode()) - tgt.setCode(src.getCode()); - if (src.hasDisplay()) - tgt.setDisplay(src.getDisplay()); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.r4.model.CodeType) VersionConvertor_30_40.convertType(src.getCodeElement())); + if (src.hasDisplayElement()) + tgt.setDisplayElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getDisplayElement())); if (src.hasTarget()) { for (org.hl7.fhir.dstu3.model.ConceptMap.TargetElementComponent t : src.getTarget()) tgt.addTarget(convertTargetElementComponent(t)); } @@ -326,14 +330,14 @@ public class ConceptMap30_40 { return null; org.hl7.fhir.dstu3.model.ConceptMap.TargetElementComponent tgt = new org.hl7.fhir.dstu3.model.ConceptMap.TargetElementComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasCode()) - tgt.setCode(src.getCode()); - if (src.hasDisplay()) - tgt.setDisplay(src.getDisplay()); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_30_40.convertType(src.getCodeElement())); + if (src.hasDisplayElement()) + tgt.setDisplayElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getDisplayElement())); if (src.hasEquivalence()) tgt.setEquivalence(convertConceptMapEquivalence(src.getEquivalence())); - if (src.hasComment()) - tgt.setComment(src.getComment()); + if (src.hasCommentElement()) + tgt.setCommentElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getCommentElement())); if (src.hasDependsOn()) { for (org.hl7.fhir.r4.model.ConceptMap.OtherElementComponent t : src.getDependsOn()) tgt.addDependsOn(convertOtherElementComponent(t)); } @@ -348,14 +352,14 @@ public class ConceptMap30_40 { return null; org.hl7.fhir.r4.model.ConceptMap.TargetElementComponent tgt = new org.hl7.fhir.r4.model.ConceptMap.TargetElementComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasCode()) - tgt.setCode(src.getCode()); - if (src.hasDisplay()) - tgt.setDisplay(src.getDisplay()); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.r4.model.CodeType) VersionConvertor_30_40.convertType(src.getCodeElement())); + if (src.hasDisplayElement()) + tgt.setDisplayElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getDisplayElement())); if (src.hasEquivalence()) tgt.setEquivalence(convertConceptMapEquivalence(src.getEquivalence())); - if (src.hasComment()) - tgt.setComment(src.getComment()); + if (src.hasCommentElement()) + tgt.setCommentElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getCommentElement())); if (src.hasDependsOn()) { for (org.hl7.fhir.dstu3.model.ConceptMap.OtherElementComponent t : src.getDependsOn()) tgt.addDependsOn(convertOtherElementComponent(t)); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Condition30_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Condition30_40.java index 00eaab598..f933e8dfa 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Condition30_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Condition30_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_40; import org.hl7.fhir.convertors.VersionConvertor_30_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Condition30_40 { diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Consent30_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Consent30_40.java index f64b4e9b5..e29489324 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Consent30_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Consent30_40.java @@ -4,6 +4,7 @@ import org.hl7.fhir.convertors.VersionConvertor_30_40; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r4.model.CodeableConcept; import java.util.List; +import java.util.Collections; public class Consent30_40 { @@ -21,7 +22,7 @@ public class Consent30_40 { } if (src.hasPatient()) tgt.setPatient(VersionConvertor_30_40.convertReference(src.getPatient())); - if (src.hasDateTime()) + if (src.hasDateTimeElement()) tgt.setDateTimeElement(VersionConvertor_30_40.convertDateTime(src.getDateTimeElement())); if (src.hasConsentingParty()) { for (org.hl7.fhir.dstu3.model.Reference t : src.getConsentingParty()) tgt.addPerformer(VersionConvertor_30_40.convertReference(t)); @@ -87,7 +88,7 @@ public class Consent30_40 { for (org.hl7.fhir.r4.model.CodeableConcept t : src.getCategory()) tgt.addCategory(VersionConvertor_30_40.convertCodeableConcept(t)); if (src.hasPatient()) tgt.setPatient(VersionConvertor_30_40.convertReference(src.getPatient())); - if (src.hasDateTime()) + if (src.hasDateTimeElement()) tgt.setDateTimeElement(VersionConvertor_30_40.convertDateTime(src.getDateTimeElement())); for (org.hl7.fhir.r4.model.Reference t : src.getPerformer()) tgt.addConsentingParty(VersionConvertor_30_40.convertReference(t)); for (org.hl7.fhir.r4.model.Reference t : src.getOrganization()) tgt.addOrganization(VersionConvertor_30_40.convertReference(t)); @@ -231,10 +232,10 @@ public class Consent30_40 { return null; org.hl7.fhir.dstu3.model.Consent.ConsentPolicyComponent tgt = new org.hl7.fhir.dstu3.model.Consent.ConsentPolicyComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasAuthority()) - tgt.setAuthority(src.getAuthority()); - if (src.hasUri()) - tgt.setUri(src.getUri()); + if (src.hasAuthorityElement()) + tgt.setAuthorityElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_40.convertType(src.getAuthorityElement())); + if (src.hasUriElement()) + tgt.setUriElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_40.convertType(src.getUriElement())); return tgt; } @@ -243,10 +244,10 @@ public class Consent30_40 { return null; org.hl7.fhir.r4.model.Consent.ConsentPolicyComponent tgt = new org.hl7.fhir.r4.model.Consent.ConsentPolicyComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasAuthority()) - tgt.setAuthority(src.getAuthority()); - if (src.hasUri()) - tgt.setUri(src.getUri()); + if (src.hasAuthorityElement()) + tgt.setAuthorityElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_30_40.convertType(src.getAuthorityElement())); + if (src.hasUriElement()) + tgt.setUriElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_30_40.convertType(src.getUriElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/DataElement30_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/DataElement30_40.java index 68ebcb526..baff14e87 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/DataElement30_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/DataElement30_40.java @@ -2,6 +2,12 @@ package org.hl7.fhir.convertors.conv30_40; import org.hl7.fhir.convertors.VersionConvertor_30_40; import org.hl7.fhir.exceptions.FHIRException; +import org.hl7.fhir.r4.model.BooleanType; +import org.hl7.fhir.r4.model.MarkdownType; +import org.hl7.fhir.r4.model.StringType; +import org.hl7.fhir.r4.model.UriType; + +import java.util.Collections; public class DataElement30_40 { @@ -15,20 +21,20 @@ public class DataElement30_40 { if (src.hasIdentifier()) { for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_30_40.convertIdentifier(t)); } - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); + if (src.hasVersionElement()) + tgt.setVersionElement((StringType) VersionConvertor_30_40.convertType(src.getVersionElement())); if (src.hasStatus()) tgt.setStatus(VersionConvertor_30_40.convertPublicationStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((BooleanType) VersionConvertor_30_40.convertType(src.getExperimentalElement())); if (src.hasDateElement()) tgt.setDateElement(VersionConvertor_30_40.convertDateTime(src.getDateElement())); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); + if (src.hasPublisherElement()) + tgt.setPublisherElement((StringType) VersionConvertor_30_40.convertType(src.getPublisherElement())); + if (src.hasNameElement()) + tgt.setNameElement((StringType) VersionConvertor_30_40.convertType(src.getNameElement())); + if (src.hasTitleElement()) + tgt.setTitleElement((StringType) VersionConvertor_30_40.convertType(src.getTitleElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) tgt.addContact(VersionConvertor_30_40.convertContactDetail(t)); } @@ -38,8 +44,8 @@ public class DataElement30_40 { if (src.hasJurisdiction()) { for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getJurisdiction()) tgt.addJurisdiction(VersionConvertor_30_40.convertCodeableConcept(t)); } - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((MarkdownType) VersionConvertor_30_40.convertType(src.getCopyrightElement())); if (src.hasMapping()) { for (org.hl7.fhir.dstu3.model.DataElement.DataElementMappingComponent t : src.getMapping()) tgt.addMapping(convertDataElementMappingComponent(t)); } @@ -61,12 +67,12 @@ public class DataElement30_40 { VersionConvertor_30_40.copyElement(src, tgt); if (src.hasIdentity()) tgt.setIdentity(src.getIdentity()); - if (src.hasUri()) - tgt.setUri(src.getUri()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasComment()) - tgt.setComment(src.getComment()); + if (src.hasUriElement()) + tgt.setUriElement((UriType) VersionConvertor_30_40.convertType(src.getUriElement())); + if (src.hasNameElement()) + tgt.setNameElement((StringType) VersionConvertor_30_40.convertType(src.getNameElement())); + if (src.hasCommentElement()) + tgt.setCommentElement((StringType) VersionConvertor_30_40.convertType(src.getCommentElement())); return tgt; } } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/DetectedIssue30_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/DetectedIssue30_40.java index d6b6a212e..9e22f4d0f 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/DetectedIssue30_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/DetectedIssue30_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_40; import org.hl7.fhir.convertors.VersionConvertor_30_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class DetectedIssue30_40 { @@ -27,10 +28,10 @@ public class DetectedIssue30_40 { if (src.hasImplicated()) { for (org.hl7.fhir.r4.model.Reference t : src.getImplicated()) tgt.addImplicated(VersionConvertor_30_40.convertReference(t)); } - if (src.hasDetail()) - tgt.setDetail(src.getDetail()); - if (src.hasReference()) - tgt.setReference(src.getReference()); + if (src.hasDetailElement()) + tgt.setDetailElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getDetailElement())); + if (src.hasReferenceElement()) + tgt.setReferenceElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_40.convertType(src.getReferenceElement())); if (src.hasMitigation()) { for (org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueMitigationComponent t : src.getMitigation()) tgt.addMitigation(convertDetectedIssueMitigationComponent(t)); } @@ -59,10 +60,10 @@ public class DetectedIssue30_40 { if (src.hasImplicated()) { for (org.hl7.fhir.dstu3.model.Reference t : src.getImplicated()) tgt.addImplicated(VersionConvertor_30_40.convertReference(t)); } - if (src.hasDetail()) - tgt.setDetail(src.getDetail()); - if (src.hasReference()) - tgt.setReference(src.getReference()); + if (src.hasDetailElement()) + tgt.setDetailElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getDetailElement())); + if (src.hasReferenceElement()) + tgt.setReferenceElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_30_40.convertType(src.getReferenceElement())); if (src.hasMitigation()) { for (org.hl7.fhir.dstu3.model.DetectedIssue.DetectedIssueMitigationComponent t : src.getMitigation()) tgt.addMitigation(convertDetectedIssueMitigationComponent(t)); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/DeviceUseStatement30_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/DeviceUseStatement30_40.java index 71866d1df..07862a17a 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/DeviceUseStatement30_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/DeviceUseStatement30_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_40; import org.hl7.fhir.convertors.VersionConvertor_30_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class DeviceUseStatement30_40 { diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/DiagnosticReport30_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/DiagnosticReport30_40.java index 29e7ef055..8019c2940 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/DiagnosticReport30_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/DiagnosticReport30_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_40; import org.hl7.fhir.convertors.VersionConvertor_30_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class DiagnosticReport30_40 { @@ -42,8 +43,8 @@ public class DiagnosticReport30_40 { if (src.hasImage()) { for (org.hl7.fhir.dstu3.model.DiagnosticReport.DiagnosticReportImageComponent t : src.getImage()) tgt.addMedia(convertDiagnosticReportImageComponent(t)); } - if (src.hasConclusion()) - tgt.setConclusion(src.getConclusion()); + if (src.hasConclusionElement()) + tgt.setConclusionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getConclusionElement())); if (src.hasCodedDiagnosis()) { for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getCodedDiagnosis()) tgt.addConclusionCode(VersionConvertor_30_40.convertCodeableConcept(t)); } @@ -90,8 +91,8 @@ public class DiagnosticReport30_40 { if (src.hasMedia()) { for (org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportMediaComponent t : src.getMedia()) tgt.addImage(convertDiagnosticReportImageComponent(t)); } - if (src.hasConclusion()) - tgt.setConclusion(src.getConclusion()); + if (src.hasConclusionElement()) + tgt.setConclusionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getConclusionElement())); if (src.hasConclusionCode()) { for (org.hl7.fhir.r4.model.CodeableConcept t : src.getConclusionCode()) tgt.addCodedDiagnosis(VersionConvertor_30_40.convertCodeableConcept(t)); } @@ -106,8 +107,8 @@ public class DiagnosticReport30_40 { return null; org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportMediaComponent tgt = new org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportMediaComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasComment()) - tgt.setComment(src.getComment()); + if (src.hasCommentElement()) + tgt.setCommentElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getCommentElement())); if (src.hasLink()) tgt.setLink(VersionConvertor_30_40.convertReference(src.getLink())); return tgt; @@ -118,8 +119,8 @@ public class DiagnosticReport30_40 { return null; org.hl7.fhir.dstu3.model.DiagnosticReport.DiagnosticReportImageComponent tgt = new org.hl7.fhir.dstu3.model.DiagnosticReport.DiagnosticReportImageComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasComment()) - tgt.setComment(src.getComment()); + if (src.hasCommentElement()) + tgt.setCommentElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getCommentElement())); if (src.hasLink()) tgt.setLink(VersionConvertor_30_40.convertReference(src.getLink())); return tgt; diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/DocumentReference30_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/DocumentReference30_40.java index 66c5f66d6..35c2d010a 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/DocumentReference30_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/DocumentReference30_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_40; import org.hl7.fhir.convertors.VersionConvertor_30_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class DocumentReference30_40 { @@ -40,8 +41,8 @@ public class DocumentReference30_40 { if (src.hasRelatesTo()) { for (org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceRelatesToComponent t : src.getRelatesTo()) tgt.addRelatesTo(convertDocumentReferenceRelatesToComponent(t)); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); if (src.hasSecurityLabel()) { for (org.hl7.fhir.r4.model.CodeableConcept t : src.getSecurityLabel()) tgt.addSecurityLabel(VersionConvertor_30_40.convertCodeableConcept(t)); } @@ -82,8 +83,8 @@ public class DocumentReference30_40 { if (src.hasRelatesTo()) { for (org.hl7.fhir.dstu3.model.DocumentReference.DocumentReferenceRelatesToComponent t : src.getRelatesTo()) tgt.addRelatesTo(convertDocumentReferenceRelatesToComponent(t)); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); if (src.hasSecurityLabel()) { for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getSecurityLabel()) tgt.addSecurityLabel(VersionConvertor_30_40.convertCodeableConcept(t)); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Encounter30_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Encounter30_40.java index 1b9bc3679..cd7c7ff06 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Encounter30_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Encounter30_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_40; import org.hl7.fhir.convertors.VersionConvertor_30_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Encounter30_40 { diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Endpoint30_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Endpoint30_40.java index 5a3a1f2a6..d5d65ad8c 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Endpoint30_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Endpoint30_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_40; import org.hl7.fhir.convertors.VersionConvertor_30_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Endpoint30_40 { @@ -17,8 +18,8 @@ public class Endpoint30_40 { tgt.setStatus(convertEndpointStatus(src.getStatus())); if (src.hasConnectionType()) tgt.setConnectionType(VersionConvertor_30_40.convertCoding(src.getConnectionType())); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getNameElement())); if (src.hasManagingOrganization()) tgt.setManagingOrganization(VersionConvertor_30_40.convertReference(src.getManagingOrganization())); if (src.hasContact()) { @@ -32,8 +33,8 @@ public class Endpoint30_40 { if (src.hasPayloadMimeType()) { for (org.hl7.fhir.dstu3.model.CodeType t : src.getPayloadMimeType()) tgt.addPayloadMimeType(t.getValue()); } - if (src.hasAddress()) - tgt.setAddress(src.getAddress()); + if (src.hasAddressElement()) + tgt.setAddressElement((org.hl7.fhir.r4.model.UrlType) VersionConvertor_30_40.convertType(src.getAddressElement())); if (src.hasHeader()) { for (org.hl7.fhir.dstu3.model.StringType t : src.getHeader()) tgt.addHeader(t.getValue()); } @@ -52,8 +53,8 @@ public class Endpoint30_40 { tgt.setStatus(convertEndpointStatus(src.getStatus())); if (src.hasConnectionType()) tgt.setConnectionType(VersionConvertor_30_40.convertCoding(src.getConnectionType())); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getNameElement())); if (src.hasManagingOrganization()) tgt.setManagingOrganization(VersionConvertor_30_40.convertReference(src.getManagingOrganization())); if (src.hasContact()) { @@ -67,8 +68,8 @@ public class Endpoint30_40 { if (src.hasPayloadMimeType()) { for (org.hl7.fhir.r4.model.CodeType t : src.getPayloadMimeType()) tgt.addPayloadMimeType(t.getValue()); } - if (src.hasAddress()) - tgt.setAddress(src.getAddress()); + if (src.hasAddressElement()) + tgt.setAddressElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_40.convertType(src.getAddressElement())); if (src.hasHeader()) { for (org.hl7.fhir.r4.model.StringType t : src.getHeader()) tgt.addHeader(t.getValue()); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/EpisodeOfCare30_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/EpisodeOfCare30_40.java index 30252d61f..62072236e 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/EpisodeOfCare30_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/EpisodeOfCare30_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_40; import org.hl7.fhir.convertors.VersionConvertor_30_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class EpisodeOfCare30_40 { diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/ExpansionProfile30_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/ExpansionProfile30_40.java index a626f41d2..8a966398c 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/ExpansionProfile30_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/ExpansionProfile30_40.java @@ -5,6 +5,7 @@ import org.hl7.fhir.dstu3.model.ExpansionProfile.DesignationIncludeDesignationCo import org.hl7.fhir.dstu3.model.ExpansionProfile.SystemVersionProcessingMode; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r4.model.Type; +import java.util.Collections; public class ExpansionProfile30_40 { diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/FamilyMemberHistory30_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/FamilyMemberHistory30_40.java index 120538df7..e4562a421 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/FamilyMemberHistory30_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/FamilyMemberHistory30_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_40; import org.hl7.fhir.convertors.VersionConvertor_30_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class FamilyMemberHistory30_40 { @@ -58,16 +59,16 @@ public class FamilyMemberHistory30_40 { tgt.setPatient(VersionConvertor_30_40.convertReference(src.getPatient())); if (src.hasDateElement()) tgt.setDateElement(VersionConvertor_30_40.convertDateTime(src.getDateElement())); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getNameElement())); if (src.hasRelationship()) tgt.setRelationship(VersionConvertor_30_40.convertCodeableConcept(src.getRelationship())); if (src.hasBorn()) tgt.setBorn(VersionConvertor_30_40.convertType(src.getBorn())); if (src.hasAge()) tgt.setAge(VersionConvertor_30_40.convertType(src.getAge())); - if (src.hasEstimatedAge()) - tgt.setEstimatedAge(src.getEstimatedAge()); + if (src.hasEstimatedAgeElement()) + tgt.setEstimatedAgeElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_40.convertType(src.getEstimatedAgeElement())); if (src.hasDeceased()) tgt.setDeceased(VersionConvertor_30_40.convertType(src.getDeceased())); if (src.hasReasonCode()) { @@ -104,16 +105,16 @@ public class FamilyMemberHistory30_40 { tgt.setPatient(VersionConvertor_30_40.convertReference(src.getPatient())); if (src.hasDateElement()) tgt.setDateElement(VersionConvertor_30_40.convertDateTime(src.getDateElement())); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getNameElement())); if (src.hasRelationship()) tgt.setRelationship(VersionConvertor_30_40.convertCodeableConcept(src.getRelationship())); if (src.hasBorn()) tgt.setBorn(VersionConvertor_30_40.convertType(src.getBorn())); if (src.hasAge()) tgt.setAge(VersionConvertor_30_40.convertType(src.getAge())); - if (src.hasEstimatedAge()) - tgt.setEstimatedAge(src.getEstimatedAge()); + if (src.hasEstimatedAgeElement()) + tgt.setEstimatedAgeElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_30_40.convertType(src.getEstimatedAgeElement())); if (src.hasDeceased()) tgt.setDeceased(VersionConvertor_30_40.convertType(src.getDeceased())); if (src.hasReasonCode()) { diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Flag30_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Flag30_40.java index 84baf077f..482802706 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Flag30_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Flag30_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_40; import org.hl7.fhir.convertors.VersionConvertor_30_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Flag30_40 { diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Goal30_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Goal30_40.java index ec4ebc290..68375e6a9 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Goal30_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Goal30_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_40; import org.hl7.fhir.convertors.VersionConvertor_30_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Goal30_40 { @@ -29,9 +30,9 @@ public class Goal30_40 { if (src.hasTarget()) tgt.setTarget(convertGoalTargetComponent(src.getTargetFirstRep())); if (src.hasStatusDate()) - tgt.setStatusDateElement(VersionConvertor_30_40.convertDate(src.getStatusDateElement())); - if (src.hasStatusReason()) - tgt.setStatusReason(src.getStatusReason()); + tgt.setStatusDateElement(VersionConvertor_30_40.convertDate(src.getStatusDateElement())); + if (src.hasStatusReasonElement()) + tgt.setStatusReasonElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getStatusReasonElement())); if (src.hasExpressedBy()) tgt.setExpressedBy(VersionConvertor_30_40.convertReference(src.getExpressedBy())); if (src.hasAddresses()) { @@ -73,9 +74,9 @@ public class Goal30_40 { if (src.hasTarget()) tgt.addTarget(convertGoalTargetComponent(src.getTarget())); if (src.hasStatusDate()) - tgt.setStatusDateElement(VersionConvertor_30_40.convertDate(src.getStatusDateElement())); - if (src.hasStatusReason()) - tgt.setStatusReason(src.getStatusReason()); + tgt.setStatusDateElement(VersionConvertor_30_40.convertDate(src.getStatusDateElement())); + if (src.hasStatusReasonElement()) + tgt.setStatusReasonElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getStatusReasonElement())); if (src.hasExpressedBy()) tgt.setExpressedBy(VersionConvertor_30_40.convertReference(src.getExpressedBy())); if (src.hasAddresses()) { diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/GraphDefinition30_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/GraphDefinition30_40.java index 00a8ee11e..d582f1fc0 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/GraphDefinition30_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/GraphDefinition30_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_40; import org.hl7.fhir.convertors.VersionConvertor_30_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class GraphDefinition30_40 { @@ -82,37 +83,37 @@ public class GraphDefinition30_40 { return null; org.hl7.fhir.dstu3.model.GraphDefinition tgt = new org.hl7.fhir.dstu3.model.GraphDefinition(); VersionConvertor_30_40.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_40.convertType(src.getUrlElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getNameElement())); if (src.hasStatus()) tgt.setStatus(VersionConvertor_30_40.convertPublicationStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_40.convertType(src.getExperimentalElement())); if (src.hasDateElement()) tgt.setDateElement(VersionConvertor_30_40.convertDateTime(src.getDateElement())); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact()) tgt.addContact(VersionConvertor_30_40.convertContactDetail(t)); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); if (src.hasUseContext()) { for (org.hl7.fhir.r4.model.UsageContext t : src.getUseContext()) tgt.addUseContext(VersionConvertor_30_40.convertUsageContext(t)); } if (src.hasJurisdiction()) { for (org.hl7.fhir.r4.model.CodeableConcept t : src.getJurisdiction()) tgt.addJurisdiction(VersionConvertor_30_40.convertCodeableConcept(t)); } - if (src.hasPurpose()) - tgt.setPurpose(src.getPurpose()); + if (src.hasPurposeElement()) + tgt.setPurposeElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_40.convertType(src.getPurposeElement())); if (src.hasStart()) tgt.setStartElement(VersionConvertor_30_40.convertCode(src.getStartElement())); - if (src.hasProfile()) - tgt.setProfile(src.getProfile()); + if (src.hasProfileElement()) + tgt.setProfileElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_40.convertType(src.getProfileElement())); if (src.hasLink()) { for (org.hl7.fhir.r4.model.GraphDefinition.GraphDefinitionLinkComponent t : src.getLink()) tgt.addLink(convertGraphDefinitionLinkComponent(t)); } @@ -124,37 +125,37 @@ public class GraphDefinition30_40 { return null; org.hl7.fhir.r4.model.GraphDefinition tgt = new org.hl7.fhir.r4.model.GraphDefinition(); VersionConvertor_30_40.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_30_40.convertType(src.getUrlElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getNameElement())); if (src.hasStatus()) tgt.setStatus(VersionConvertor_30_40.convertPublicationStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_30_40.convertType(src.getExperimentalElement())); if (src.hasDateElement()) tgt.setDateElement(VersionConvertor_30_40.convertDateTime(src.getDateElement())); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) tgt.addContact(VersionConvertor_30_40.convertContactDetail(t)); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r4.model.MarkdownType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); if (src.hasUseContext()) { for (org.hl7.fhir.dstu3.model.UsageContext t : src.getUseContext()) tgt.addUseContext(VersionConvertor_30_40.convertUsageContext(t)); } if (src.hasJurisdiction()) { for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getJurisdiction()) tgt.addJurisdiction(VersionConvertor_30_40.convertCodeableConcept(t)); } - if (src.hasPurpose()) - tgt.setPurpose(src.getPurpose()); + if (src.hasPurposeElement()) + tgt.setPurposeElement((org.hl7.fhir.r4.model.MarkdownType) VersionConvertor_30_40.convertType(src.getPurposeElement())); if (src.hasStart()) tgt.setStartElement(VersionConvertor_30_40.convertCode(src.getStartElement())); - if (src.hasProfile()) - tgt.setProfile(src.getProfile()); + if (src.hasProfileElement()) + tgt.setProfileElement((org.hl7.fhir.r4.model.CanonicalType) VersionConvertor_30_40.convertType(src.getProfileElement())); if (src.hasLink()) { for (org.hl7.fhir.dstu3.model.GraphDefinition.GraphDefinitionLinkComponent t : src.getLink()) tgt.addLink(convertGraphDefinitionLinkComponent(t)); } @@ -166,16 +167,16 @@ public class GraphDefinition30_40 { return null; org.hl7.fhir.r4.model.GraphDefinition.GraphDefinitionLinkComponent tgt = new org.hl7.fhir.r4.model.GraphDefinition.GraphDefinitionLinkComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasPath()) - tgt.setPath(src.getPath()); - if (src.hasSliceName()) - tgt.setSliceName(src.getSliceName()); - if (src.hasMin()) - tgt.setMin(src.getMin()); - if (src.hasMax()) - tgt.setMax(src.getMax()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasPathElement()) + tgt.setPathElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getPathElement())); + if (src.hasSliceNameElement()) + tgt.setSliceNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getSliceNameElement())); + if (src.hasMinElement()) + tgt.setMinElement((org.hl7.fhir.r4.model.IntegerType) VersionConvertor_30_40.convertType(src.getMinElement())); + if (src.hasMaxElement()) + tgt.setMaxElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getMaxElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); if (src.hasTarget()) { for (org.hl7.fhir.dstu3.model.GraphDefinition.GraphDefinitionLinkTargetComponent t : src.getTarget()) tgt.addTarget(convertGraphDefinitionLinkTargetComponent(t)); } @@ -187,16 +188,16 @@ public class GraphDefinition30_40 { return null; org.hl7.fhir.dstu3.model.GraphDefinition.GraphDefinitionLinkComponent tgt = new org.hl7.fhir.dstu3.model.GraphDefinition.GraphDefinitionLinkComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasPath()) - tgt.setPath(src.getPath()); - if (src.hasSliceName()) - tgt.setSliceName(src.getSliceName()); - if (src.hasMin()) - tgt.setMin(src.getMin()); - if (src.hasMax()) - tgt.setMax(src.getMax()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasPathElement()) + tgt.setPathElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getPathElement())); + if (src.hasSliceNameElement()) + tgt.setSliceNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getSliceNameElement())); + if (src.hasMinElement()) + tgt.setMinElement((org.hl7.fhir.dstu3.model.IntegerType) VersionConvertor_30_40.convertType(src.getMinElement())); + if (src.hasMaxElement()) + tgt.setMaxElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getMaxElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); if (src.hasTarget()) { for (org.hl7.fhir.r4.model.GraphDefinition.GraphDefinitionLinkTargetComponent t : src.getTarget()) tgt.addTarget(convertGraphDefinitionLinkTargetComponent(t)); } @@ -212,10 +213,10 @@ public class GraphDefinition30_40 { tgt.setCode(convertCompartmentCode(src.getCode())); if (src.hasRule()) tgt.setRule(convertGraphCompartmentRule(src.getRule())); - if (src.hasExpression()) - tgt.setExpression(src.getExpression()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasExpressionElement()) + tgt.setExpressionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getExpressionElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); return tgt; } @@ -228,10 +229,10 @@ public class GraphDefinition30_40 { tgt.setCode(convertCompartmentCode(src.getCode())); if (src.hasRule()) tgt.setRule(convertGraphCompartmentRule(src.getRule())); - if (src.hasExpression()) - tgt.setExpression(src.getExpression()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasExpressionElement()) + tgt.setExpressionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getExpressionElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); return tgt; } @@ -240,10 +241,10 @@ public class GraphDefinition30_40 { return null; org.hl7.fhir.dstu3.model.GraphDefinition.GraphDefinitionLinkTargetComponent tgt = new org.hl7.fhir.dstu3.model.GraphDefinition.GraphDefinitionLinkTargetComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasType()) - tgt.setType(src.getType()); - if (src.hasProfile()) - tgt.setProfile(src.getProfile()); + if (src.hasTypeElement()) + tgt.setTypeElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_30_40.convertType(src.getTypeElement())); + if (src.hasProfileElement()) + tgt.setProfileElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_40.convertType(src.getProfileElement())); if (src.hasCompartment()) { for (org.hl7.fhir.r4.model.GraphDefinition.GraphDefinitionLinkTargetCompartmentComponent t : src.getCompartment()) tgt.addCompartment(convertGraphDefinitionLinkTargetCompartmentComponent(t)); } @@ -258,10 +259,10 @@ public class GraphDefinition30_40 { return null; org.hl7.fhir.r4.model.GraphDefinition.GraphDefinitionLinkTargetComponent tgt = new org.hl7.fhir.r4.model.GraphDefinition.GraphDefinitionLinkTargetComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasType()) - tgt.setType(src.getType()); - if (src.hasProfile()) - tgt.setProfile(src.getProfile()); + if (src.hasTypeElement()) + tgt.setTypeElement((org.hl7.fhir.r4.model.CodeType) VersionConvertor_30_40.convertType(src.getTypeElement())); + if (src.hasProfileElement()) + tgt.setProfileElement((org.hl7.fhir.r4.model.CanonicalType) VersionConvertor_30_40.convertType(src.getProfileElement())); if (src.hasCompartment()) { for (org.hl7.fhir.dstu3.model.GraphDefinition.GraphDefinitionLinkTargetCompartmentComponent t : src.getCompartment()) tgt.addCompartment(convertGraphDefinitionLinkTargetCompartmentComponent(t)); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Group30_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Group30_40.java index 4c18fc5fe..ce7f188c7 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Group30_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Group30_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_40; import org.hl7.fhir.convertors.VersionConvertor_30_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Group30_40 { @@ -13,18 +14,18 @@ public class Group30_40 { if (src.hasIdentifier()) { for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_30_40.convertIdentifier(t)); } - if (src.hasActive()) - tgt.setActive(src.getActive()); + if (src.hasActiveElement()) + tgt.setActiveElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_40.convertType(src.getActiveElement())); if (src.hasType()) tgt.setType(convertGroupType(src.getType())); - if (src.hasActual()) - tgt.setActual(src.getActual()); + if (src.hasActualElement()) + tgt.setActualElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_40.convertType(src.getActualElement())); if (src.hasCode()) tgt.setCode(VersionConvertor_30_40.convertCodeableConcept(src.getCode())); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasQuantity()) - tgt.setQuantity(src.getQuantity()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getNameElement())); + if (src.hasQuantityElement()) + tgt.setQuantityElement((org.hl7.fhir.dstu3.model.UnsignedIntType) VersionConvertor_30_40.convertType(src.getQuantityElement())); if (src.hasCharacteristic()) { for (org.hl7.fhir.r4.model.Group.GroupCharacteristicComponent t : src.getCharacteristic()) tgt.addCharacteristic(convertGroupCharacteristicComponent(t)); } @@ -42,18 +43,18 @@ public class Group30_40 { if (src.hasIdentifier()) { for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_30_40.convertIdentifier(t)); } - if (src.hasActive()) - tgt.setActive(src.getActive()); + if (src.hasActiveElement()) + tgt.setActiveElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_30_40.convertType(src.getActiveElement())); if (src.hasType()) tgt.setType(convertGroupType(src.getType())); - if (src.hasActual()) - tgt.setActual(src.getActual()); + if (src.hasActualElement()) + tgt.setActualElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_30_40.convertType(src.getActualElement())); if (src.hasCode()) tgt.setCode(VersionConvertor_30_40.convertCodeableConcept(src.getCode())); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasQuantity()) - tgt.setQuantity(src.getQuantity()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getNameElement())); + if (src.hasQuantityElement()) + tgt.setQuantityElement((org.hl7.fhir.r4.model.UnsignedIntType) VersionConvertor_30_40.convertType(src.getQuantityElement())); if (src.hasCharacteristic()) { for (org.hl7.fhir.dstu3.model.Group.GroupCharacteristicComponent t : src.getCharacteristic()) tgt.addCharacteristic(convertGroupCharacteristicComponent(t)); } @@ -72,8 +73,8 @@ public class Group30_40 { tgt.setCode(VersionConvertor_30_40.convertCodeableConcept(src.getCode())); if (src.hasValue()) tgt.setValue(VersionConvertor_30_40.convertType(src.getValue())); - if (src.hasExclude()) - tgt.setExclude(src.getExclude()); + if (src.hasExcludeElement()) + tgt.setExcludeElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_40.convertType(src.getExcludeElement())); if (src.hasPeriod()) tgt.setPeriod(VersionConvertor_30_40.convertPeriod(src.getPeriod())); return tgt; @@ -88,8 +89,8 @@ public class Group30_40 { tgt.setCode(VersionConvertor_30_40.convertCodeableConcept(src.getCode())); if (src.hasValue()) tgt.setValue(VersionConvertor_30_40.convertType(src.getValue())); - if (src.hasExclude()) - tgt.setExclude(src.getExclude()); + if (src.hasExcludeElement()) + tgt.setExcludeElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_30_40.convertType(src.getExcludeElement())); if (src.hasPeriod()) tgt.setPeriod(VersionConvertor_30_40.convertPeriod(src.getPeriod())); return tgt; @@ -104,8 +105,8 @@ public class Group30_40 { tgt.setEntity(VersionConvertor_30_40.convertReference(src.getEntity())); if (src.hasPeriod()) tgt.setPeriod(VersionConvertor_30_40.convertPeriod(src.getPeriod())); - if (src.hasInactive()) - tgt.setInactive(src.getInactive()); + if (src.hasInactiveElement()) + tgt.setInactiveElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_30_40.convertType(src.getInactiveElement())); return tgt; } @@ -118,8 +119,8 @@ public class Group30_40 { tgt.setEntity(VersionConvertor_30_40.convertReference(src.getEntity())); if (src.hasPeriod()) tgt.setPeriod(VersionConvertor_30_40.convertPeriod(src.getPeriod())); - if (src.hasInactive()) - tgt.setInactive(src.getInactive()); + if (src.hasInactiveElement()) + tgt.setInactiveElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_40.convertType(src.getInactiveElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/HealthcareService30_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/HealthcareService30_40.java index 60897a30b..dcfd24a0f 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/HealthcareService30_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/HealthcareService30_40.java @@ -4,6 +4,7 @@ import org.hl7.fhir.convertors.VersionConvertor_30_40; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r4.model.CodeableConcept; import org.hl7.fhir.r4.model.HealthcareService.HealthcareServiceEligibilityComponent; +import java.util.Collections; public class HealthcareService30_40 { @@ -15,8 +16,8 @@ public class HealthcareService30_40 { if (src.hasIdentifier()) { for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_30_40.convertIdentifier(t)); } - if (src.hasActive()) - tgt.setActive(src.getActive()); + if (src.hasActiveElement()) + tgt.setActiveElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_40.convertType(src.getActiveElement())); if (src.hasProvidedBy()) tgt.setProvidedBy(VersionConvertor_30_40.convertReference(src.getProvidedBy())); if (src.hasCategory()) @@ -30,12 +31,12 @@ public class HealthcareService30_40 { if (src.hasLocation()) { for (org.hl7.fhir.r4.model.Reference t : src.getLocation()) tgt.addLocation(VersionConvertor_30_40.convertReference(t)); } - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasComment()) - tgt.setComment(src.getComment()); - if (src.hasExtraDetails()) - tgt.setExtraDetails(src.getExtraDetails()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getNameElement())); + if (src.hasCommentElement()) + tgt.setCommentElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getCommentElement())); + if (src.hasExtraDetailsElement()) + tgt.setExtraDetailsElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getExtraDetailsElement())); if (src.hasPhoto()) tgt.setPhoto(VersionConvertor_30_40.convertAttachment(src.getPhoto())); if (src.hasTelecom()) { @@ -63,16 +64,16 @@ public class HealthcareService30_40 { if (src.hasReferralMethod()) { for (org.hl7.fhir.r4.model.CodeableConcept t : src.getReferralMethod()) tgt.addReferralMethod(VersionConvertor_30_40.convertCodeableConcept(t)); } - if (src.hasAppointmentRequired()) - tgt.setAppointmentRequired(src.getAppointmentRequired()); + if (src.hasAppointmentRequiredElement()) + tgt.setAppointmentRequiredElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_40.convertType(src.getAppointmentRequiredElement())); if (src.hasAvailableTime()) { for (org.hl7.fhir.r4.model.HealthcareService.HealthcareServiceAvailableTimeComponent t : src.getAvailableTime()) tgt.addAvailableTime(convertHealthcareServiceAvailableTimeComponent(t)); } if (src.hasNotAvailable()) { for (org.hl7.fhir.r4.model.HealthcareService.HealthcareServiceNotAvailableComponent t : src.getNotAvailable()) tgt.addNotAvailable(convertHealthcareServiceNotAvailableComponent(t)); } - if (src.hasAvailabilityExceptions()) - tgt.setAvailabilityExceptions(src.getAvailabilityExceptions()); + if (src.hasAvailabilityExceptionsElement()) + tgt.setAvailabilityExceptionsElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getAvailabilityExceptionsElement())); if (src.hasEndpoint()) { for (org.hl7.fhir.r4.model.Reference t : src.getEndpoint()) tgt.addEndpoint(VersionConvertor_30_40.convertReference(t)); } @@ -87,8 +88,8 @@ public class HealthcareService30_40 { if (src.hasIdentifier()) { for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_30_40.convertIdentifier(t)); } - if (src.hasActive()) - tgt.setActive(src.getActive()); + if (src.hasActiveElement()) + tgt.setActiveElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_30_40.convertType(src.getActiveElement())); if (src.hasProvidedBy()) tgt.setProvidedBy(VersionConvertor_30_40.convertReference(src.getProvidedBy())); if (src.hasCategory()) @@ -102,12 +103,12 @@ public class HealthcareService30_40 { if (src.hasLocation()) { for (org.hl7.fhir.dstu3.model.Reference t : src.getLocation()) tgt.addLocation(VersionConvertor_30_40.convertReference(t)); } - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasComment()) - tgt.setComment(src.getComment()); - if (src.hasExtraDetails()) - tgt.setExtraDetails(src.getExtraDetails()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getNameElement())); + if (src.hasCommentElement()) + tgt.setCommentElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getCommentElement())); + if (src.hasExtraDetailsElement()) + tgt.setExtraDetailsElement((org.hl7.fhir.r4.model.MarkdownType) VersionConvertor_30_40.convertType(src.getExtraDetailsElement())); if (src.hasPhoto()) tgt.setPhoto(VersionConvertor_30_40.convertAttachment(src.getPhoto())); if (src.hasTelecom()) { @@ -136,16 +137,16 @@ public class HealthcareService30_40 { if (src.hasReferralMethod()) { for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getReferralMethod()) tgt.addReferralMethod(VersionConvertor_30_40.convertCodeableConcept(t)); } - if (src.hasAppointmentRequired()) - tgt.setAppointmentRequired(src.getAppointmentRequired()); + if (src.hasAppointmentRequiredElement()) + tgt.setAppointmentRequiredElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_30_40.convertType(src.getAppointmentRequiredElement())); if (src.hasAvailableTime()) { for (org.hl7.fhir.dstu3.model.HealthcareService.HealthcareServiceAvailableTimeComponent t : src.getAvailableTime()) tgt.addAvailableTime(convertHealthcareServiceAvailableTimeComponent(t)); } if (src.hasNotAvailable()) { for (org.hl7.fhir.dstu3.model.HealthcareService.HealthcareServiceNotAvailableComponent t : src.getNotAvailable()) tgt.addNotAvailable(convertHealthcareServiceNotAvailableComponent(t)); } - if (src.hasAvailabilityExceptions()) - tgt.setAvailabilityExceptions(src.getAvailabilityExceptions()); + if (src.hasAvailabilityExceptionsElement()) + tgt.setAvailabilityExceptionsElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getAvailabilityExceptionsElement())); if (src.hasEndpoint()) { for (org.hl7.fhir.dstu3.model.Reference t : src.getEndpoint()) tgt.addEndpoint(VersionConvertor_30_40.convertReference(t)); } @@ -160,12 +161,12 @@ public class HealthcareService30_40 { if (src.hasDaysOfWeek()) { for (org.hl7.fhir.r4.model.Enumeration t : src.getDaysOfWeek()) VersionConvertor_30_40.copyElement(t, tgt.addDaysOfWeekElement().setValue(VersionConvertor_30_40.convertDaysOfWeek(t.getValue()))); } - if (src.hasAllDay()) - tgt.setAllDay(src.getAllDay()); - if (src.hasAvailableStartTime()) - tgt.setAvailableStartTime(src.getAvailableStartTime()); - if (src.hasAvailableEndTime()) - tgt.setAvailableEndTime(src.getAvailableEndTime()); + if (src.hasAllDayElement()) + tgt.setAllDayElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_40.convertType(src.getAllDayElement())); + if (src.hasAvailableStartTimeElement()) + tgt.setAvailableStartTimeElement((org.hl7.fhir.dstu3.model.TimeType) VersionConvertor_30_40.convertType(src.getAvailableStartTimeElement())); + if (src.hasAvailableEndTimeElement()) + tgt.setAvailableEndTimeElement((org.hl7.fhir.dstu3.model.TimeType) VersionConvertor_30_40.convertType(src.getAvailableEndTimeElement())); return tgt; } @@ -177,12 +178,12 @@ public class HealthcareService30_40 { if (src.hasDaysOfWeek()) { for (org.hl7.fhir.dstu3.model.Enumeration t : src.getDaysOfWeek()) VersionConvertor_30_40.copyElement(t, tgt.addDaysOfWeekElement().setValue(VersionConvertor_30_40.convertDaysOfWeek(t.getValue()))); } - if (src.hasAllDay()) - tgt.setAllDay(src.getAllDay()); - if (src.hasAvailableStartTime()) - tgt.setAvailableStartTime(src.getAvailableStartTime()); - if (src.hasAvailableEndTime()) - tgt.setAvailableEndTime(src.getAvailableEndTime()); + if (src.hasAllDayElement()) + tgt.setAllDayElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_30_40.convertType(src.getAllDayElement())); + if (src.hasAvailableStartTimeElement()) + tgt.setAvailableStartTimeElement((org.hl7.fhir.r4.model.TimeType) VersionConvertor_30_40.convertType(src.getAvailableStartTimeElement())); + if (src.hasAvailableEndTimeElement()) + tgt.setAvailableEndTimeElement((org.hl7.fhir.r4.model.TimeType) VersionConvertor_30_40.convertType(src.getAvailableEndTimeElement())); return tgt; } @@ -191,8 +192,8 @@ public class HealthcareService30_40 { return null; org.hl7.fhir.r4.model.HealthcareService.HealthcareServiceNotAvailableComponent tgt = new org.hl7.fhir.r4.model.HealthcareService.HealthcareServiceNotAvailableComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); if (src.hasDuring()) tgt.setDuring(VersionConvertor_30_40.convertPeriod(src.getDuring())); return tgt; @@ -203,8 +204,8 @@ public class HealthcareService30_40 { return null; org.hl7.fhir.dstu3.model.HealthcareService.HealthcareServiceNotAvailableComponent tgt = new org.hl7.fhir.dstu3.model.HealthcareService.HealthcareServiceNotAvailableComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); if (src.hasDuring()) tgt.setDuring(VersionConvertor_30_40.convertPeriod(src.getDuring())); return tgt; diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/ImagingStudy30_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/ImagingStudy30_40.java index 9b7d2710b..f5ceb5267 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/ImagingStudy30_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/ImagingStudy30_40.java @@ -3,6 +3,7 @@ package org.hl7.fhir.convertors.conv30_40; import org.hl7.fhir.convertors.VersionConvertor_30_40; import org.hl7.fhir.exceptions.FHIRException; import java.util.List; +import java.util.Collections; public class ImagingStudy30_40 { @@ -60,12 +61,10 @@ public class ImagingStudy30_40 { for (org.hl7.fhir.r4.model.Reference t : src.getEndpoint()) { tgt.addEndpoint(VersionConvertor_30_40.convertReference(t)); } - if (src.hasNumberOfSeries()) { - tgt.setNumberOfSeries(src.getNumberOfSeries()); - } - if (src.hasNumberOfInstances()) { - tgt.setNumberOfInstances(src.getNumberOfInstances()); - } + if (src.hasNumberOfSeriesElement()) + tgt.setNumberOfSeriesElement((org.hl7.fhir.dstu3.model.UnsignedIntType) VersionConvertor_30_40.convertType(src.getNumberOfSeriesElement())); + if (src.hasNumberOfInstancesElement()) + tgt.setNumberOfInstancesElement((org.hl7.fhir.dstu3.model.UnsignedIntType) VersionConvertor_30_40.convertType(src.getNumberOfInstancesElement())); if (src.hasProcedureReference()) { tgt.addProcedureReference(VersionConvertor_30_40.convertReference(src.getProcedureReference())); } @@ -78,9 +77,8 @@ public class ImagingStudy30_40 { if (reasonCodes.size() > 1) { } } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); for (org.hl7.fhir.r4.model.ImagingStudy.ImagingStudySeriesComponent t : src.getSeries()) { tgt.addSeries(convertImagingStudySeriesComponent(t)); } @@ -145,12 +143,10 @@ public class ImagingStudy30_40 { for (org.hl7.fhir.dstu3.model.Reference t : src.getEndpoint()) { tgt.addEndpoint(VersionConvertor_30_40.convertReference(t)); } - if (src.hasNumberOfSeries()) { - tgt.setNumberOfSeries(src.getNumberOfSeries()); - } - if (src.hasNumberOfInstances()) { - tgt.setNumberOfInstances(src.getNumberOfInstances()); - } + if (src.hasNumberOfSeriesElement()) + tgt.setNumberOfSeriesElement((org.hl7.fhir.r4.model.UnsignedIntType) VersionConvertor_30_40.convertType(src.getNumberOfSeriesElement())); + if (src.hasNumberOfInstancesElement()) + tgt.setNumberOfInstancesElement((org.hl7.fhir.r4.model.UnsignedIntType) VersionConvertor_30_40.convertType(src.getNumberOfInstancesElement())); List procedureReferences = src.getProcedureReference(); if (procedureReferences.size() > 0) { tgt.setProcedureReference(VersionConvertor_30_40.convertReference(procedureReferences.get(0))); @@ -163,9 +159,8 @@ public class ImagingStudy30_40 { if (src.hasReason()) { tgt.addReasonCode(VersionConvertor_30_40.convertCodeableConcept(src.getReason())); } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); for (org.hl7.fhir.dstu3.model.ImagingStudy.ImagingStudySeriesComponent t : src.getSeries()) { tgt.addSeries(convertImagingStudySeriesComponent(t)); } @@ -177,48 +172,28 @@ public class ImagingStudy30_40 { return null; org.hl7.fhir.r4.model.ImagingStudy.ImagingStudySeriesComponent tgt = new org.hl7.fhir.r4.model.ImagingStudy.ImagingStudySeriesComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasUid()) { - if (src.hasUid()) { - tgt.setUid(src.getUid()); - } - } - if (src.hasNumber()) { - if (src.hasNumber()) { - tgt.setNumber(src.getNumber()); - } - } + if (src.hasUidElement()) + tgt.setUidElement((org.hl7.fhir.r4.model.IdType) VersionConvertor_30_40.convertType(src.getUidElement())); + if (src.hasNumberElement()) + tgt.setNumberElement((org.hl7.fhir.r4.model.UnsignedIntType) VersionConvertor_30_40.convertType(src.getNumberElement())); if (src.hasModality()) { - if (src.hasModality()) { - tgt.setModality(VersionConvertor_30_40.convertCoding(src.getModality())); - } - } - if (src.hasDescription()) { - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } - } - if (src.hasNumberOfInstances()) { - if (src.hasNumberOfInstances()) { - tgt.setNumberOfInstances(src.getNumberOfInstances()); - } + tgt.setModality(VersionConvertor_30_40.convertCoding(src.getModality())); } + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); + if (src.hasNumberOfInstancesElement()) + tgt.setNumberOfInstancesElement((org.hl7.fhir.r4.model.UnsignedIntType) VersionConvertor_30_40.convertType(src.getNumberOfInstancesElement())); for (org.hl7.fhir.dstu3.model.Reference t : src.getEndpoint()) { tgt.addEndpoint(VersionConvertor_30_40.convertReference(t)); } if (src.hasBodySite()) { - if (src.hasBodySite()) { - tgt.setBodySite(VersionConvertor_30_40.convertCoding(src.getBodySite())); - } + tgt.setBodySite(VersionConvertor_30_40.convertCoding(src.getBodySite())); } if (src.hasLaterality()) { - if (src.hasLaterality()) { - tgt.setLaterality(VersionConvertor_30_40.convertCoding(src.getLaterality())); - } + tgt.setLaterality(VersionConvertor_30_40.convertCoding(src.getLaterality())); } - if (src.hasStarted()) { - if (src.hasStartedElement()) { - tgt.setStartedElement(VersionConvertor_30_40.convertDateTime(src.getStartedElement())); - } + if (src.hasStartedElement()) { + tgt.setStartedElement(VersionConvertor_30_40.convertDateTime(src.getStartedElement())); } for (org.hl7.fhir.dstu3.model.ImagingStudy.ImagingStudySeriesInstanceComponent t : src.getInstance()) { tgt.addInstance(convertImagingStudySeriesInstanceComponent(t)); @@ -231,48 +206,28 @@ public class ImagingStudy30_40 { return null; org.hl7.fhir.dstu3.model.ImagingStudy.ImagingStudySeriesComponent tgt = new org.hl7.fhir.dstu3.model.ImagingStudy.ImagingStudySeriesComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasUid()) { - if (src.hasUid()) { - tgt.setUid(src.getUid()); - } - } - if (src.hasNumber()) { - if (src.hasNumber()) { - tgt.setNumber(src.getNumber()); - } - } + if (src.hasUidElement()) + tgt.setUidElement((org.hl7.fhir.dstu3.model.OidType) VersionConvertor_30_40.convertType(src.getUidElement())); + if (src.hasNumberElement()) + tgt.setNumberElement((org.hl7.fhir.dstu3.model.UnsignedIntType) VersionConvertor_30_40.convertType(src.getNumberElement())); if (src.hasModality()) { - if (src.hasModality()) { - tgt.setModality(VersionConvertor_30_40.convertCoding(src.getModality())); - } - } - if (src.hasDescription()) { - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } - } - if (src.hasNumberOfInstances()) { - if (src.hasNumberOfInstances()) { - tgt.setNumberOfInstances(src.getNumberOfInstances()); - } + tgt.setModality(VersionConvertor_30_40.convertCoding(src.getModality())); } + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); + if (src.hasNumberOfInstancesElement()) + tgt.setNumberOfInstancesElement((org.hl7.fhir.dstu3.model.UnsignedIntType) VersionConvertor_30_40.convertType(src.getNumberOfInstancesElement())); for (org.hl7.fhir.r4.model.Reference t : src.getEndpoint()) { tgt.addEndpoint(VersionConvertor_30_40.convertReference(t)); } if (src.hasBodySite()) { - if (src.hasBodySite()) { - tgt.setBodySite(VersionConvertor_30_40.convertCoding(src.getBodySite())); - } + tgt.setBodySite(VersionConvertor_30_40.convertCoding(src.getBodySite())); } if (src.hasLaterality()) { - if (src.hasLaterality()) { - tgt.setLaterality(VersionConvertor_30_40.convertCoding(src.getLaterality())); - } + tgt.setLaterality(VersionConvertor_30_40.convertCoding(src.getLaterality())); } - if (src.hasStarted()) { - if (src.hasStartedElement()) { - tgt.setStartedElement(VersionConvertor_30_40.convertDateTime(src.getStartedElement())); - } + if (src.hasStartedElement()) { + tgt.setStartedElement(VersionConvertor_30_40.convertDateTime(src.getStartedElement())); } for (org.hl7.fhir.r4.model.ImagingStudy.ImagingStudySeriesInstanceComponent t : src.getInstance()) { tgt.addInstance(convertImagingStudySeriesInstanceComponent(t)); @@ -285,11 +240,8 @@ public class ImagingStudy30_40 { return null; org.hl7.fhir.r4.model.ImagingStudy.ImagingStudySeriesInstanceComponent tgt = new org.hl7.fhir.r4.model.ImagingStudy.ImagingStudySeriesInstanceComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasUid()) { - if (src.hasUid()) { - tgt.setUid(src.getUid()); - } - } + if (src.hasUidElement()) + tgt.setUidElement((org.hl7.fhir.r4.model.IdType) VersionConvertor_30_40.convertType(src.getUidElement())); if (src.hasSopClass()) { org.hl7.fhir.r4.model.Coding c = new org.hl7.fhir.r4.model.Coding(); c.setSystem(VersionConvertor_30_40.URN_IETF_RFC_3986); @@ -298,16 +250,10 @@ public class ImagingStudy30_40 { } tgt.setSopClass(c); } - if (src.hasNumber()) { - if (src.hasNumber()) { - tgt.setNumber(src.getNumber()); - } - } - if (src.hasTitle()) { - if (src.hasTitle()) { - tgt.setTitle(src.getTitle()); - } - } + if (src.hasNumberElement()) + tgt.setNumberElement((org.hl7.fhir.r4.model.UnsignedIntType) VersionConvertor_30_40.convertType(src.getNumberElement())); + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getTitleElement())); return tgt; } @@ -316,19 +262,16 @@ public class ImagingStudy30_40 { return null; org.hl7.fhir.dstu3.model.ImagingStudy.ImagingStudySeriesInstanceComponent tgt = new org.hl7.fhir.dstu3.model.ImagingStudy.ImagingStudySeriesInstanceComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasUid()) { - tgt.setUid(src.getUid()); - } + if (src.hasUidElement()) + tgt.setUidElement((org.hl7.fhir.dstu3.model.OidType) VersionConvertor_30_40.convertType(src.getUidElement())); org.hl7.fhir.r4.model.Coding sop = src.getSopClass(); if (VersionConvertor_30_40.URN_IETF_RFC_3986.equals(sop.getSystem())) { tgt.setSopClass(sop.getCode()); } - if (src.hasNumber()) { - tgt.setNumber(src.getNumber()); - } - if (src.hasTitle()) { - tgt.setTitle(src.getTitle()); - } + if (src.hasNumberElement()) + tgt.setNumberElement((org.hl7.fhir.dstu3.model.UnsignedIntType) VersionConvertor_30_40.convertType(src.getNumberElement())); + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getTitleElement())); return tgt; } } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Immunization30_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Immunization30_40.java index aef8d238a..1771b3489 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Immunization30_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Immunization30_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_40; import org.hl7.fhir.convertors.VersionConvertor_30_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Immunization30_40 { @@ -23,18 +24,18 @@ public class Immunization30_40 { tgt.setEncounter(VersionConvertor_30_40.convertReference(src.getEncounter())); if (src.hasDateElement()) tgt.setOccurrence(VersionConvertor_30_40.convertDateTime(src.getDateElement())); - if (src.hasPrimarySource()) - tgt.setPrimarySource(src.getPrimarySource()); + if (src.hasPrimarySourceElement()) + tgt.setPrimarySourceElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_30_40.convertType(src.getPrimarySourceElement())); if (src.hasReportOrigin()) tgt.setReportOrigin(VersionConvertor_30_40.convertCodeableConcept(src.getReportOrigin())); if (src.hasLocation()) tgt.setLocation(VersionConvertor_30_40.convertReference(src.getLocation())); if (src.hasManufacturer()) tgt.setManufacturer(VersionConvertor_30_40.convertReference(src.getManufacturer())); - if (src.hasLotNumber()) - tgt.setLotNumber(src.getLotNumber()); + if (src.hasLotNumberElement()) + tgt.setLotNumberElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getLotNumberElement())); if (src.hasExpirationDate()) - tgt.setExpirationDateElement(VersionConvertor_30_40.convertDate(src.getExpirationDateElement())); + tgt.setExpirationDateElement(VersionConvertor_30_40.convertDate(src.getExpirationDateElement())); if (src.hasSite()) tgt.setSite(VersionConvertor_30_40.convertCodeableConcept(src.getSite())); if (src.hasRoute()) @@ -71,18 +72,18 @@ public class Immunization30_40 { tgt.setEncounter(VersionConvertor_30_40.convertReference(src.getEncounter())); if (src.hasOccurrenceDateTimeType()) tgt.setDateElement(VersionConvertor_30_40.convertDateTime(src.getOccurrenceDateTimeType())); - if (src.hasPrimarySource()) - tgt.setPrimarySource(src.getPrimarySource()); + if (src.hasPrimarySourceElement()) + tgt.setPrimarySourceElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_40.convertType(src.getPrimarySourceElement())); if (src.hasReportOrigin()) tgt.setReportOrigin(VersionConvertor_30_40.convertCodeableConcept(src.getReportOrigin())); if (src.hasLocation()) tgt.setLocation(VersionConvertor_30_40.convertReference(src.getLocation())); if (src.hasManufacturer()) tgt.setManufacturer(VersionConvertor_30_40.convertReference(src.getManufacturer())); - if (src.hasLotNumber()) - tgt.setLotNumber(src.getLotNumber()); + if (src.hasLotNumberElement()) + tgt.setLotNumberElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getLotNumberElement())); if (src.hasExpirationDate()) - tgt.setExpirationDateElement(VersionConvertor_30_40.convertDate(src.getExpirationDateElement())); + tgt.setExpirationDateElement(VersionConvertor_30_40.convertDate(src.getExpirationDateElement())); if (src.hasSite()) tgt.setSite(VersionConvertor_30_40.convertCodeableConcept(src.getSite())); if (src.hasRoute()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/ImplementationGuide30_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/ImplementationGuide30_40.java index 09b7c9cf1..1559e7c78 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/ImplementationGuide30_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/ImplementationGuide30_40.java @@ -3,7 +3,10 @@ package org.hl7.fhir.convertors.conv30_40; import org.hl7.fhir.convertors.VersionConvertor_30_40; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r4.model.Enumeration; +import org.hl7.fhir.r4.model.StringType; + import java.util.List; +import java.util.Collections; public class ImplementationGuide30_40 { @@ -12,33 +15,33 @@ public class ImplementationGuide30_40 { return null; org.hl7.fhir.dstu3.model.ImplementationGuide tgt = new org.hl7.fhir.dstu3.model.ImplementationGuide(); VersionConvertor_30_40.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_40.convertType(src.getUrlElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getNameElement())); if (src.hasStatus()) tgt.setStatus(VersionConvertor_30_40.convertPublicationStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_40.convertType(src.getExperimentalElement())); if (src.hasDateElement()) tgt.setDateElement(VersionConvertor_30_40.convertDateTime(src.getDateElement())); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact()) tgt.addContact(VersionConvertor_30_40.convertContactDetail(t)); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); if (src.hasUseContext()) { for (org.hl7.fhir.r4.model.UsageContext t : src.getUseContext()) tgt.addUseContext(VersionConvertor_30_40.convertUsageContext(t)); } if (src.hasJurisdiction()) { for (org.hl7.fhir.r4.model.CodeableConcept t : src.getJurisdiction()) tgt.addJurisdiction(VersionConvertor_30_40.convertCodeableConcept(t)); } - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_40.convertType(src.getCopyrightElement())); if (src.hasFhirVersion()) for (Enumeration v : src.getFhirVersion()) { tgt.setFhirVersion(v.asStringValue()); @@ -66,35 +69,35 @@ public class ImplementationGuide30_40 { return null; org.hl7.fhir.r4.model.ImplementationGuide tgt = new org.hl7.fhir.r4.model.ImplementationGuide(); VersionConvertor_30_40.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_30_40.convertType(src.getUrlElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getNameElement())); if (src.hasStatus()) tgt.setStatus(VersionConvertor_30_40.convertPublicationStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_30_40.convertType(src.getExperimentalElement())); if (src.hasDateElement()) tgt.setDateElement(VersionConvertor_30_40.convertDateTime(src.getDateElement())); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) tgt.addContact(VersionConvertor_30_40.convertContactDetail(t)); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r4.model.MarkdownType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); if (src.hasUseContext()) { for (org.hl7.fhir.dstu3.model.UsageContext t : src.getUseContext()) tgt.addUseContext(VersionConvertor_30_40.convertUsageContext(t)); } if (src.hasJurisdiction()) { for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getJurisdiction()) tgt.addJurisdiction(VersionConvertor_30_40.convertCodeableConcept(t)); } - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.r4.model.MarkdownType) VersionConvertor_30_40.convertType(src.getCopyrightElement())); if (src.hasFhirVersion()) - tgt.addFhirVersion(org.hl7.fhir.r4.model.Enumerations.FHIRVersion.fromCode(src.getFhirVersion())); + tgt.addFhirVersion(org.hl7.fhir.r4.model.Enumerations.FHIRVersion.fromCode(src.getFhirVersion())); if (src.hasDependency()) { for (org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuideDependencyComponent t : src.getDependency()) tgt.addDependsOn(convertImplementationGuideDependencyComponent(t)); } @@ -115,8 +118,8 @@ public class ImplementationGuide30_40 { org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuideDependencyComponent tgt = new org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuideDependencyComponent(); VersionConvertor_30_40.copyElement(src, tgt); tgt.setType(org.hl7.fhir.dstu3.model.ImplementationGuide.GuideDependencyType.REFERENCE); - if (src.hasUri()) - tgt.setUri(src.getUri()); + if (src.hasUriElement()) + tgt.setUriElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_40.convertType(src.getUriElement())); return tgt; } @@ -125,8 +128,8 @@ public class ImplementationGuide30_40 { return null; org.hl7.fhir.r4.model.ImplementationGuide.ImplementationGuideDependsOnComponent tgt = new org.hl7.fhir.r4.model.ImplementationGuide.ImplementationGuideDependsOnComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasUri()) - tgt.setUri(src.getUri()); + if (src.hasUriElement()) + tgt.setUriElement((org.hl7.fhir.r4.model.CanonicalType) VersionConvertor_30_40.convertType(src.getUriElement())); return tgt; } @@ -135,8 +138,8 @@ public class ImplementationGuide30_40 { return null; org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuideGlobalComponent tgt = new org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuideGlobalComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasType()) - tgt.setType(src.getType()); + if (src.hasTypeElement()) + tgt.setTypeElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_30_40.convertType(src.getTypeElement())); if (src.hasProfile()) tgt.setProfile(VersionConvertor_30_40.convertCanonicalToReference(src.getProfileElement())); return tgt; @@ -147,8 +150,8 @@ public class ImplementationGuide30_40 { return null; org.hl7.fhir.r4.model.ImplementationGuide.ImplementationGuideGlobalComponent tgt = new org.hl7.fhir.r4.model.ImplementationGuide.ImplementationGuideGlobalComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasType()) - tgt.setType(src.getType()); + if (src.hasTypeElement()) + tgt.setTypeElement((org.hl7.fhir.r4.model.CodeType) VersionConvertor_30_40.convertType(src.getTypeElement())); if (src.hasProfile()) tgt.setProfileElement(VersionConvertor_30_40.convertReferenceToCanonical(src.getProfile())); return tgt; @@ -162,10 +165,10 @@ public class ImplementationGuide30_40 { if (src.hasId()) { tgt.setId(src.getId()); } - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getNameElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); return tgt; } @@ -175,10 +178,10 @@ public class ImplementationGuide30_40 { org.hl7.fhir.r4.model.ImplementationGuide.ImplementationGuideDefinitionGroupingComponent tgt = new org.hl7.fhir.r4.model.ImplementationGuide.ImplementationGuideDefinitionGroupingComponent(); tgt.setId("p" + (context.getGrouping().size() + 1)); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasNameElement()) + tgt.setNameElement((StringType) VersionConvertor_30_40.convertType(src.getNameElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((StringType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); for (org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuidePackageResourceComponent t : src.getResource()) { org.hl7.fhir.r4.model.ImplementationGuide.ImplementationGuideDefinitionResourceComponent tn = convertImplementationGuidePackageResourceComponent(t); tn.setGroupingId(tgt.getId()); @@ -196,11 +199,11 @@ public class ImplementationGuide30_40 { org.hl7.fhir.r4.model.Type t = VersionConvertor_30_40.convertType(src.getExampleFor()); tgt.setExample(t instanceof org.hl7.fhir.r4.model.Reference ? new org.hl7.fhir.r4.model.CanonicalType(((org.hl7.fhir.r4.model.Reference) t).getReference()) : t); } else if (src.hasExample()) - tgt.setExample(new org.hl7.fhir.r4.model.BooleanType(src.getExample())); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + tgt.setExample(new org.hl7.fhir.r4.model.BooleanType(src.getExample())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getNameElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); if (src.hasSourceReference()) tgt.setReference(VersionConvertor_30_40.convertReference(src.getSourceReference())); else if (src.hasSourceUriType()) @@ -222,10 +225,10 @@ public class ImplementationGuide30_40 { tgt.setExample(src.getExampleBooleanType().getValue()); else tgt.setExample(false); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getNameElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); if (src.hasReference()) tgt.setSource(VersionConvertor_30_40.convertReference(src.getReference())); return tgt; @@ -238,8 +241,8 @@ public class ImplementationGuide30_40 { VersionConvertor_30_40.copyElement(src, tgt); if (src.hasNameUrlType()) tgt.setSource(src.getNameUrlType().getValue()); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getTitleElement())); if (src.hasGeneration()) tgt.setKind(convertPageGeneration(src.getGeneration())); if (src.hasPage()) { @@ -255,8 +258,8 @@ public class ImplementationGuide30_40 { VersionConvertor_30_40.copyElement(src, tgt); if (src.hasSource()) tgt.setName(convertUriToUrl(src.getSourceElement())); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getTitleElement())); if (src.hasKind()) tgt.setGeneration(convertPageGeneration(src.getKind())); if (src.hasPage()) { diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Library30_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Library30_40.java index ea2287a93..4e5df27b4 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Library30_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Library30_40.java @@ -4,6 +4,7 @@ import org.hl7.fhir.convertors.VersionConvertor_30_40; import org.hl7.fhir.dstu3.model.ContactDetail; import org.hl7.fhir.dstu3.model.Contributor.ContributorType; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Library30_40 { @@ -12,48 +13,48 @@ public class Library30_40 { return null; org.hl7.fhir.dstu3.model.Library tgt = new org.hl7.fhir.dstu3.model.Library(); VersionConvertor_30_40.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_40.convertType(src.getUrlElement())); if (src.hasIdentifier()) { for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_30_40.convertIdentifier(t)); } - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getNameElement())); + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getTitleElement())); if (src.hasStatus()) tgt.setStatus(VersionConvertor_30_40.convertPublicationStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_40.convertType(src.getExperimentalElement())); if (src.hasType()) tgt.setType(VersionConvertor_30_40.convertCodeableConcept(src.getType())); if (src.hasDateElement()) tgt.setDateElement(VersionConvertor_30_40.convertDateTime(src.getDateElement())); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact()) tgt.addContact(VersionConvertor_30_40.convertContactDetail(t)); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); if (src.hasUseContext()) { for (org.hl7.fhir.r4.model.UsageContext t : src.getUseContext()) tgt.addUseContext(VersionConvertor_30_40.convertUsageContext(t)); } if (src.hasJurisdiction()) { for (org.hl7.fhir.r4.model.CodeableConcept t : src.getJurisdiction()) tgt.addJurisdiction(VersionConvertor_30_40.convertCodeableConcept(t)); } - if (src.hasPurpose()) - tgt.setPurpose(src.getPurpose()); - if (src.hasUsage()) - tgt.setUsage(src.getUsage()); - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); + if (src.hasPurposeElement()) + tgt.setPurposeElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_40.convertType(src.getPurposeElement())); + if (src.hasUsageElement()) + tgt.setUsageElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getUsageElement())); + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_40.convertType(src.getCopyrightElement())); if (src.hasApprovalDate()) - tgt.setApprovalDateElement(VersionConvertor_30_40.convertDate(src.getApprovalDateElement())); + tgt.setApprovalDateElement(VersionConvertor_30_40.convertDate(src.getApprovalDateElement())); if (src.hasLastReviewDate()) - tgt.setLastReviewDateElement(VersionConvertor_30_40.convertDate(src.getLastReviewDateElement())); + tgt.setLastReviewDateElement(VersionConvertor_30_40.convertDate(src.getLastReviewDateElement())); if (src.hasEffectivePeriod()) tgt.setEffectivePeriod(VersionConvertor_30_40.convertPeriod(src.getEffectivePeriod())); if (src.hasTopic()) { @@ -103,48 +104,48 @@ public class Library30_40 { return null; org.hl7.fhir.r4.model.Library tgt = new org.hl7.fhir.r4.model.Library(); VersionConvertor_30_40.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_30_40.convertType(src.getUrlElement())); if (src.hasIdentifier()) { for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_30_40.convertIdentifier(t)); } - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getNameElement())); + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getTitleElement())); if (src.hasStatus()) tgt.setStatus(VersionConvertor_30_40.convertPublicationStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_30_40.convertType(src.getExperimentalElement())); if (src.hasType()) tgt.setType(VersionConvertor_30_40.convertCodeableConcept(src.getType())); if (src.hasDateElement()) tgt.setDateElement(VersionConvertor_30_40.convertDateTime(src.getDateElement())); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) tgt.addContact(VersionConvertor_30_40.convertContactDetail(t)); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r4.model.MarkdownType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); if (src.hasUseContext()) { for (org.hl7.fhir.dstu3.model.UsageContext t : src.getUseContext()) tgt.addUseContext(VersionConvertor_30_40.convertUsageContext(t)); } if (src.hasJurisdiction()) { for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getJurisdiction()) tgt.addJurisdiction(VersionConvertor_30_40.convertCodeableConcept(t)); } - if (src.hasPurpose()) - tgt.setPurpose(src.getPurpose()); - if (src.hasUsage()) - tgt.setUsage(src.getUsage()); - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); + if (src.hasPurposeElement()) + tgt.setPurposeElement((org.hl7.fhir.r4.model.MarkdownType) VersionConvertor_30_40.convertType(src.getPurposeElement())); + if (src.hasUsageElement()) + tgt.setUsageElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getUsageElement())); + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.r4.model.MarkdownType) VersionConvertor_30_40.convertType(src.getCopyrightElement())); if (src.hasApprovalDate()) - tgt.setApprovalDateElement(VersionConvertor_30_40.convertDate(src.getApprovalDateElement())); + tgt.setApprovalDateElement(VersionConvertor_30_40.convertDate(src.getApprovalDateElement())); if (src.hasLastReviewDate()) - tgt.setLastReviewDateElement(VersionConvertor_30_40.convertDate(src.getLastReviewDateElement())); + tgt.setLastReviewDateElement(VersionConvertor_30_40.convertDate(src.getLastReviewDateElement())); if (src.hasEffectivePeriod()) tgt.setEffectivePeriod(VersionConvertor_30_40.convertPeriod(src.getEffectivePeriod())); for (org.hl7.fhir.dstu3.model.Contributor t : src.getContributor()) { diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Linkage30_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Linkage30_40.java index a3e3fbf2b..3c9aaaf75 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Linkage30_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Linkage30_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_40; import org.hl7.fhir.convertors.VersionConvertor_30_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Linkage30_40 { @@ -10,8 +11,8 @@ public class Linkage30_40 { return null; org.hl7.fhir.r4.model.Linkage tgt = new org.hl7.fhir.r4.model.Linkage(); VersionConvertor_30_40.copyDomainResource(src, tgt); - if (src.hasActive()) - tgt.setActive(src.getActive()); + if (src.hasActiveElement()) + tgt.setActiveElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_30_40.convertType(src.getActiveElement())); if (src.hasAuthor()) tgt.setAuthor(VersionConvertor_30_40.convertReference(src.getAuthor())); if (src.hasItem()) { @@ -25,8 +26,8 @@ public class Linkage30_40 { return null; org.hl7.fhir.dstu3.model.Linkage tgt = new org.hl7.fhir.dstu3.model.Linkage(); VersionConvertor_30_40.copyDomainResource(src, tgt); - if (src.hasActive()) - tgt.setActive(src.getActive()); + if (src.hasActiveElement()) + tgt.setActiveElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_40.convertType(src.getActiveElement())); if (src.hasAuthor()) tgt.setAuthor(VersionConvertor_30_40.convertReference(src.getAuthor())); if (src.hasItem()) { diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/List30_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/List30_40.java index cf8dd05bd..5b865e36e 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/List30_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/List30_40.java @@ -1,7 +1,11 @@ package org.hl7.fhir.convertors.conv30_40; import org.hl7.fhir.convertors.VersionConvertor_30_40; +import org.hl7.fhir.dstu3.model.BooleanType; import org.hl7.fhir.exceptions.FHIRException; +import org.hl7.fhir.r4.model.StringType; + +import java.util.Collections; public class List30_40 { @@ -17,8 +21,8 @@ public class List30_40 { tgt.setStatus(convertListStatus(src.getStatus())); if (src.hasMode()) tgt.setMode(convertListMode(src.getMode())); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); + if (src.hasTitleElement()) + tgt.setTitleElement((StringType) VersionConvertor_30_40.convertType(src.getTitleElement())); if (src.hasCode()) tgt.setCode(VersionConvertor_30_40.convertCodeableConcept(src.getCode())); if (src.hasSubject()) @@ -54,8 +58,8 @@ public class List30_40 { tgt.setStatus(convertListStatus(src.getStatus())); if (src.hasMode()) tgt.setMode(convertListMode(src.getMode())); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getTitleElement())); if (src.hasCode()) tgt.setCode(VersionConvertor_30_40.convertCodeableConcept(src.getCode())); if (src.hasSubject()) @@ -86,8 +90,8 @@ public class List30_40 { VersionConvertor_30_40.copyElement(src, tgt); if (src.hasFlag()) tgt.setFlag(VersionConvertor_30_40.convertCodeableConcept(src.getFlag())); - if (src.hasDeleted()) - tgt.setDeleted(src.getDeleted()); + if (src.hasDeletedElement()) + tgt.setDeletedElement((BooleanType) VersionConvertor_30_40.convertType(src.getDeletedElement())); if (src.hasDateElement()) tgt.setDateElement(VersionConvertor_30_40.convertDateTime(src.getDateElement())); if (src.hasItem()) @@ -102,8 +106,8 @@ public class List30_40 { VersionConvertor_30_40.copyElement(src, tgt); if (src.hasFlag()) tgt.setFlag(VersionConvertor_30_40.convertCodeableConcept(src.getFlag())); - if (src.hasDeleted()) - tgt.setDeleted(src.getDeleted()); + if (src.hasDeletedElement()) + tgt.setDeletedElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_30_40.convertType(src.getDeletedElement())); if (src.hasDateElement()) tgt.setDateElement(VersionConvertor_30_40.convertDateTime(src.getDateElement())); if (src.hasItem()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Location30_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Location30_40.java index 4041ed91b..94067eb96 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Location30_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Location30_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_40; import org.hl7.fhir.convertors.VersionConvertor_30_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Location30_40 { @@ -17,13 +18,13 @@ public class Location30_40 { tgt.setStatus(convertLocationStatus(src.getStatus())); if (src.hasOperationalStatus()) tgt.setOperationalStatus(VersionConvertor_30_40.convertCoding(src.getOperationalStatus())); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getNameElement())); if (src.hasAlias()) { for (org.hl7.fhir.dstu3.model.StringType t : src.getAlias()) tgt.addAlias(t.getValue()); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); if (src.hasMode()) tgt.setMode(convertLocationMode(src.getMode())); if (src.hasType()) @@ -59,13 +60,13 @@ public class Location30_40 { tgt.setStatus(convertLocationStatus(src.getStatus())); if (src.hasOperationalStatus()) tgt.setOperationalStatus(VersionConvertor_30_40.convertCoding(src.getOperationalStatus())); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getNameElement())); if (src.hasAlias()) { for (org.hl7.fhir.r4.model.StringType t : src.getAlias()) tgt.addAlias(t.getValue()); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); if (src.hasMode()) tgt.setMode(convertLocationMode(src.getMode())); if (src.hasType()) @@ -120,12 +121,12 @@ public class Location30_40 { return null; org.hl7.fhir.r4.model.Location.LocationPositionComponent tgt = new org.hl7.fhir.r4.model.Location.LocationPositionComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasLongitude()) - tgt.setLongitude(src.getLongitude()); - if (src.hasLatitude()) - tgt.setLatitude(src.getLatitude()); - if (src.hasAltitude()) - tgt.setAltitude(src.getAltitude()); + if (src.hasLongitudeElement()) + tgt.setLongitudeElement((org.hl7.fhir.r4.model.DecimalType) VersionConvertor_30_40.convertType(src.getLongitudeElement())); + if (src.hasLatitudeElement()) + tgt.setLatitudeElement((org.hl7.fhir.r4.model.DecimalType) VersionConvertor_30_40.convertType(src.getLatitudeElement())); + if (src.hasAltitudeElement()) + tgt.setAltitudeElement((org.hl7.fhir.r4.model.DecimalType) VersionConvertor_30_40.convertType(src.getAltitudeElement())); return tgt; } @@ -134,12 +135,12 @@ public class Location30_40 { return null; org.hl7.fhir.dstu3.model.Location.LocationPositionComponent tgt = new org.hl7.fhir.dstu3.model.Location.LocationPositionComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasLongitude()) - tgt.setLongitude(src.getLongitude()); - if (src.hasLatitude()) - tgt.setLatitude(src.getLatitude()); - if (src.hasAltitude()) - tgt.setAltitude(src.getAltitude()); + if (src.hasLongitudeElement()) + tgt.setLongitudeElement((org.hl7.fhir.dstu3.model.DecimalType) VersionConvertor_30_40.convertType(src.getLongitudeElement())); + if (src.hasLatitudeElement()) + tgt.setLatitudeElement((org.hl7.fhir.dstu3.model.DecimalType) VersionConvertor_30_40.convertType(src.getLatitudeElement())); + if (src.hasAltitudeElement()) + tgt.setAltitudeElement((org.hl7.fhir.dstu3.model.DecimalType) VersionConvertor_30_40.convertType(src.getAltitudeElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Media30_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Media30_40.java index 0aa475f26..9ea7ca328 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Media30_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Media30_40.java @@ -3,6 +3,7 @@ package org.hl7.fhir.convertors.conv30_40; import org.hl7.fhir.convertors.VersionConvertor_30_40; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r4.model.CodeableConcept; +import java.util.Collections; public class Media30_40 { @@ -55,18 +56,14 @@ public class Media30_40 { if (src.hasDevice()) { tgt.setDevice(VersionConvertor_30_40.convertReference(src.getDevice())); } - if (src.hasHeight()) { - tgt.setHeight(src.getHeight()); - } - if (src.hasWidth()) { - tgt.setWidth(src.getWidth()); - } - if (src.hasFrames()) { - tgt.setFrames(src.getFrames()); - } - if (src.hasDuration()) { - tgt.setDuration(src.getDuration().intValue()); - } + if (src.hasHeightElement()) + tgt.setHeightElement((org.hl7.fhir.dstu3.model.PositiveIntType) VersionConvertor_30_40.convertType(src.getHeightElement())); + if (src.hasWidthElement()) + tgt.setWidthElement((org.hl7.fhir.dstu3.model.PositiveIntType) VersionConvertor_30_40.convertType(src.getWidthElement())); + if (src.hasFramesElement()) + tgt.setFramesElement((org.hl7.fhir.dstu3.model.PositiveIntType) VersionConvertor_30_40.convertType(src.getFramesElement())); + if (src.hasDurationElement()) + tgt.setDurationElement((org.hl7.fhir.dstu3.model.UnsignedIntType) VersionConvertor_30_40.convertType(src.getDurationElement())); if (src.hasContent()) { tgt.setContent(VersionConvertor_30_40.convertAttachment(src.getContent())); } @@ -97,72 +94,42 @@ public class Media30_40 { tgt.setType(codeableConcept); } if (src.hasSubtype()) { - if (src.hasSubtype()) { - tgt.setModality(VersionConvertor_30_40.convertCodeableConcept(src.getSubtype())); - } + tgt.setModality(VersionConvertor_30_40.convertCodeableConcept(src.getSubtype())); } if (src.hasView()) { - if (src.hasView()) { - tgt.setView(VersionConvertor_30_40.convertCodeableConcept(src.getView())); - } + tgt.setView(VersionConvertor_30_40.convertCodeableConcept(src.getView())); } if (src.hasSubject()) { - if (src.hasSubject()) { - tgt.setSubject(VersionConvertor_30_40.convertReference(src.getSubject())); - } + tgt.setSubject(VersionConvertor_30_40.convertReference(src.getSubject())); } if (src.hasContext()) { - if (src.hasContext()) { - tgt.setEncounter(VersionConvertor_30_40.convertReference(src.getContext())); - } + tgt.setEncounter(VersionConvertor_30_40.convertReference(src.getContext())); } if (src.hasOccurrence()) { - if (src.hasOccurrence()) { - tgt.setCreated(VersionConvertor_30_40.convertType(src.getOccurrence())); - } + tgt.setCreated(VersionConvertor_30_40.convertType(src.getOccurrence())); } if (src.hasOperator()) { - if (src.hasOperator()) { - tgt.setOperator(VersionConvertor_30_40.convertReference(src.getOperator())); - } + tgt.setOperator(VersionConvertor_30_40.convertReference(src.getOperator())); } for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getReasonCode()) { tgt.addReasonCode(VersionConvertor_30_40.convertCodeableConcept(t)); } if (src.hasBodySite()) { - if (src.hasBodySite()) { - tgt.setBodySite(VersionConvertor_30_40.convertCodeableConcept(src.getBodySite())); - } + tgt.setBodySite(VersionConvertor_30_40.convertCodeableConcept(src.getBodySite())); } if (src.hasDevice()) { - if (src.hasDevice()) { - tgt.setDevice(VersionConvertor_30_40.convertReference(src.getDevice())); - } - } - if (src.hasHeight()) { - if (src.hasHeight()) { - tgt.setHeight(src.getHeight()); - } - } - if (src.hasWidth()) { - if (src.hasWidth()) { - tgt.setWidth(src.getWidth()); - } - } - if (src.hasFrames()) { - if (src.hasFrames()) { - tgt.setFrames(src.getFrames()); - } - } - if (src.hasDuration()) { - if (src.hasDuration()) { - tgt.setDuration(src.getDuration()); - } + tgt.setDevice(VersionConvertor_30_40.convertReference(src.getDevice())); } + if (src.hasHeightElement()) + tgt.setHeightElement((org.hl7.fhir.r4.model.PositiveIntType) VersionConvertor_30_40.convertType(src.getHeightElement())); + if (src.hasWidthElement()) + tgt.setWidthElement((org.hl7.fhir.r4.model.PositiveIntType) VersionConvertor_30_40.convertType(src.getWidthElement())); + if (src.hasFramesElement()) + tgt.setFramesElement((org.hl7.fhir.r4.model.PositiveIntType) VersionConvertor_30_40.convertType(src.getFramesElement())); + if (src.hasDurationElement()) + tgt.setDurationElement((org.hl7.fhir.r4.model.DecimalType) VersionConvertor_30_40.convertType(src.getDurationElement())); if (src.hasContent()) { - if (src.hasContent()) { - tgt.setContent(VersionConvertor_30_40.convertAttachment(src.getContent())); - } + tgt.setContent(VersionConvertor_30_40.convertAttachment(src.getContent())); } for (org.hl7.fhir.dstu3.model.Annotation t : src.getNote()) { tgt.addNote(VersionConvertor_30_40.convertAnnotation(t)); diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Medication30_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Medication30_40.java index 85fbaff6a..55b085120 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Medication30_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Medication30_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_40; import org.hl7.fhir.convertors.VersionConvertor_30_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Medication30_40 { @@ -54,8 +55,8 @@ public class Medication30_40 { VersionConvertor_30_40.copyElement(src, tgt); if (src.hasItem()) tgt.setItem(VersionConvertor_30_40.convertType(src.getItem())); - if (src.hasIsActive()) - tgt.setIsActive(src.getIsActive()); + if (src.hasIsActiveElement()) + tgt.setIsActiveElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_40.convertType(src.getIsActiveElement())); if (src.hasStrength()) tgt.setAmount(VersionConvertor_30_40.convertRatio(src.getStrength())); return tgt; @@ -68,8 +69,8 @@ public class Medication30_40 { VersionConvertor_30_40.copyElement(src, tgt); if (src.hasItem()) tgt.setItem(VersionConvertor_30_40.convertType(src.getItem())); - if (src.hasIsActive()) - tgt.setIsActive(src.getIsActive()); + if (src.hasIsActiveElement()) + tgt.setIsActiveElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_30_40.convertType(src.getIsActiveElement())); if (src.hasAmount()) tgt.setStrength(VersionConvertor_30_40.convertRatio(src.getAmount())); return tgt; @@ -80,8 +81,8 @@ public class Medication30_40 { return null; org.hl7.fhir.dstu3.model.Medication.MedicationPackageBatchComponent tgt = new org.hl7.fhir.dstu3.model.Medication.MedicationPackageBatchComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasLotNumber()) - tgt.setLotNumber(src.getLotNumber()); + if (src.hasLotNumberElement()) + tgt.setLotNumberElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getLotNumberElement())); if (src.hasExpirationDate()) tgt.setExpirationDateElement(VersionConvertor_30_40.convertDateTime(src.getExpirationDateElement())); return tgt; @@ -92,8 +93,8 @@ public class Medication30_40 { return null; org.hl7.fhir.r4.model.Medication.MedicationBatchComponent tgt = new org.hl7.fhir.r4.model.Medication.MedicationBatchComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasLotNumber()) - tgt.setLotNumber(src.getLotNumber()); + if (src.hasLotNumberElement()) + tgt.setLotNumberElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getLotNumberElement())); if (src.hasExpirationDate()) tgt.setExpirationDateElement(VersionConvertor_30_40.convertDateTime(src.getExpirationDateElement())); return tgt; diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/MedicationAdministration30_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/MedicationAdministration30_40.java index 405298fa1..35ae74696 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/MedicationAdministration30_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/MedicationAdministration30_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_40; import org.hl7.fhir.convertors.VersionConvertor_30_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class MedicationAdministration30_40 { @@ -118,8 +119,8 @@ public class MedicationAdministration30_40 { return null; org.hl7.fhir.r4.model.MedicationAdministration.MedicationAdministrationDosageComponent tgt = new org.hl7.fhir.r4.model.MedicationAdministration.MedicationAdministrationDosageComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasText()) - tgt.setText(src.getText()); + if (src.hasTextElement()) + tgt.setTextElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getTextElement())); if (src.hasSite()) tgt.setSite(VersionConvertor_30_40.convertCodeableConcept(src.getSite())); if (src.hasRoute()) @@ -138,8 +139,8 @@ public class MedicationAdministration30_40 { return null; org.hl7.fhir.dstu3.model.MedicationAdministration.MedicationAdministrationDosageComponent tgt = new org.hl7.fhir.dstu3.model.MedicationAdministration.MedicationAdministrationDosageComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasText()) - tgt.setText(src.getText()); + if (src.hasTextElement()) + tgt.setTextElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getTextElement())); if (src.hasSite()) tgt.setSite(VersionConvertor_30_40.convertCodeableConcept(src.getSite())); if (src.hasRoute()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/MedicationDispense30_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/MedicationDispense30_40.java index 93146df8b..8798d48ae 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/MedicationDispense30_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/MedicationDispense30_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_40; import org.hl7.fhir.convertors.VersionConvertor_30_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class MedicationDispense30_40 { @@ -166,8 +167,8 @@ public class MedicationDispense30_40 { return null; org.hl7.fhir.r4.model.MedicationDispense.MedicationDispenseSubstitutionComponent tgt = new org.hl7.fhir.r4.model.MedicationDispense.MedicationDispenseSubstitutionComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasWasSubstituted()) - tgt.setWasSubstituted(src.getWasSubstituted()); + if (src.hasWasSubstitutedElement()) + tgt.setWasSubstitutedElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_30_40.convertType(src.getWasSubstitutedElement())); if (src.hasType()) tgt.setType(VersionConvertor_30_40.convertCodeableConcept(src.getType())); if (src.hasReason()) { @@ -184,8 +185,8 @@ public class MedicationDispense30_40 { return null; org.hl7.fhir.dstu3.model.MedicationDispense.MedicationDispenseSubstitutionComponent tgt = new org.hl7.fhir.dstu3.model.MedicationDispense.MedicationDispenseSubstitutionComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasWasSubstituted()) - tgt.setWasSubstituted(src.getWasSubstituted()); + if (src.hasWasSubstitutedElement()) + tgt.setWasSubstitutedElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_40.convertType(src.getWasSubstitutedElement())); if (src.hasType()) tgt.setType(VersionConvertor_30_40.convertCodeableConcept(src.getType())); if (src.hasReason()) { diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/MedicationRequest30_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/MedicationRequest30_40.java index a51c38c3f..9d8729e0e 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/MedicationRequest30_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/MedicationRequest30_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_40; import org.hl7.fhir.convertors.VersionConvertor_30_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class MedicationRequest30_40 { @@ -130,8 +131,8 @@ public class MedicationRequest30_40 { VersionConvertor_30_40.copyElement(src, tgt); if (src.hasValidityPeriod()) tgt.setValidityPeriod(VersionConvertor_30_40.convertPeriod(src.getValidityPeriod())); - if (src.hasNumberOfRepeatsAllowed()) - tgt.setNumberOfRepeatsAllowed(src.getNumberOfRepeatsAllowed()); + if (src.hasNumberOfRepeatsAllowedElement()) + tgt.setNumberOfRepeatsAllowedElement((org.hl7.fhir.r4.model.UnsignedIntType) VersionConvertor_30_40.convertType(src.getNumberOfRepeatsAllowedElement())); if (src.hasQuantity()) tgt.setQuantity(VersionConvertor_30_40.convertSimpleQuantity(src.getQuantity())); if (src.hasExpectedSupplyDuration()) @@ -148,8 +149,8 @@ public class MedicationRequest30_40 { VersionConvertor_30_40.copyElement(src, tgt); if (src.hasValidityPeriod()) tgt.setValidityPeriod(VersionConvertor_30_40.convertPeriod(src.getValidityPeriod())); - if (src.hasNumberOfRepeatsAllowed()) - tgt.setNumberOfRepeatsAllowed(src.getNumberOfRepeatsAllowed()); + if (src.hasNumberOfRepeatsAllowedElement()) + tgt.setNumberOfRepeatsAllowedElement((org.hl7.fhir.dstu3.model.PositiveIntType) VersionConvertor_30_40.convertType(src.getNumberOfRepeatsAllowedElement())); if (src.hasQuantity()) tgt.setQuantity(VersionConvertor_30_40.convertSimpleQuantity(src.getQuantity())); if (src.hasExpectedSupplyDuration()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/MedicationStatement30_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/MedicationStatement30_40.java index 7d9fc34d2..14e170ac5 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/MedicationStatement30_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/MedicationStatement30_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_40; import org.hl7.fhir.convertors.VersionConvertor_30_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class MedicationStatement30_40 { diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/MessageDefinition30_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/MessageDefinition30_40.java index a973da45c..8a60d8e63 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/MessageDefinition30_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/MessageDefinition30_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_40; import org.hl7.fhir.convertors.VersionConvertor_30_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class MessageDefinition30_40 { @@ -10,39 +11,39 @@ public class MessageDefinition30_40 { return null; org.hl7.fhir.dstu3.model.MessageDefinition tgt = new org.hl7.fhir.dstu3.model.MessageDefinition(); VersionConvertor_30_40.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_40.convertType(src.getUrlElement())); if (src.hasIdentifier()) tgt.setIdentifier(VersionConvertor_30_40.convertIdentifier(src.getIdentifierFirstRep())); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getNameElement())); + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getTitleElement())); if (src.hasStatus()) tgt.setStatus(VersionConvertor_30_40.convertPublicationStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_40.convertType(src.getExperimentalElement())); if (src.hasDateElement()) tgt.setDateElement(VersionConvertor_30_40.convertDateTime(src.getDateElement())); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact()) tgt.addContact(VersionConvertor_30_40.convertContactDetail(t)); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); if (src.hasUseContext()) { for (org.hl7.fhir.r4.model.UsageContext t : src.getUseContext()) tgt.addUseContext(VersionConvertor_30_40.convertUsageContext(t)); } if (src.hasJurisdiction()) { for (org.hl7.fhir.r4.model.CodeableConcept t : src.getJurisdiction()) tgt.addJurisdiction(VersionConvertor_30_40.convertCodeableConcept(t)); } - if (src.hasPurpose()) - tgt.setPurpose(src.getPurpose()); - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); + if (src.hasPurposeElement()) + tgt.setPurposeElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_40.convertType(src.getPurposeElement())); + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_40.convertType(src.getCopyrightElement())); if (src.hasBase()) tgt.setBase(VersionConvertor_30_40.convertCanonicalToReference(src.getBaseElement())); if (src.hasParent()) { @@ -71,39 +72,39 @@ public class MessageDefinition30_40 { return null; org.hl7.fhir.r4.model.MessageDefinition tgt = new org.hl7.fhir.r4.model.MessageDefinition(); VersionConvertor_30_40.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_30_40.convertType(src.getUrlElement())); if (src.hasIdentifier()) tgt.addIdentifier(VersionConvertor_30_40.convertIdentifier(src.getIdentifier())); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getNameElement())); + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getTitleElement())); if (src.hasStatus()) tgt.setStatus(VersionConvertor_30_40.convertPublicationStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_30_40.convertType(src.getExperimentalElement())); if (src.hasDateElement()) tgt.setDateElement(VersionConvertor_30_40.convertDateTime(src.getDateElement())); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) tgt.addContact(VersionConvertor_30_40.convertContactDetail(t)); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r4.model.MarkdownType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); if (src.hasUseContext()) { for (org.hl7.fhir.dstu3.model.UsageContext t : src.getUseContext()) tgt.addUseContext(VersionConvertor_30_40.convertUsageContext(t)); } if (src.hasJurisdiction()) { for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getJurisdiction()) tgt.addJurisdiction(VersionConvertor_30_40.convertCodeableConcept(t)); } - if (src.hasPurpose()) - tgt.setPurpose(src.getPurpose()); - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); + if (src.hasPurposeElement()) + tgt.setPurposeElement((org.hl7.fhir.r4.model.MarkdownType) VersionConvertor_30_40.convertType(src.getPurposeElement())); + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.r4.model.MarkdownType) VersionConvertor_30_40.convertType(src.getCopyrightElement())); if (src.hasBase()) tgt.setBaseElement(VersionConvertor_30_40.convertReferenceToCanonical(src.getBase())); if (src.hasParent()) { @@ -134,8 +135,8 @@ public class MessageDefinition30_40 { VersionConvertor_30_40.copyElement(src, tgt); if (src.hasMessage()) tgt.setMessage(VersionConvertor_30_40.convertCanonicalToReference(src.getMessageElement())); - if (src.hasSituation()) - tgt.setSituation(src.getSituation()); + if (src.hasSituationElement()) + tgt.setSituationElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_40.convertType(src.getSituationElement())); return tgt; } @@ -146,8 +147,8 @@ public class MessageDefinition30_40 { VersionConvertor_30_40.copyElement(src, tgt); if (src.hasMessage()) tgt.setMessageElement(VersionConvertor_30_40.convertReferenceToCanonical(src.getMessage())); - if (src.hasSituation()) - tgt.setSituation(src.getSituation()); + if (src.hasSituationElement()) + tgt.setSituationElement((org.hl7.fhir.r4.model.MarkdownType) VersionConvertor_30_40.convertType(src.getSituationElement())); return tgt; } @@ -156,14 +157,14 @@ public class MessageDefinition30_40 { return null; org.hl7.fhir.r4.model.MessageDefinition.MessageDefinitionFocusComponent tgt = new org.hl7.fhir.r4.model.MessageDefinition.MessageDefinitionFocusComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasCode()) - tgt.setCode(src.getCode()); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.r4.model.CodeType) VersionConvertor_30_40.convertType(src.getCodeElement())); if (src.hasProfile()) tgt.setProfileElement(VersionConvertor_30_40.convertReferenceToCanonical(src.getProfile())); - if (src.hasMin()) - tgt.setMin(src.getMin()); - if (src.hasMax()) - tgt.setMax(src.getMax()); + if (src.hasMinElement()) + tgt.setMinElement((org.hl7.fhir.r4.model.UnsignedIntType) VersionConvertor_30_40.convertType(src.getMinElement())); + if (src.hasMaxElement()) + tgt.setMaxElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getMaxElement())); return tgt; } @@ -172,14 +173,14 @@ public class MessageDefinition30_40 { return null; org.hl7.fhir.dstu3.model.MessageDefinition.MessageDefinitionFocusComponent tgt = new org.hl7.fhir.dstu3.model.MessageDefinition.MessageDefinitionFocusComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasCode()) - tgt.setCode(src.getCode()); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_30_40.convertType(src.getCodeElement())); if (src.hasProfile()) tgt.setProfile(VersionConvertor_30_40.convertCanonicalToReference(src.getProfileElement())); - if (src.hasMin()) - tgt.setMin(src.getMin()); - if (src.hasMax()) - tgt.setMax(src.getMax()); + if (src.hasMinElement()) + tgt.setMinElement((org.hl7.fhir.dstu3.model.UnsignedIntType) VersionConvertor_30_40.convertType(src.getMinElement())); + if (src.hasMaxElement()) + tgt.setMaxElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getMaxElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/MessageHeader30_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/MessageHeader30_40.java index 965aef3b6..cb93cb82e 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/MessageHeader30_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/MessageHeader30_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_40; import org.hl7.fhir.convertors.VersionConvertor_30_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class MessageHeader30_40 { @@ -10,12 +11,12 @@ public class MessageHeader30_40 { return null; org.hl7.fhir.dstu3.model.MessageHeader.MessageDestinationComponent tgt = new org.hl7.fhir.dstu3.model.MessageHeader.MessageDestinationComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getNameElement())); if (src.hasTarget()) tgt.setTarget(VersionConvertor_30_40.convertReference(src.getTarget())); - if (src.hasEndpoint()) - tgt.setEndpoint(src.getEndpoint()); + if (src.hasEndpointElement()) + tgt.setEndpointElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_40.convertType(src.getEndpointElement())); return tgt; } @@ -24,12 +25,12 @@ public class MessageHeader30_40 { return null; org.hl7.fhir.r4.model.MessageHeader.MessageDestinationComponent tgt = new org.hl7.fhir.r4.model.MessageHeader.MessageDestinationComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getNameElement())); if (src.hasTarget()) tgt.setTarget(VersionConvertor_30_40.convertReference(src.getTarget())); - if (src.hasEndpoint()) - tgt.setEndpoint(src.getEndpoint()); + if (src.hasEndpointElement()) + tgt.setEndpointElement((org.hl7.fhir.r4.model.UrlType) VersionConvertor_30_40.convertType(src.getEndpointElement())); return tgt; } @@ -98,8 +99,8 @@ public class MessageHeader30_40 { return null; org.hl7.fhir.r4.model.MessageHeader.MessageHeaderResponseComponent tgt = new org.hl7.fhir.r4.model.MessageHeader.MessageHeaderResponseComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasIdentifier()) - tgt.setIdentifier(src.getIdentifier()); + if (src.hasIdentifierElement()) + tgt.setIdentifierElement((org.hl7.fhir.r4.model.IdType) VersionConvertor_30_40.convertType(src.getIdentifierElement())); if (src.hasCode()) tgt.setCode(convertResponseType(src.getCode())); if (src.hasDetails()) @@ -112,8 +113,8 @@ public class MessageHeader30_40 { return null; org.hl7.fhir.dstu3.model.MessageHeader.MessageHeaderResponseComponent tgt = new org.hl7.fhir.dstu3.model.MessageHeader.MessageHeaderResponseComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasIdentifier()) - tgt.setIdentifier(src.getIdentifier()); + if (src.hasIdentifierElement()) + tgt.setIdentifierElement((org.hl7.fhir.dstu3.model.IdType) VersionConvertor_30_40.convertType(src.getIdentifierElement())); if (src.hasCode()) tgt.setCode(convertResponseType(src.getCode())); if (src.hasDetails()) @@ -126,16 +127,16 @@ public class MessageHeader30_40 { return null; org.hl7.fhir.r4.model.MessageHeader.MessageSourceComponent tgt = new org.hl7.fhir.r4.model.MessageHeader.MessageSourceComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasSoftware()) - tgt.setSoftware(src.getSoftware()); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getNameElement())); + if (src.hasSoftwareElement()) + tgt.setSoftwareElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getSoftwareElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getVersionElement())); if (src.hasContact()) tgt.setContact(VersionConvertor_30_40.convertContactPoint(src.getContact())); - if (src.hasEndpoint()) - tgt.setEndpoint(src.getEndpoint()); + if (src.hasEndpointElement()) + tgt.setEndpointElement((org.hl7.fhir.r4.model.UrlType) VersionConvertor_30_40.convertType(src.getEndpointElement())); return tgt; } @@ -144,16 +145,16 @@ public class MessageHeader30_40 { return null; org.hl7.fhir.dstu3.model.MessageHeader.MessageSourceComponent tgt = new org.hl7.fhir.dstu3.model.MessageHeader.MessageSourceComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasSoftware()) - tgt.setSoftware(src.getSoftware()); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getNameElement())); + if (src.hasSoftwareElement()) + tgt.setSoftwareElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getSoftwareElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getVersionElement())); if (src.hasContact()) tgt.setContact(VersionConvertor_30_40.convertContactPoint(src.getContact())); - if (src.hasEndpoint()) - tgt.setEndpoint(src.getEndpoint()); + if (src.hasEndpointElement()) + tgt.setEndpointElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_40.convertType(src.getEndpointElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/NamingSystem30_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/NamingSystem30_40.java index 8b06df20c..521499d99 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/NamingSystem30_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/NamingSystem30_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_40; import org.hl7.fhir.convertors.VersionConvertor_30_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class NamingSystem30_40 { @@ -10,33 +11,33 @@ public class NamingSystem30_40 { return null; org.hl7.fhir.dstu3.model.NamingSystem tgt = new org.hl7.fhir.dstu3.model.NamingSystem(); VersionConvertor_30_40.copyDomainResource(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getNameElement())); if (src.hasStatus()) tgt.setStatus(VersionConvertor_30_40.convertPublicationStatus(src.getStatus())); if (src.hasKind()) tgt.setKind(convertNamingSystemType(src.getKind())); if (src.hasDateElement()) tgt.setDateElement(VersionConvertor_30_40.convertDateTime(src.getDateElement())); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact()) tgt.addContact(VersionConvertor_30_40.convertContactDetail(t)); } - if (src.hasResponsible()) - tgt.setResponsible(src.getResponsible()); + if (src.hasResponsibleElement()) + tgt.setResponsibleElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getResponsibleElement())); if (src.hasType()) tgt.setType(VersionConvertor_30_40.convertCodeableConcept(src.getType())); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); if (src.hasUseContext()) { for (org.hl7.fhir.r4.model.UsageContext t : src.getUseContext()) tgt.addUseContext(VersionConvertor_30_40.convertUsageContext(t)); } if (src.hasJurisdiction()) { for (org.hl7.fhir.r4.model.CodeableConcept t : src.getJurisdiction()) tgt.addJurisdiction(VersionConvertor_30_40.convertCodeableConcept(t)); } - if (src.hasUsage()) - tgt.setUsage(src.getUsage()); + if (src.hasUsageElement()) + tgt.setUsageElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getUsageElement())); if (src.hasUniqueId()) { for (org.hl7.fhir.r4.model.NamingSystem.NamingSystemUniqueIdComponent t : src.getUniqueId()) tgt.addUniqueId(convertNamingSystemUniqueIdComponent(t)); } @@ -48,33 +49,33 @@ public class NamingSystem30_40 { return null; org.hl7.fhir.r4.model.NamingSystem tgt = new org.hl7.fhir.r4.model.NamingSystem(); VersionConvertor_30_40.copyDomainResource(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getNameElement())); if (src.hasStatus()) tgt.setStatus(VersionConvertor_30_40.convertPublicationStatus(src.getStatus())); if (src.hasKind()) tgt.setKind(convertNamingSystemType(src.getKind())); if (src.hasDateElement()) tgt.setDateElement(VersionConvertor_30_40.convertDateTime(src.getDateElement())); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) tgt.addContact(VersionConvertor_30_40.convertContactDetail(t)); } - if (src.hasResponsible()) - tgt.setResponsible(src.getResponsible()); + if (src.hasResponsibleElement()) + tgt.setResponsibleElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getResponsibleElement())); if (src.hasType()) tgt.setType(VersionConvertor_30_40.convertCodeableConcept(src.getType())); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r4.model.MarkdownType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); if (src.hasUseContext()) { for (org.hl7.fhir.dstu3.model.UsageContext t : src.getUseContext()) tgt.addUseContext(VersionConvertor_30_40.convertUsageContext(t)); } if (src.hasJurisdiction()) { for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getJurisdiction()) tgt.addJurisdiction(VersionConvertor_30_40.convertCodeableConcept(t)); } - if (src.hasUsage()) - tgt.setUsage(src.getUsage()); + if (src.hasUsageElement()) + tgt.setUsageElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getUsageElement())); if (src.hasUniqueId()) { for (org.hl7.fhir.dstu3.model.NamingSystem.NamingSystemUniqueIdComponent t : src.getUniqueId()) tgt.addUniqueId(convertNamingSystemUniqueIdComponent(t)); } @@ -152,12 +153,12 @@ public class NamingSystem30_40 { VersionConvertor_30_40.copyElement(src, tgt); if (src.hasType()) tgt.setType(convertNamingSystemIdentifierType(src.getType())); - if (src.hasValue()) - tgt.setValue(src.getValue()); - if (src.hasPreferred()) - tgt.setPreferred(src.getPreferred()); - if (src.hasComment()) - tgt.setComment(src.getComment()); + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getValueElement())); + if (src.hasPreferredElement()) + tgt.setPreferredElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_40.convertType(src.getPreferredElement())); + if (src.hasCommentElement()) + tgt.setCommentElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getCommentElement())); if (src.hasPeriod()) tgt.setPeriod(VersionConvertor_30_40.convertPeriod(src.getPeriod())); return tgt; @@ -170,12 +171,12 @@ public class NamingSystem30_40 { VersionConvertor_30_40.copyElement(src, tgt); if (src.hasType()) tgt.setType(convertNamingSystemIdentifierType(src.getType())); - if (src.hasValue()) - tgt.setValue(src.getValue()); - if (src.hasPreferred()) - tgt.setPreferred(src.getPreferred()); - if (src.hasComment()) - tgt.setComment(src.getComment()); + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getValueElement())); + if (src.hasPreferredElement()) + tgt.setPreferredElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_30_40.convertType(src.getPreferredElement())); + if (src.hasCommentElement()) + tgt.setCommentElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getCommentElement())); if (src.hasPeriod()) tgt.setPeriod(VersionConvertor_30_40.convertPeriod(src.getPeriod())); return tgt; diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Observation30_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Observation30_40.java index dd01c0c51..4858d837f 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Observation30_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Observation30_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_40; import org.hl7.fhir.convertors.VersionConvertor_30_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Observation30_40 { @@ -177,8 +178,8 @@ public class Observation30_40 { } if (src.hasAge()) tgt.setAge(VersionConvertor_30_40.convertRange(src.getAge())); - if (src.hasText()) - tgt.setText(src.getText()); + if (src.hasTextElement()) + tgt.setTextElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getTextElement())); return tgt; } @@ -198,8 +199,8 @@ public class Observation30_40 { } if (src.hasAge()) tgt.setAge(VersionConvertor_30_40.convertRange(src.getAge())); - if (src.hasText()) - tgt.setText(src.getText()); + if (src.hasTextElement()) + tgt.setTextElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getTextElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/OperationDefinition30_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/OperationDefinition30_40.java index 0cee2e4c1..faa95b797 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/OperationDefinition30_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/OperationDefinition30_40.java @@ -4,6 +4,7 @@ import org.hl7.fhir.convertors.VersionConvertorConstants; import org.hl7.fhir.convertors.VersionConvertor_30_40; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r4.model.Type; +import java.util.Collections; public class OperationDefinition30_40 { @@ -12,52 +13,52 @@ public class OperationDefinition30_40 { return null; org.hl7.fhir.r4.model.OperationDefinition tgt = new org.hl7.fhir.r4.model.OperationDefinition(); VersionConvertor_30_40.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_30_40.convertType(src.getUrlElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getNameElement())); if (src.hasStatus()) tgt.setStatus(VersionConvertor_30_40.convertPublicationStatus(src.getStatus())); if (src.hasKind()) tgt.setKind(convertOperationKind(src.getKind())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_30_40.convertType(src.getExperimentalElement())); if (src.hasDateElement()) tgt.setDateElement(VersionConvertor_30_40.convertDateTime(src.getDateElement())); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) tgt.addContact(VersionConvertor_30_40.convertContactDetail(t)); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r4.model.MarkdownType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); if (src.hasUseContext()) { for (org.hl7.fhir.dstu3.model.UsageContext t : src.getUseContext()) tgt.addUseContext(VersionConvertor_30_40.convertUsageContext(t)); } if (src.hasJurisdiction()) { for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getJurisdiction()) tgt.addJurisdiction(VersionConvertor_30_40.convertCodeableConcept(t)); } - if (src.hasPurpose()) - tgt.setPurpose(src.getPurpose()); + if (src.hasPurposeElement()) + tgt.setPurposeElement((org.hl7.fhir.r4.model.MarkdownType) VersionConvertor_30_40.convertType(src.getPurposeElement())); if (src.hasIdempotent()) tgt.setAffectsState(!src.getIdempotent()); - if (src.hasCode()) - tgt.setCode(src.getCode()); - if (src.hasComment()) - tgt.setComment(src.getComment()); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.r4.model.CodeType) VersionConvertor_30_40.convertType(src.getCodeElement())); + if (src.hasCommentElement()) + tgt.setCommentElement((org.hl7.fhir.r4.model.MarkdownType) VersionConvertor_30_40.convertType(src.getCommentElement())); if (src.hasBase()) tgt.setBaseElement(VersionConvertor_30_40.convertReferenceToCanonical(src.getBase())); if (src.hasResource()) { for (org.hl7.fhir.dstu3.model.CodeType t : src.getResource()) tgt.addResource(t.getValue()); } - if (src.hasSystem()) - tgt.setSystem(src.getSystem()); - if (src.hasType()) - tgt.setType(src.getType()); - if (src.hasInstance()) - tgt.setInstance(src.getInstance()); + if (src.hasSystemElement()) + tgt.setSystemElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_30_40.convertType(src.getSystemElement())); + if (src.hasTypeElement()) + tgt.setTypeElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_30_40.convertType(src.getTypeElement())); + if (src.hasInstanceElement()) + tgt.setInstanceElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_30_40.convertType(src.getInstanceElement())); if (src.hasParameter()) { for (org.hl7.fhir.dstu3.model.OperationDefinition.OperationDefinitionParameterComponent t : src.getParameter()) tgt.addParameter(convertOperationDefinitionParameterComponent(t)); } @@ -72,52 +73,52 @@ public class OperationDefinition30_40 { return null; org.hl7.fhir.dstu3.model.OperationDefinition tgt = new org.hl7.fhir.dstu3.model.OperationDefinition(); VersionConvertor_30_40.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_40.convertType(src.getUrlElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getNameElement())); if (src.hasStatus()) tgt.setStatus(VersionConvertor_30_40.convertPublicationStatus(src.getStatus())); if (src.hasKind()) tgt.setKind(convertOperationKind(src.getKind())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_40.convertType(src.getExperimentalElement())); if (src.hasDateElement()) tgt.setDateElement(VersionConvertor_30_40.convertDateTime(src.getDateElement())); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact()) tgt.addContact(VersionConvertor_30_40.convertContactDetail(t)); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); if (src.hasUseContext()) { for (org.hl7.fhir.r4.model.UsageContext t : src.getUseContext()) tgt.addUseContext(VersionConvertor_30_40.convertUsageContext(t)); } if (src.hasJurisdiction()) { for (org.hl7.fhir.r4.model.CodeableConcept t : src.getJurisdiction()) tgt.addJurisdiction(VersionConvertor_30_40.convertCodeableConcept(t)); } - if (src.hasPurpose()) - tgt.setPurpose(src.getPurpose()); + if (src.hasPurposeElement()) + tgt.setPurposeElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_40.convertType(src.getPurposeElement())); if (src.hasAffectsState()) tgt.setIdempotent(!src.getAffectsState()); - if (src.hasCode()) - tgt.setCode(src.getCode()); - if (src.hasComment()) - tgt.setComment(src.getComment()); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_30_40.convertType(src.getCodeElement())); + if (src.hasCommentElement()) + tgt.setCommentElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getCommentElement())); if (src.hasBase()) tgt.setBase(VersionConvertor_30_40.convertCanonicalToReference(src.getBaseElement())); if (src.hasResource()) { for (org.hl7.fhir.r4.model.CodeType t : src.getResource()) tgt.addResource(t.getValue()); } - if (src.hasSystem()) - tgt.setSystem(src.getSystem()); - if (src.hasType()) - tgt.setType(src.getType()); - if (src.hasInstance()) - tgt.setInstance(src.getInstance()); + if (src.hasSystemElement()) + tgt.setSystemElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_40.convertType(src.getSystemElement())); + if (src.hasTypeElement()) + tgt.setTypeElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_40.convertType(src.getTypeElement())); + if (src.hasInstanceElement()) + tgt.setInstanceElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_40.convertType(src.getInstanceElement())); if (src.hasParameter()) { for (org.hl7.fhir.r4.model.OperationDefinition.OperationDefinitionParameterComponent t : src.getParameter()) tgt.addParameter(convertOperationDefinitionParameterComponent(t)); } @@ -135,8 +136,8 @@ public class OperationDefinition30_40 { if (src.hasParameterName()) { for (org.hl7.fhir.r4.model.StringType t : src.getParameterName()) tgt.addParameterName(t.getValue()); } - if (src.hasComment()) - tgt.setComment(src.getComment()); + if (src.hasCommentElement()) + tgt.setCommentElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getCommentElement())); return tgt; } @@ -148,8 +149,8 @@ public class OperationDefinition30_40 { if (src.hasParameterName()) { for (org.hl7.fhir.dstu3.model.StringType t : src.getParameterName()) tgt.addParameterName(t.getValue()); } - if (src.hasComment()) - tgt.setComment(src.getComment()); + if (src.hasCommentElement()) + tgt.setCommentElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getCommentElement())); return tgt; } @@ -193,18 +194,18 @@ public class OperationDefinition30_40 { return null; org.hl7.fhir.dstu3.model.OperationDefinition.OperationDefinitionParameterComponent tgt = new org.hl7.fhir.dstu3.model.OperationDefinition.OperationDefinitionParameterComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_30_40.convertType(src.getNameElement())); if (src.hasUse()) tgt.setUse(convertOperationParameterUse(src.getUse())); - if (src.hasMin()) - tgt.setMin(src.getMin()); - if (src.hasMax()) - tgt.setMax(src.getMax()); - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); - if (src.hasType()) - tgt.setType(src.getType()); + if (src.hasMinElement()) + tgt.setMinElement((org.hl7.fhir.dstu3.model.IntegerType) VersionConvertor_30_40.convertType(src.getMinElement())); + if (src.hasMaxElement()) + tgt.setMaxElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getMaxElement())); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getDocumentationElement())); + if (src.hasTypeElement()) + tgt.setTypeElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_30_40.convertType(src.getTypeElement())); if (src.hasSearchType()) tgt.setSearchType(VersionConvertor_30_40.convertSearchParamType(src.getSearchType())); if (src.hasTargetProfile()) { @@ -223,18 +224,18 @@ public class OperationDefinition30_40 { return null; org.hl7.fhir.r4.model.OperationDefinition.OperationDefinitionParameterComponent tgt = new org.hl7.fhir.r4.model.OperationDefinition.OperationDefinitionParameterComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.CodeType) VersionConvertor_30_40.convertType(src.getNameElement())); if (src.hasUse()) tgt.setUse(convertOperationParameterUse(src.getUse())); - if (src.hasMin()) - tgt.setMin(src.getMin()); - if (src.hasMax()) - tgt.setMax(src.getMax()); - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); - if (src.hasType()) - tgt.setType(src.getType()); + if (src.hasMinElement()) + tgt.setMinElement((org.hl7.fhir.r4.model.IntegerType) VersionConvertor_30_40.convertType(src.getMinElement())); + if (src.hasMaxElement()) + tgt.setMaxElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getMaxElement())); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getDocumentationElement())); + if (src.hasTypeElement()) + tgt.setTypeElement((org.hl7.fhir.r4.model.CodeType) VersionConvertor_30_40.convertType(src.getTypeElement())); if (src.hasSearchType()) tgt.setSearchType(VersionConvertor_30_40.convertSearchParamType(src.getSearchType())); if (src.hasProfile()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/OperationOutcome30_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/OperationOutcome30_40.java index e480014b9..05e75ec1b 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/OperationOutcome30_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/OperationOutcome30_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_40; import org.hl7.fhir.convertors.VersionConvertor_30_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class OperationOutcome30_40 { @@ -206,8 +207,8 @@ public class OperationOutcome30_40 { tgt.setCode(convertIssueType(src.getCode())); if (src.hasDetails()) tgt.setDetails(VersionConvertor_30_40.convertCodeableConcept(src.getDetails())); - if (src.hasDiagnostics()) - tgt.setDiagnostics(src.getDiagnostics()); + if (src.hasDiagnosticsElement()) + tgt.setDiagnosticsElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getDiagnosticsElement())); if (src.hasLocation()) { for (org.hl7.fhir.r4.model.StringType t : src.getLocation()) tgt.addLocation(t.getValue()); } @@ -228,8 +229,8 @@ public class OperationOutcome30_40 { tgt.setCode(convertIssueType(src.getCode())); if (src.hasDetails()) tgt.setDetails(VersionConvertor_30_40.convertCodeableConcept(src.getDetails())); - if (src.hasDiagnostics()) - tgt.setDiagnostics(src.getDiagnostics()); + if (src.hasDiagnosticsElement()) + tgt.setDiagnosticsElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getDiagnosticsElement())); if (src.hasLocation()) { for (org.hl7.fhir.dstu3.model.StringType t : src.getLocation()) tgt.addLocation(t.getValue()); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Organization30_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Organization30_40.java index c2f2f6cd8..a460ef19d 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Organization30_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Organization30_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_40; import org.hl7.fhir.convertors.VersionConvertor_30_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Organization30_40 { @@ -13,13 +14,13 @@ public class Organization30_40 { if (src.hasIdentifier()) { for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_30_40.convertIdentifier(t)); } - if (src.hasActive()) - tgt.setActive(src.getActive()); + if (src.hasActiveElement()) + tgt.setActiveElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_40.convertType(src.getActiveElement())); if (src.hasType()) { for (org.hl7.fhir.r4.model.CodeableConcept t : src.getType()) tgt.addType(VersionConvertor_30_40.convertCodeableConcept(t)); } - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getNameElement())); if (src.hasAlias()) { for (org.hl7.fhir.r4.model.StringType t : src.getAlias()) tgt.addAlias(t.getValue()); } @@ -48,13 +49,13 @@ public class Organization30_40 { if (src.hasIdentifier()) { for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_30_40.convertIdentifier(t)); } - if (src.hasActive()) - tgt.setActive(src.getActive()); + if (src.hasActiveElement()) + tgt.setActiveElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_30_40.convertType(src.getActiveElement())); if (src.hasType()) { for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getType()) tgt.addType(VersionConvertor_30_40.convertCodeableConcept(t)); } - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getNameElement())); if (src.hasAlias()) { for (org.hl7.fhir.dstu3.model.StringType t : src.getAlias()) tgt.addAlias(t.getValue()); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Parameters30_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Parameters30_40.java index 0e3300d2c..95e4f0733 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Parameters30_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Parameters30_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_40; import org.hl7.fhir.convertors.VersionConvertor_30_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Parameters30_40 { @@ -32,8 +33,8 @@ public class Parameters30_40 { return null; org.hl7.fhir.dstu3.model.Parameters.ParametersParameterComponent tgt = new org.hl7.fhir.dstu3.model.Parameters.ParametersParameterComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getNameElement())); if (src.hasValue()) tgt.setValue(VersionConvertor_30_40.convertType(src.getValue())); if (src.hasResource()) @@ -49,8 +50,8 @@ public class Parameters30_40 { return null; org.hl7.fhir.r4.model.Parameters.ParametersParameterComponent tgt = new org.hl7.fhir.r4.model.Parameters.ParametersParameterComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getNameElement())); if (src.hasValue()) tgt.setValue(VersionConvertor_30_40.convertType(src.getValue())); if (src.hasResource()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Patient30_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Patient30_40.java index 45dbaff03..d8ba89a15 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Patient30_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Patient30_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_40; import org.hl7.fhir.convertors.VersionConvertor_30_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Patient30_40 { @@ -124,8 +125,8 @@ public class Patient30_40 { if (src.hasIdentifier()) { for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_30_40.convertIdentifier(t)); } - if (src.hasActive()) - tgt.setActive(src.getActive()); + if (src.hasActiveElement()) + tgt.setActiveElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_40.convertType(src.getActiveElement())); if (src.hasName()) { for (org.hl7.fhir.r4.model.HumanName t : src.getName()) tgt.addName(VersionConvertor_30_40.convertHumanName(t)); } @@ -175,8 +176,8 @@ public class Patient30_40 { if (src.hasIdentifier()) { for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_30_40.convertIdentifier(t)); } - if (src.hasActive()) - tgt.setActive(src.getActive()); + if (src.hasActiveElement()) + tgt.setActiveElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_30_40.convertType(src.getActiveElement())); if (src.hasName()) { for (org.hl7.fhir.dstu3.model.HumanName t : src.getName()) tgt.addName(VersionConvertor_30_40.convertHumanName(t)); } @@ -225,8 +226,8 @@ public class Patient30_40 { VersionConvertor_30_40.copyElement(src, tgt); if (src.hasLanguage()) tgt.setLanguage(VersionConvertor_30_40.convertCodeableConcept(src.getLanguage())); - if (src.hasPreferred()) - tgt.setPreferred(src.getPreferred()); + if (src.hasPreferredElement()) + tgt.setPreferredElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_40.convertType(src.getPreferredElement())); return tgt; } @@ -237,8 +238,8 @@ public class Patient30_40 { VersionConvertor_30_40.copyElement(src, tgt); if (src.hasLanguage()) tgt.setLanguage(VersionConvertor_30_40.convertCodeableConcept(src.getLanguage())); - if (src.hasPreferred()) - tgt.setPreferred(src.getPreferred()); + if (src.hasPreferredElement()) + tgt.setPreferredElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_30_40.convertType(src.getPreferredElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/PaymentNotice30_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/PaymentNotice30_40.java index 8da276467..50a6c9d27 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/PaymentNotice30_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/PaymentNotice30_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_40; import org.hl7.fhir.convertors.VersionConvertor_30_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class PaymentNotice30_40 { diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Person30_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Person30_40.java index 7d17b4974..c5084de1a 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Person30_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Person30_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_40; import org.hl7.fhir.convertors.VersionConvertor_30_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Person30_40 { @@ -64,8 +65,8 @@ public class Person30_40 { tgt.setPhoto(VersionConvertor_30_40.convertAttachment(src.getPhoto())); if (src.hasManagingOrganization()) tgt.setManagingOrganization(VersionConvertor_30_40.convertReference(src.getManagingOrganization())); - if (src.hasActive()) - tgt.setActive(src.getActive()); + if (src.hasActiveElement()) + tgt.setActiveElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_30_40.convertType(src.getActiveElement())); if (src.hasLink()) { for (org.hl7.fhir.dstu3.model.Person.PersonLinkComponent t : src.getLink()) tgt.addLink(convertPersonLinkComponent(t)); } @@ -97,8 +98,8 @@ public class Person30_40 { tgt.setPhoto(VersionConvertor_30_40.convertAttachment(src.getPhoto())); if (src.hasManagingOrganization()) tgt.setManagingOrganization(VersionConvertor_30_40.convertReference(src.getManagingOrganization())); - if (src.hasActive()) - tgt.setActive(src.getActive()); + if (src.hasActiveElement()) + tgt.setActiveElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_40.convertType(src.getActiveElement())); if (src.hasLink()) { for (org.hl7.fhir.r4.model.Person.PersonLinkComponent t : src.getLink()) tgt.addLink(convertPersonLinkComponent(t)); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/PlanDefinition30_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/PlanDefinition30_40.java index 5a1e59a92..8ef741a8e 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/PlanDefinition30_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/PlanDefinition30_40.java @@ -4,6 +4,10 @@ import org.hl7.fhir.convertors.VersionConvertor_30_40; import org.hl7.fhir.dstu3.model.ContactDetail; import org.hl7.fhir.dstu3.model.Contributor.ContributorType; import org.hl7.fhir.exceptions.FHIRException; +import org.hl7.fhir.r4.model.CodeType; +import org.hl7.fhir.r4.model.StringType; + +import java.util.Collections; public class PlanDefinition30_40 { @@ -280,37 +284,37 @@ public class PlanDefinition30_40 { return null; org.hl7.fhir.r4.model.PlanDefinition tgt = new org.hl7.fhir.r4.model.PlanDefinition(); VersionConvertor_30_40.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_30_40.convertType(src.getUrlElement())); if (src.hasIdentifier()) { for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_30_40.convertIdentifier(t)); } - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getNameElement())); + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getTitleElement())); if (src.hasType()) tgt.setType(VersionConvertor_30_40.convertCodeableConcept(src.getType())); if (src.hasStatus()) tgt.setStatus(VersionConvertor_30_40.convertPublicationStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_30_40.convertType(src.getExperimentalElement())); if (src.hasDateElement()) tgt.setDateElement(VersionConvertor_30_40.convertDateTime(src.getDateElement())); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - if (src.hasPurpose()) - tgt.setPurpose(src.getPurpose()); - if (src.hasUsage()) - tgt.setUsage(src.getUsage()); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getPublisherElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r4.model.MarkdownType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); + if (src.hasPurposeElement()) + tgt.setPurposeElement((org.hl7.fhir.r4.model.MarkdownType) VersionConvertor_30_40.convertType(src.getPurposeElement())); + if (src.hasUsageElement()) + tgt.setUsageElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getUsageElement())); if (src.hasApprovalDate()) - tgt.setApprovalDateElement(VersionConvertor_30_40.convertDate(src.getApprovalDateElement())); + tgt.setApprovalDateElement(VersionConvertor_30_40.convertDate(src.getApprovalDateElement())); if (src.hasLastReviewDate()) - tgt.setLastReviewDateElement(VersionConvertor_30_40.convertDate(src.getLastReviewDateElement())); + tgt.setLastReviewDateElement(VersionConvertor_30_40.convertDate(src.getLastReviewDateElement())); if (src.hasEffectivePeriod()) tgt.setEffectivePeriod(VersionConvertor_30_40.convertPeriod(src.getEffectivePeriod())); if (src.hasUseContext()) { @@ -335,8 +339,8 @@ public class PlanDefinition30_40 { if (src.hasContact()) { for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) tgt.addContact(VersionConvertor_30_40.convertContactDetail(t)); } - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.r4.model.MarkdownType) VersionConvertor_30_40.convertType(src.getCopyrightElement())); if (src.hasRelatedArtifact()) { for (org.hl7.fhir.dstu3.model.RelatedArtifact t : src.getRelatedArtifact()) tgt.addRelatedArtifact(VersionConvertor_30_40.convertRelatedArtifact(t)); } @@ -357,37 +361,37 @@ public class PlanDefinition30_40 { return null; org.hl7.fhir.dstu3.model.PlanDefinition tgt = new org.hl7.fhir.dstu3.model.PlanDefinition(); VersionConvertor_30_40.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_40.convertType(src.getUrlElement())); if (src.hasIdentifier()) { for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_30_40.convertIdentifier(t)); } - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getNameElement())); + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getTitleElement())); if (src.hasType()) tgt.setType(VersionConvertor_30_40.convertCodeableConcept(src.getType())); if (src.hasStatus()) tgt.setStatus(VersionConvertor_30_40.convertPublicationStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_40.convertType(src.getExperimentalElement())); if (src.hasDateElement()) tgt.setDateElement(VersionConvertor_30_40.convertDateTime(src.getDateElement())); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - if (src.hasPurpose()) - tgt.setPurpose(src.getPurpose()); - if (src.hasUsage()) - tgt.setUsage(src.getUsage()); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getPublisherElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); + if (src.hasPurposeElement()) + tgt.setPurposeElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_40.convertType(src.getPurposeElement())); + if (src.hasUsageElement()) + tgt.setUsageElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getUsageElement())); if (src.hasApprovalDate()) - tgt.setApprovalDateElement(VersionConvertor_30_40.convertDate(src.getApprovalDateElement())); + tgt.setApprovalDateElement(VersionConvertor_30_40.convertDate(src.getApprovalDateElement())); if (src.hasLastReviewDate()) - tgt.setLastReviewDateElement(VersionConvertor_30_40.convertDate(src.getLastReviewDateElement())); + tgt.setLastReviewDateElement(VersionConvertor_30_40.convertDate(src.getLastReviewDateElement())); if (src.hasEffectivePeriod()) tgt.setEffectivePeriod(VersionConvertor_30_40.convertPeriod(src.getEffectivePeriod())); if (src.hasUseContext()) { @@ -426,8 +430,8 @@ public class PlanDefinition30_40 { if (src.hasContact()) { for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact()) tgt.addContact(VersionConvertor_30_40.convertContactDetail(t)); } - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_40.convertType(src.getCopyrightElement())); if (src.hasRelatedArtifact()) { for (org.hl7.fhir.r4.model.RelatedArtifact t : src.getRelatedArtifact()) tgt.addRelatedArtifact(VersionConvertor_30_40.convertRelatedArtifact(t)); } @@ -450,12 +454,12 @@ public class PlanDefinition30_40 { VersionConvertor_30_40.copyElement(src, tgt); if (src.hasLabel()) tgt.setPrefix(src.getLabel()); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - if (src.hasTextEquivalent()) - tgt.setTextEquivalent(src.getTextEquivalent()); + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getTitleElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); + if (src.hasTextEquivalentElement()) + tgt.setTextEquivalentElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getTextEquivalentElement())); if (src.hasCode()) { for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getCode()) tgt.addCode(VersionConvertor_30_40.convertCodeableConcept(t)); } @@ -520,12 +524,12 @@ public class PlanDefinition30_40 { VersionConvertor_30_40.copyElement(src, tgt); if (src.hasPrefix()) tgt.setLabel(src.getPrefix()); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - if (src.hasTextEquivalent()) - tgt.setTextEquivalent(src.getTextEquivalent()); + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getTitleElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); + if (src.hasTextEquivalentElement()) + tgt.setTextEquivalentElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getTextEquivalentElement())); if (src.hasCode()) { for (org.hl7.fhir.r4.model.CodeableConcept t : src.getCode()) tgt.addCode(VersionConvertor_30_40.convertCodeableConcept(t)); } @@ -590,12 +594,12 @@ public class PlanDefinition30_40 { VersionConvertor_30_40.copyElement(src, tgt); if (src.hasKind()) tgt.setKind(convertActionConditionKind(src.getKind())); - if (src.hasDescription()) - tgt.getExpression().setDescription(src.getDescription()); - if (src.hasLanguage()) - tgt.getExpression().setLanguage(src.getLanguage()); - if (src.hasExpression()) - tgt.getExpression().setExpression(src.getExpression()); + if (src.hasDescriptionElement()) + tgt.getExpression().setDescriptionElement((StringType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); + if (src.hasLanguageElement()) + tgt.getExpression().setLanguageElement((CodeType) VersionConvertor_30_40.convertType(src.getLanguageElement())); + if (src.hasExpressionElement()) + tgt.getExpression().setExpressionElement((StringType) VersionConvertor_30_40.convertType(src.getExpressionElement())); return tgt; } @@ -606,12 +610,12 @@ public class PlanDefinition30_40 { VersionConvertor_30_40.copyElement(src, tgt); if (src.hasKind()) tgt.setKind(convertActionConditionKind(src.getKind())); - if (src.getExpression().hasDescription()) - tgt.setDescription(src.getExpression().getDescription()); - if (src.getExpression().hasLanguage()) - tgt.setLanguage(src.getExpression().getLanguage()); - if (src.getExpression().hasExpression()) - tgt.setExpression(src.getExpression().getExpression()); + if (src.getExpression().hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getExpression().getDescriptionElement())); + if (src.getExpression().hasLanguageElement()) + tgt.setLanguageElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getExpression().getLanguageElement())); + if (src.getExpression().hasExpressionElement()) + tgt.setExpressionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getExpression().getExpressionElement())); return tgt; } @@ -620,14 +624,14 @@ public class PlanDefinition30_40 { return null; org.hl7.fhir.r4.model.PlanDefinition.PlanDefinitionActionDynamicValueComponent tgt = new org.hl7.fhir.r4.model.PlanDefinition.PlanDefinitionActionDynamicValueComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasDescription()) - tgt.getExpression().setDescription(src.getDescription()); - if (src.hasPath()) - tgt.setPath(src.getPath()); - if (src.hasLanguage()) - tgt.getExpression().setLanguage(src.getLanguage()); - if (src.hasExpression()) - tgt.getExpression().setExpression(src.getExpression()); + if (src.hasDescriptionElement()) + tgt.getExpression().setDescriptionElement((StringType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); + if (src.hasPathElement()) + tgt.setPathElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getPathElement())); + if (src.hasLanguageElement()) + tgt.getExpression().setLanguageElement((CodeType) VersionConvertor_30_40.convertType(src.getLanguageElement())); + if (src.hasExpressionElement()) + tgt.getExpression().setExpressionElement((StringType) VersionConvertor_30_40.convertType(src.getExpressionElement())); return tgt; } @@ -636,14 +640,14 @@ public class PlanDefinition30_40 { return null; org.hl7.fhir.dstu3.model.PlanDefinition.PlanDefinitionActionDynamicValueComponent tgt = new org.hl7.fhir.dstu3.model.PlanDefinition.PlanDefinitionActionDynamicValueComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.getExpression().hasDescription()) - tgt.setDescription(src.getExpression().getDescription()); - if (src.hasPath()) - tgt.setPath(src.getPath()); - if (src.getExpression().hasLanguage()) - tgt.setLanguage(src.getExpression().getLanguage()); - if (src.getExpression().hasExpression()) - tgt.setExpression(src.getExpression().getExpression()); + if (src.getExpression().hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getExpression().getDescriptionElement())); + if (src.hasPathElement()) + tgt.setPathElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getPathElement())); + if (src.getExpression().hasLanguageElement()) + tgt.setLanguageElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getExpression().getLanguageElement())); + if (src.getExpression().hasExpressionElement()) + tgt.setExpressionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getExpression().getExpressionElement())); return tgt; } @@ -676,8 +680,8 @@ public class PlanDefinition30_40 { return null; org.hl7.fhir.r4.model.PlanDefinition.PlanDefinitionActionRelatedActionComponent tgt = new org.hl7.fhir.r4.model.PlanDefinition.PlanDefinitionActionRelatedActionComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasActionId()) - tgt.setActionId(src.getActionId()); + if (src.hasActionIdElement()) + tgt.setActionIdElement((org.hl7.fhir.r4.model.IdType) VersionConvertor_30_40.convertType(src.getActionIdElement())); if (src.hasRelationship()) tgt.setRelationship(convertActionRelationshipType(src.getRelationship())); if (src.hasOffset()) @@ -690,8 +694,8 @@ public class PlanDefinition30_40 { return null; org.hl7.fhir.dstu3.model.PlanDefinition.PlanDefinitionActionRelatedActionComponent tgt = new org.hl7.fhir.dstu3.model.PlanDefinition.PlanDefinitionActionRelatedActionComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasActionId()) - tgt.setActionId(src.getActionId()); + if (src.hasActionIdElement()) + tgt.setActionIdElement((org.hl7.fhir.dstu3.model.IdType) VersionConvertor_30_40.convertType(src.getActionIdElement())); if (src.hasRelationship()) tgt.setRelationship(convertActionRelationshipType(src.getRelationship())); if (src.hasOffset()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Practitioner30_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Practitioner30_40.java index 5f96640a8..390006b46 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Practitioner30_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Practitioner30_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_40; import org.hl7.fhir.convertors.VersionConvertor_30_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Practitioner30_40 { @@ -13,8 +14,8 @@ public class Practitioner30_40 { if (src.hasIdentifier()) { for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_30_40.convertIdentifier(t)); } - if (src.hasActive()) - tgt.setActive(src.getActive()); + if (src.hasActiveElement()) + tgt.setActiveElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_30_40.convertType(src.getActiveElement())); if (src.hasName()) { for (org.hl7.fhir.dstu3.model.HumanName t : src.getName()) tgt.addName(VersionConvertor_30_40.convertHumanName(t)); } @@ -48,8 +49,8 @@ public class Practitioner30_40 { if (src.hasIdentifier()) { for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_30_40.convertIdentifier(t)); } - if (src.hasActive()) - tgt.setActive(src.getActive()); + if (src.hasActiveElement()) + tgt.setActiveElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_40.convertType(src.getActiveElement())); if (src.hasName()) { for (org.hl7.fhir.r4.model.HumanName t : src.getName()) tgt.addName(VersionConvertor_30_40.convertHumanName(t)); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/PractitionerRole30_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/PractitionerRole30_40.java index 12b48910e..ecbe12a2c 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/PractitionerRole30_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/PractitionerRole30_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_40; import org.hl7.fhir.convertors.VersionConvertor_30_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class PractitionerRole30_40 { @@ -13,8 +14,8 @@ public class PractitionerRole30_40 { if (src.hasIdentifier()) { for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_30_40.convertIdentifier(t)); } - if (src.hasActive()) - tgt.setActive(src.getActive()); + if (src.hasActiveElement()) + tgt.setActiveElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_30_40.convertType(src.getActiveElement())); if (src.hasPeriod()) tgt.setPeriod(VersionConvertor_30_40.convertPeriod(src.getPeriod())); if (src.hasPractitioner()) @@ -42,8 +43,8 @@ public class PractitionerRole30_40 { if (src.hasNotAvailable()) { for (org.hl7.fhir.dstu3.model.PractitionerRole.PractitionerRoleNotAvailableComponent t : src.getNotAvailable()) tgt.addNotAvailable(convertPractitionerRoleNotAvailableComponent(t)); } - if (src.hasAvailabilityExceptions()) - tgt.setAvailabilityExceptions(src.getAvailabilityExceptions()); + if (src.hasAvailabilityExceptionsElement()) + tgt.setAvailabilityExceptionsElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getAvailabilityExceptionsElement())); if (src.hasEndpoint()) { for (org.hl7.fhir.dstu3.model.Reference t : src.getEndpoint()) tgt.addEndpoint(VersionConvertor_30_40.convertReference(t)); } @@ -58,8 +59,8 @@ public class PractitionerRole30_40 { if (src.hasIdentifier()) { for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_30_40.convertIdentifier(t)); } - if (src.hasActive()) - tgt.setActive(src.getActive()); + if (src.hasActiveElement()) + tgt.setActiveElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_40.convertType(src.getActiveElement())); if (src.hasPeriod()) tgt.setPeriod(VersionConvertor_30_40.convertPeriod(src.getPeriod())); if (src.hasPractitioner()) @@ -87,8 +88,8 @@ public class PractitionerRole30_40 { if (src.hasNotAvailable()) { for (org.hl7.fhir.r4.model.PractitionerRole.PractitionerRoleNotAvailableComponent t : src.getNotAvailable()) tgt.addNotAvailable(convertPractitionerRoleNotAvailableComponent(t)); } - if (src.hasAvailabilityExceptions()) - tgt.setAvailabilityExceptions(src.getAvailabilityExceptions()); + if (src.hasAvailabilityExceptionsElement()) + tgt.setAvailabilityExceptionsElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getAvailabilityExceptionsElement())); if (src.hasEndpoint()) { for (org.hl7.fhir.r4.model.Reference t : src.getEndpoint()) tgt.addEndpoint(VersionConvertor_30_40.convertReference(t)); } @@ -103,12 +104,12 @@ public class PractitionerRole30_40 { if (src.hasDaysOfWeek()) { for (org.hl7.fhir.r4.model.Enumeration t : src.getDaysOfWeek()) VersionConvertor_30_40.copyElement(t, tgt.addDaysOfWeekElement().setValue(VersionConvertor_30_40.convertDaysOfWeek(t.getValue()))); } - if (src.hasAllDay()) - tgt.setAllDay(src.getAllDay()); - if (src.hasAvailableStartTime()) - tgt.setAvailableStartTime(src.getAvailableStartTime()); - if (src.hasAvailableEndTime()) - tgt.setAvailableEndTime(src.getAvailableEndTime()); + if (src.hasAllDayElement()) + tgt.setAllDayElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_40.convertType(src.getAllDayElement())); + if (src.hasAvailableStartTimeElement()) + tgt.setAvailableStartTimeElement((org.hl7.fhir.dstu3.model.TimeType) VersionConvertor_30_40.convertType(src.getAvailableStartTimeElement())); + if (src.hasAvailableEndTimeElement()) + tgt.setAvailableEndTimeElement((org.hl7.fhir.dstu3.model.TimeType) VersionConvertor_30_40.convertType(src.getAvailableEndTimeElement())); return tgt; } @@ -120,12 +121,12 @@ public class PractitionerRole30_40 { if (src.hasDaysOfWeek()) { for (org.hl7.fhir.dstu3.model.Enumeration t : src.getDaysOfWeek()) VersionConvertor_30_40.copyElement(t, tgt.addDaysOfWeekElement().setValue(VersionConvertor_30_40.convertDaysOfWeek(t.getValue()))); } - if (src.hasAllDay()) - tgt.setAllDay(src.getAllDay()); - if (src.hasAvailableStartTime()) - tgt.setAvailableStartTime(src.getAvailableStartTime()); - if (src.hasAvailableEndTime()) - tgt.setAvailableEndTime(src.getAvailableEndTime()); + if (src.hasAllDayElement()) + tgt.setAllDayElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_30_40.convertType(src.getAllDayElement())); + if (src.hasAvailableStartTimeElement()) + tgt.setAvailableStartTimeElement((org.hl7.fhir.r4.model.TimeType) VersionConvertor_30_40.convertType(src.getAvailableStartTimeElement())); + if (src.hasAvailableEndTimeElement()) + tgt.setAvailableEndTimeElement((org.hl7.fhir.r4.model.TimeType) VersionConvertor_30_40.convertType(src.getAvailableEndTimeElement())); return tgt; } @@ -134,8 +135,8 @@ public class PractitionerRole30_40 { return null; org.hl7.fhir.r4.model.PractitionerRole.PractitionerRoleNotAvailableComponent tgt = new org.hl7.fhir.r4.model.PractitionerRole.PractitionerRoleNotAvailableComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); if (src.hasDuring()) tgt.setDuring(VersionConvertor_30_40.convertPeriod(src.getDuring())); return tgt; @@ -146,8 +147,8 @@ public class PractitionerRole30_40 { return null; org.hl7.fhir.dstu3.model.PractitionerRole.PractitionerRoleNotAvailableComponent tgt = new org.hl7.fhir.dstu3.model.PractitionerRole.PractitionerRoleNotAvailableComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); if (src.hasDuring()) tgt.setDuring(VersionConvertor_30_40.convertPeriod(src.getDuring())); return tgt; diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Procedure30_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Procedure30_40.java index 0fb4bd382..c4977e5db 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Procedure30_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Procedure30_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_40; import org.hl7.fhir.convertors.VersionConvertor_30_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Procedure30_40 { @@ -27,42 +28,28 @@ public class Procedure30_40 { } } if (src.hasNotDoneReason()) { - if (src.hasNotDoneReason()) { - tgt.setStatusReason(VersionConvertor_30_40.convertCodeableConcept(src.getNotDoneReason())); - } + tgt.setStatusReason(VersionConvertor_30_40.convertCodeableConcept(src.getNotDoneReason())); } if (src.hasCategory()) { - if (src.hasCategory()) { - tgt.setCategory(VersionConvertor_30_40.convertCodeableConcept(src.getCategory())); - } + tgt.setCategory(VersionConvertor_30_40.convertCodeableConcept(src.getCategory())); } if (src.hasCode()) { - if (src.hasCode()) { - tgt.setCode(VersionConvertor_30_40.convertCodeableConcept(src.getCode())); - } + tgt.setCode(VersionConvertor_30_40.convertCodeableConcept(src.getCode())); } if (src.hasSubject()) { - if (src.hasSubject()) { - tgt.setSubject(VersionConvertor_30_40.convertReference(src.getSubject())); - } + tgt.setSubject(VersionConvertor_30_40.convertReference(src.getSubject())); } if (src.hasContext()) { - if (src.hasContext()) { - tgt.setEncounter(VersionConvertor_30_40.convertReference(src.getContext())); - } + tgt.setEncounter(VersionConvertor_30_40.convertReference(src.getContext())); } if (src.hasPerformed()) { - if (src.hasPerformed()) { - tgt.setPerformed(VersionConvertor_30_40.convertType(src.getPerformed())); - } + tgt.setPerformed(VersionConvertor_30_40.convertType(src.getPerformed())); } for (org.hl7.fhir.dstu3.model.Procedure.ProcedurePerformerComponent t : src.getPerformer()) { tgt.addPerformer(convertProcedurePerformerComponent(t)); } if (src.hasLocation()) { - if (src.hasLocation()) { - tgt.setLocation(VersionConvertor_30_40.convertReference(src.getLocation())); - } + tgt.setLocation(VersionConvertor_30_40.convertReference(src.getLocation())); } for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getReasonCode()) { tgt.addReasonCode(VersionConvertor_30_40.convertCodeableConcept(t)); @@ -74,9 +61,7 @@ public class Procedure30_40 { tgt.addBodySite(VersionConvertor_30_40.convertCodeableConcept(t)); } if (src.hasOutcome()) { - if (src.hasOutcome()) { - tgt.setOutcome(VersionConvertor_30_40.convertCodeableConcept(src.getOutcome())); - } + tgt.setOutcome(VersionConvertor_30_40.convertCodeableConcept(src.getOutcome())); } for (org.hl7.fhir.dstu3.model.Reference t : src.getReport()) { tgt.addReport(VersionConvertor_30_40.convertReference(t)); @@ -196,14 +181,10 @@ public class Procedure30_40 { org.hl7.fhir.dstu3.model.Procedure.ProcedureFocalDeviceComponent tgt = new org.hl7.fhir.dstu3.model.Procedure.ProcedureFocalDeviceComponent(); VersionConvertor_30_40.copyElement(src, tgt); if (src.hasAction()) { - if (src.hasAction()) { - tgt.setAction(VersionConvertor_30_40.convertCodeableConcept(src.getAction())); - } + tgt.setAction(VersionConvertor_30_40.convertCodeableConcept(src.getAction())); } if (src.hasManipulated()) { - if (src.hasManipulated()) { - tgt.setManipulated(VersionConvertor_30_40.convertReference(src.getManipulated())); - } + tgt.setManipulated(VersionConvertor_30_40.convertReference(src.getManipulated())); } return tgt; } @@ -214,14 +195,10 @@ public class Procedure30_40 { org.hl7.fhir.r4.model.Procedure.ProcedureFocalDeviceComponent tgt = new org.hl7.fhir.r4.model.Procedure.ProcedureFocalDeviceComponent(); VersionConvertor_30_40.copyElement(src, tgt); if (src.hasAction()) { - if (src.hasAction()) { - tgt.setAction(VersionConvertor_30_40.convertCodeableConcept(src.getAction())); - } + tgt.setAction(VersionConvertor_30_40.convertCodeableConcept(src.getAction())); } if (src.hasManipulated()) { - if (src.hasManipulated()) { - tgt.setManipulated(VersionConvertor_30_40.convertReference(src.getManipulated())); - } + tgt.setManipulated(VersionConvertor_30_40.convertReference(src.getManipulated())); } return tgt; } @@ -232,19 +209,13 @@ public class Procedure30_40 { org.hl7.fhir.r4.model.Procedure.ProcedurePerformerComponent tgt = new org.hl7.fhir.r4.model.Procedure.ProcedurePerformerComponent(); VersionConvertor_30_40.copyElement(src, tgt); if (src.hasRole()) { - if (src.hasRole()) { - tgt.setFunction(VersionConvertor_30_40.convertCodeableConcept(src.getRole())); - } + tgt.setFunction(VersionConvertor_30_40.convertCodeableConcept(src.getRole())); } if (src.hasActor()) { - if (src.hasActor()) { - tgt.setActor(VersionConvertor_30_40.convertReference(src.getActor())); - } + tgt.setActor(VersionConvertor_30_40.convertReference(src.getActor())); } if (src.hasOnBehalfOf()) { - if (src.hasOnBehalfOf()) { - tgt.setOnBehalfOf(VersionConvertor_30_40.convertReference(src.getOnBehalfOf())); - } + tgt.setOnBehalfOf(VersionConvertor_30_40.convertReference(src.getOnBehalfOf())); } return tgt; } @@ -255,19 +226,13 @@ public class Procedure30_40 { org.hl7.fhir.dstu3.model.Procedure.ProcedurePerformerComponent tgt = new org.hl7.fhir.dstu3.model.Procedure.ProcedurePerformerComponent(); VersionConvertor_30_40.copyElement(src, tgt); if (src.hasFunction()) { - if (src.hasFunction()) { - tgt.setRole(VersionConvertor_30_40.convertCodeableConcept(src.getFunction())); - } + tgt.setRole(VersionConvertor_30_40.convertCodeableConcept(src.getFunction())); } if (src.hasActor()) { - if (src.hasActor()) { - tgt.setActor(VersionConvertor_30_40.convertReference(src.getActor())); - } + tgt.setActor(VersionConvertor_30_40.convertReference(src.getActor())); } if (src.hasOnBehalfOf()) { - if (src.hasOnBehalfOf()) { - tgt.setOnBehalfOf(VersionConvertor_30_40.convertReference(src.getOnBehalfOf())); - } + tgt.setOnBehalfOf(VersionConvertor_30_40.convertReference(src.getOnBehalfOf())); } return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/ProcedureRequest30_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/ProcedureRequest30_40.java index 5c5b417a1..e78924137 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/ProcedureRequest30_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/ProcedureRequest30_40.java @@ -3,6 +3,7 @@ package org.hl7.fhir.convertors.conv30_40; import org.hl7.fhir.convertors.VersionConvertor_30_40; import org.hl7.fhir.exceptions.FHIRException; import java.util.List; +import java.util.Collections; public class ProcedureRequest30_40 { @@ -118,9 +119,8 @@ public class ProcedureRequest30_40 { if (src.hasPriority()) { tgt.setPriority(convertProcedureRequestPriority(src.getPriority())); } - if (src.hasDoNotPerform()) { - tgt.setDoNotPerform(src.getDoNotPerform()); - } + if (src.hasDoNotPerformElement()) + tgt.setDoNotPerformElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_40.convertType(src.getDoNotPerformElement())); for (org.hl7.fhir.r4.model.CodeableConcept t : src.getCategory()) { tgt.addCategory(VersionConvertor_30_40.convertCodeableConcept(t)); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Provenance30_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Provenance30_40.java index 414979659..c4df967b0 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Provenance30_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Provenance30_40.java @@ -2,10 +2,9 @@ package org.hl7.fhir.convertors.conv30_40; import org.hl7.fhir.convertors.VersionConvertor_30_40; import org.hl7.fhir.exceptions.FHIRException; -import org.hl7.fhir.r4.model.Identifier; -import org.hl7.fhir.r4.model.Reference; -import org.hl7.fhir.r4.model.Type; -import org.hl7.fhir.r4.model.UriType; +import org.hl7.fhir.r4.model.*; + +import java.util.Collections; public class Provenance30_40 { @@ -14,16 +13,16 @@ public class Provenance30_40 { return null; org.hl7.fhir.r4.model.CodeableConcept tgt = new org.hl7.fhir.r4.model.CodeableConcept(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasSystem()) - tgt.getCodingFirstRep().setSystem(src.getSystem()); - if (src.hasVersion()) - tgt.getCodingFirstRep().setVersion(src.getVersion()); - if (src.hasCode()) - tgt.getCodingFirstRep().setCode(src.getCode()); - if (src.hasDisplay()) - tgt.getCodingFirstRep().setDisplay(src.getDisplay()); - if (src.hasUserSelected()) - tgt.getCodingFirstRep().setUserSelected(src.getUserSelected()); + if (src.hasSystemElement()) + tgt.getCodingFirstRep().setSystemElement((UriType) VersionConvertor_30_40.convertType(src.getSystemElement())); + if (src.hasVersionElement()) + tgt.getCodingFirstRep().setVersionElement((StringType) VersionConvertor_30_40.convertType(src.getVersionElement())); + if (src.hasCodeElement()) + tgt.getCodingFirstRep().setCodeElement((CodeType) VersionConvertor_30_40.convertType(src.getCodeElement())); + if (src.hasDisplayElement()) + tgt.getCodingFirstRep().setDisplayElement((StringType) VersionConvertor_30_40.convertType(src.getDisplayElement())); + if (src.hasUserSelectedElement()) + tgt.getCodingFirstRep().setUserSelectedElement((BooleanType) VersionConvertor_30_40.convertType(src.getUserSelectedElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Questionnaire30_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Questionnaire30_40.java index 4ce3bad5a..d5ea10cd2 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Questionnaire30_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Questionnaire30_40.java @@ -3,6 +3,7 @@ package org.hl7.fhir.convertors.conv30_40; import org.hl7.fhir.convertors.VersionConvertor_30_40; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r4.model.Questionnaire; +import java.util.Collections; public class Questionnaire30_40 { @@ -11,33 +12,33 @@ public class Questionnaire30_40 { return null; org.hl7.fhir.r4.model.Questionnaire tgt = new org.hl7.fhir.r4.model.Questionnaire(); VersionConvertor_30_40.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_30_40.convertType(src.getUrlElement())); if (src.hasIdentifier()) { for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_30_40.convertIdentifier(t)); } - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getNameElement())); + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getTitleElement())); if (src.hasStatus()) tgt.setStatus(VersionConvertor_30_40.convertPublicationStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_30_40.convertType(src.getExperimentalElement())); if (src.hasDateElement()) tgt.setDateElement(VersionConvertor_30_40.convertDateTime(src.getDateElement())); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - if (src.hasPurpose()) - tgt.setPurpose(src.getPurpose()); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getPublisherElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r4.model.MarkdownType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); + if (src.hasPurposeElement()) + tgt.setPurposeElement((org.hl7.fhir.r4.model.MarkdownType) VersionConvertor_30_40.convertType(src.getPurposeElement())); if (src.hasApprovalDate()) - tgt.setApprovalDateElement(VersionConvertor_30_40.convertDate(src.getApprovalDateElement())); + tgt.setApprovalDateElement(VersionConvertor_30_40.convertDate(src.getApprovalDateElement())); if (src.hasLastReviewDate()) - tgt.setLastReviewDateElement(VersionConvertor_30_40.convertDate(src.getLastReviewDateElement())); + tgt.setLastReviewDateElement(VersionConvertor_30_40.convertDate(src.getLastReviewDateElement())); if (src.hasEffectivePeriod()) tgt.setEffectivePeriod(VersionConvertor_30_40.convertPeriod(src.getEffectivePeriod())); if (src.hasUseContext()) { @@ -49,8 +50,8 @@ public class Questionnaire30_40 { if (src.hasContact()) { for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) tgt.addContact(VersionConvertor_30_40.convertContactDetail(t)); } - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.r4.model.MarkdownType) VersionConvertor_30_40.convertType(src.getCopyrightElement())); if (src.hasCode()) { for (org.hl7.fhir.dstu3.model.Coding t : src.getCode()) tgt.addCode(VersionConvertor_30_40.convertCoding(t)); } @@ -68,33 +69,33 @@ public class Questionnaire30_40 { return null; org.hl7.fhir.dstu3.model.Questionnaire tgt = new org.hl7.fhir.dstu3.model.Questionnaire(); VersionConvertor_30_40.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_40.convertType(src.getUrlElement())); if (src.hasIdentifier()) { for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_30_40.convertIdentifier(t)); } - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getNameElement())); + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getTitleElement())); if (src.hasStatus()) tgt.setStatus(VersionConvertor_30_40.convertPublicationStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_40.convertType(src.getExperimentalElement())); if (src.hasDateElement()) tgt.setDateElement(VersionConvertor_30_40.convertDateTime(src.getDateElement())); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - if (src.hasPurpose()) - tgt.setPurpose(src.getPurpose()); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getPublisherElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); + if (src.hasPurposeElement()) + tgt.setPurposeElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_40.convertType(src.getPurposeElement())); if (src.hasApprovalDate()) - tgt.setApprovalDateElement(VersionConvertor_30_40.convertDate(src.getApprovalDateElement())); + tgt.setApprovalDateElement(VersionConvertor_30_40.convertDate(src.getApprovalDateElement())); if (src.hasLastReviewDate()) - tgt.setLastReviewDateElement(VersionConvertor_30_40.convertDate(src.getLastReviewDateElement())); + tgt.setLastReviewDateElement(VersionConvertor_30_40.convertDate(src.getLastReviewDateElement())); if (src.hasEffectivePeriod()) tgt.setEffectivePeriod(VersionConvertor_30_40.convertPeriod(src.getEffectivePeriod())); if (src.hasUseContext()) { @@ -106,8 +107,8 @@ public class Questionnaire30_40 { if (src.hasContact()) { for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact()) tgt.addContact(VersionConvertor_30_40.convertContactDetail(t)); } - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_40.convertType(src.getCopyrightElement())); if (src.hasCode()) { for (org.hl7.fhir.r4.model.Coding t : src.getCode()) tgt.addCode(VersionConvertor_30_40.convertCoding(t)); } @@ -125,30 +126,30 @@ public class Questionnaire30_40 { return null; org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemComponent tgt = new org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasLinkId()) - tgt.setLinkId(src.getLinkId()); - if (src.hasDefinition()) - tgt.setDefinition(src.getDefinition()); + if (src.hasLinkIdElement()) + tgt.setLinkIdElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getLinkIdElement())); + if (src.hasDefinitionElement()) + tgt.setDefinitionElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_40.convertType(src.getDefinitionElement())); if (src.hasCode()) { for (org.hl7.fhir.r4.model.Coding t : src.getCode()) tgt.addCode(VersionConvertor_30_40.convertCoding(t)); } - if (src.hasPrefix()) - tgt.setPrefix(src.getPrefix()); - if (src.hasText()) - tgt.setText(src.getText()); + if (src.hasPrefixElement()) + tgt.setPrefixElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getPrefixElement())); + if (src.hasTextElement()) + tgt.setTextElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getTextElement())); if (src.hasType()) tgt.setType(convertQuestionnaireItemType(src.getType())); if (src.hasEnableWhen()) { for (org.hl7.fhir.r4.model.Questionnaire.QuestionnaireItemEnableWhenComponent t : src.getEnableWhen()) tgt.addEnableWhen(convertQuestionnaireItemEnableWhenComponent(t)); } - if (src.hasRequired()) - tgt.setRequired(src.getRequired()); - if (src.hasRepeats()) - tgt.setRepeats(src.getRepeats()); - if (src.hasReadOnly()) - tgt.setReadOnly(src.getReadOnly()); - if (src.hasMaxLength()) - tgt.setMaxLength(src.getMaxLength()); + if (src.hasRequiredElement()) + tgt.setRequiredElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_40.convertType(src.getRequiredElement())); + if (src.hasRepeatsElement()) + tgt.setRepeatsElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_40.convertType(src.getRepeatsElement())); + if (src.hasReadOnlyElement()) + tgt.setReadOnlyElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_40.convertType(src.getReadOnlyElement())); + if (src.hasMaxLengthElement()) + tgt.setMaxLengthElement((org.hl7.fhir.dstu3.model.IntegerType) VersionConvertor_30_40.convertType(src.getMaxLengthElement())); if (src.hasAnswerValueSet()) tgt.setOptions(VersionConvertor_30_40.convertCanonicalToReference(src.getAnswerValueSetElement())); if (src.hasAnswerOption()) { @@ -167,31 +168,31 @@ public class Questionnaire30_40 { return null; org.hl7.fhir.r4.model.Questionnaire.QuestionnaireItemComponent tgt = new org.hl7.fhir.r4.model.Questionnaire.QuestionnaireItemComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasLinkId()) - tgt.setLinkId(src.getLinkId()); - if (src.hasDefinition()) - tgt.setDefinition(src.getDefinition()); + if (src.hasLinkIdElement()) + tgt.setLinkIdElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getLinkIdElement())); + if (src.hasDefinitionElement()) + tgt.setDefinitionElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_30_40.convertType(src.getDefinitionElement())); if (src.hasCode()) { for (org.hl7.fhir.dstu3.model.Coding t : src.getCode()) tgt.addCode(VersionConvertor_30_40.convertCoding(t)); } - if (src.hasPrefix()) - tgt.setPrefix(src.getPrefix()); - if (src.hasText()) - tgt.setText(src.getText()); + if (src.hasPrefixElement()) + tgt.setPrefixElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getPrefixElement())); + if (src.hasTextElement()) + tgt.setTextElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getTextElement())); if (src.hasType()) tgt.setType(convertQuestionnaireItemType(src.getType())); if (src.hasEnableWhen()) { for (org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemEnableWhenComponent t : src.getEnableWhen()) tgt.addEnableWhen(convertQuestionnaireItemEnableWhenComponent(t)); } tgt.setEnableBehavior(Questionnaire.EnableWhenBehavior.ANY); - if (src.hasRequired()) - tgt.setRequired(src.getRequired()); - if (src.hasRepeats()) - tgt.setRepeats(src.getRepeats()); - if (src.hasReadOnly()) - tgt.setReadOnly(src.getReadOnly()); - if (src.hasMaxLength()) - tgt.setMaxLength(src.getMaxLength()); + if (src.hasRequiredElement()) + tgt.setRequiredElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_30_40.convertType(src.getRequiredElement())); + if (src.hasRepeatsElement()) + tgt.setRepeatsElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_30_40.convertType(src.getRepeatsElement())); + if (src.hasReadOnlyElement()) + tgt.setReadOnlyElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_30_40.convertType(src.getReadOnlyElement())); + if (src.hasMaxLengthElement()) + tgt.setMaxLengthElement((org.hl7.fhir.r4.model.IntegerType) VersionConvertor_30_40.convertType(src.getMaxLengthElement())); if (src.hasOptions()) tgt.setAnswerValueSetElement(VersionConvertor_30_40.convertReferenceToCanonical(src.getOptions())); if (src.hasOption()) { @@ -213,8 +214,8 @@ public class Questionnaire30_40 { return null; org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemEnableWhenComponent tgt = new org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemEnableWhenComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasQuestion()) - tgt.setQuestion(src.getQuestion()); + if (src.hasQuestionElement()) + tgt.setQuestionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getQuestionElement())); if (src.hasOperator() && src.getOperator() == org.hl7.fhir.r4.model.Questionnaire.QuestionnaireItemOperator.EXISTS) tgt.setHasAnswer(src.getAnswerBooleanType().getValue()); else if (src.hasAnswer()) @@ -227,8 +228,8 @@ public class Questionnaire30_40 { return null; org.hl7.fhir.r4.model.Questionnaire.QuestionnaireItemEnableWhenComponent tgt = new org.hl7.fhir.r4.model.Questionnaire.QuestionnaireItemEnableWhenComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasQuestion()) - tgt.setQuestion(src.getQuestion()); + if (src.hasQuestionElement()) + tgt.setQuestionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getQuestionElement())); if (src.hasHasAnswer()) { tgt.setOperator(org.hl7.fhir.r4.model.Questionnaire.QuestionnaireItemOperator.EXISTS); if (src.hasHasAnswerElement()) { diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/QuestionnaireResponse30_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/QuestionnaireResponse30_40.java index 9e2d33f2b..c7dbe0f35 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/QuestionnaireResponse30_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/QuestionnaireResponse30_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_40; import org.hl7.fhir.convertors.VersionConvertor_30_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class QuestionnaireResponse30_40 { @@ -102,12 +103,12 @@ public class QuestionnaireResponse30_40 { return null; org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseItemComponent tgt = new org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseItemComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasLinkId()) - tgt.setLinkId(src.getLinkId()); - if (src.hasDefinition()) - tgt.setDefinition(src.getDefinition()); - if (src.hasText()) - tgt.setText(src.getText()); + if (src.hasLinkIdElement()) + tgt.setLinkIdElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getLinkIdElement())); + if (src.hasDefinitionElement()) + tgt.setDefinitionElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_40.convertType(src.getDefinitionElement())); + if (src.hasTextElement()) + tgt.setTextElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getTextElement())); if (src.hasAnswer()) { for (org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent t : src.getAnswer()) tgt.addAnswer(convertQuestionnaireResponseItemAnswerComponent(t)); } @@ -122,12 +123,12 @@ public class QuestionnaireResponse30_40 { return null; org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseItemComponent tgt = new org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseItemComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasLinkId()) - tgt.setLinkId(src.getLinkId()); - if (src.hasDefinition()) - tgt.setDefinition(src.getDefinition()); - if (src.hasText()) - tgt.setText(src.getText()); + if (src.hasLinkIdElement()) + tgt.setLinkIdElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getLinkIdElement())); + if (src.hasDefinitionElement()) + tgt.setDefinitionElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_30_40.convertType(src.getDefinitionElement())); + if (src.hasTextElement()) + tgt.setTextElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getTextElement())); if (src.hasAnswer()) { for (org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent t : src.getAnswer()) tgt.addAnswer(convertQuestionnaireResponseItemAnswerComponent(t)); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/RelatedPerson30_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/RelatedPerson30_40.java index 3e5a680fc..b613dc67d 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/RelatedPerson30_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/RelatedPerson30_40.java @@ -3,6 +3,7 @@ package org.hl7.fhir.convertors.conv30_40; import org.hl7.fhir.convertors.VersionConvertor_30_40; import org.hl7.fhir.exceptions.FHIRException; import java.util.List; +import java.util.Collections; public class RelatedPerson30_40 { @@ -14,9 +15,8 @@ public class RelatedPerson30_40 { for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) { tgt.addIdentifier(VersionConvertor_30_40.convertIdentifier(t)); } - if (src.hasActive()) { - tgt.setActive(src.getActive()); - } + if (src.hasActiveElement()) + tgt.setActiveElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_40.convertType(src.getActiveElement())); if (src.hasPatient()) { tgt.setPatient(VersionConvertor_30_40.convertReference(src.getPatient())); } @@ -35,9 +35,8 @@ public class RelatedPerson30_40 { if (src.hasGender()) { tgt.setGender(VersionConvertor_30_40.convertAdministrativeGender(src.getGender())); } - if (src.hasBirthDate()) { - tgt.setBirthDate(tgt.getBirthDate()); - } + if (src.hasBirthDateElement()) + tgt.setBirthDateElement((org.hl7.fhir.dstu3.model.DateType) VersionConvertor_30_40.convertType(src.getBirthDateElement())); for (org.hl7.fhir.r4.model.Address t : src.getAddress()) { tgt.addAddress(VersionConvertor_30_40.convertAddress(t)); } @@ -58,20 +57,13 @@ public class RelatedPerson30_40 { for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) { tgt.addIdentifier(VersionConvertor_30_40.convertIdentifier(t)); } - if (src.hasActive()) { - if (src.hasActive()) { - tgt.setActive(src.getActive()); - } - } + if (src.hasActiveElement()) + tgt.setActiveElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_30_40.convertType(src.getActiveElement())); if (src.hasPatient()) { - if (src.hasPatient()) { - tgt.setPatient(VersionConvertor_30_40.convertReference(src.getPatient())); - } + tgt.setPatient(VersionConvertor_30_40.convertReference(src.getPatient())); } if (src.hasRelationship()) { - if (src.hasRelationship()) { - tgt.addRelationship(VersionConvertor_30_40.convertCodeableConcept(src.getRelationship())); - } + tgt.addRelationship(VersionConvertor_30_40.convertCodeableConcept(src.getRelationship())); } for (org.hl7.fhir.dstu3.model.HumanName t : src.getName()) { tgt.addName(VersionConvertor_30_40.convertHumanName(t)); @@ -80,13 +72,10 @@ public class RelatedPerson30_40 { tgt.addTelecom(VersionConvertor_30_40.convertContactPoint(t)); } if (src.hasGender()) { - if (src.hasGender()) { - tgt.setGender(VersionConvertor_30_40.convertAdministrativeGender(src.getGender())); - } - } - if (src.hasBirthDate()) { - tgt.setBirthDate(tgt.getBirthDate()); + tgt.setGender(VersionConvertor_30_40.convertAdministrativeGender(src.getGender())); } + if (src.hasBirthDateElement()) + tgt.setBirthDateElement((org.hl7.fhir.r4.model.DateType) VersionConvertor_30_40.convertType(src.getBirthDateElement())); for (org.hl7.fhir.dstu3.model.Address t : src.getAddress()) { tgt.addAddress(VersionConvertor_30_40.convertAddress(t)); } @@ -94,9 +83,7 @@ public class RelatedPerson30_40 { tgt.addPhoto(VersionConvertor_30_40.convertAttachment(t)); } if (src.hasPeriod()) { - if (src.hasPeriod()) { - tgt.setPeriod(VersionConvertor_30_40.convertPeriod(src.getPeriod())); - } + tgt.setPeriod(VersionConvertor_30_40.convertPeriod(src.getPeriod())); } return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/RiskAssessment30_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/RiskAssessment30_40.java index fdbe6b251..a32f0da2d 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/RiskAssessment30_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/RiskAssessment30_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_40; import org.hl7.fhir.convertors.VersionConvertor_30_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class RiskAssessment30_40 { @@ -42,8 +43,8 @@ public class RiskAssessment30_40 { if (src.hasPrediction()) { for (org.hl7.fhir.r4.model.RiskAssessment.RiskAssessmentPredictionComponent t : src.getPrediction()) tgt.addPrediction(convertRiskAssessmentPredictionComponent(t)); } - if (src.hasMitigation()) - tgt.setMitigation(src.getMitigation()); + if (src.hasMitigationElement()) + tgt.setMitigationElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getMitigationElement())); if (src.hasNote()) tgt.setComment(src.getNoteFirstRep().getText()); return tgt; @@ -85,8 +86,8 @@ public class RiskAssessment30_40 { } for (org.hl7.fhir.dstu3.model.Reference t : src.getBasis()) tgt.addBasis(VersionConvertor_30_40.convertReference(t)); for (org.hl7.fhir.dstu3.model.RiskAssessment.RiskAssessmentPredictionComponent t : src.getPrediction()) tgt.addPrediction(convertRiskAssessmentPredictionComponent(t)); - if (src.hasMitigation()) - tgt.setMitigation(src.getMitigation()); + if (src.hasMitigationElement()) + tgt.setMitigationElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getMitigationElement())); if (src.hasComment()) tgt.addNote().setText(src.getComment()); return tgt; @@ -103,12 +104,12 @@ public class RiskAssessment30_40 { tgt.setProbability(VersionConvertor_30_40.convertType(src.getProbability())); if (src.hasQualitativeRisk()) tgt.setQualitativeRisk(VersionConvertor_30_40.convertCodeableConcept(src.getQualitativeRisk())); - if (src.hasRelativeRisk()) - tgt.setRelativeRisk(src.getRelativeRisk()); + if (src.hasRelativeRiskElement()) + tgt.setRelativeRiskElement((org.hl7.fhir.r4.model.DecimalType) VersionConvertor_30_40.convertType(src.getRelativeRiskElement())); if (src.hasWhen()) tgt.setWhen(VersionConvertor_30_40.convertType(src.getWhen())); - if (src.hasRationale()) - tgt.setRationale(src.getRationale()); + if (src.hasRationaleElement()) + tgt.setRationaleElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getRationaleElement())); return tgt; } @@ -123,12 +124,12 @@ public class RiskAssessment30_40 { tgt.setProbability(VersionConvertor_30_40.convertType(src.getProbability())); if (src.hasQualitativeRisk()) tgt.setQualitativeRisk(VersionConvertor_30_40.convertCodeableConcept(src.getQualitativeRisk())); - if (src.hasRelativeRisk()) - tgt.setRelativeRisk(src.getRelativeRisk()); + if (src.hasRelativeRiskElement()) + tgt.setRelativeRiskElement((org.hl7.fhir.dstu3.model.DecimalType) VersionConvertor_30_40.convertType(src.getRelativeRiskElement())); if (src.hasWhen()) tgt.setWhen(VersionConvertor_30_40.convertType(src.getWhen())); - if (src.hasRationale()) - tgt.setRationale(src.getRationale()); + if (src.hasRationaleElement()) + tgt.setRationaleElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getRationaleElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Schedule30_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Schedule30_40.java index 23a54d425..ac1f8bb07 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Schedule30_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Schedule30_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_40; import org.hl7.fhir.convertors.VersionConvertor_30_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Schedule30_40 { @@ -13,8 +14,8 @@ public class Schedule30_40 { if (src.hasIdentifier()) { for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_30_40.convertIdentifier(t)); } - if (src.hasActive()) - tgt.setActive(src.getActive()); + if (src.hasActiveElement()) + tgt.setActiveElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_40.convertType(src.getActiveElement())); if (src.hasServiceCategory()) tgt.setServiceCategory(VersionConvertor_30_40.convertCodeableConcept(src.getServiceCategoryFirstRep())); if (src.hasServiceType()) { @@ -28,8 +29,8 @@ public class Schedule30_40 { } if (src.hasPlanningHorizon()) tgt.setPlanningHorizon(VersionConvertor_30_40.convertPeriod(src.getPlanningHorizon())); - if (src.hasComment()) - tgt.setComment(src.getComment()); + if (src.hasCommentElement()) + tgt.setCommentElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getCommentElement())); return tgt; } @@ -41,8 +42,8 @@ public class Schedule30_40 { if (src.hasIdentifier()) { for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_30_40.convertIdentifier(t)); } - if (src.hasActive()) - tgt.setActive(src.getActive()); + if (src.hasActiveElement()) + tgt.setActiveElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_30_40.convertType(src.getActiveElement())); if (src.hasServiceCategory()) tgt.addServiceCategory(VersionConvertor_30_40.convertCodeableConcept(src.getServiceCategory())); if (src.hasServiceType()) { @@ -56,8 +57,8 @@ public class Schedule30_40 { } if (src.hasPlanningHorizon()) tgt.setPlanningHorizon(VersionConvertor_30_40.convertPeriod(src.getPlanningHorizon())); - if (src.hasComment()) - tgt.setComment(src.getComment()); + if (src.hasCommentElement()) + tgt.setCommentElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getCommentElement())); return tgt; } } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/SearchParameter30_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/SearchParameter30_40.java index 854dbf3f4..302ca501a 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/SearchParameter30_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/SearchParameter30_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_40; import org.hl7.fhir.convertors.VersionConvertor_30_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class SearchParameter30_40 { @@ -122,20 +123,20 @@ public class SearchParameter30_40 { return null; org.hl7.fhir.dstu3.model.SearchParameter tgt = new org.hl7.fhir.dstu3.model.SearchParameter(); VersionConvertor_30_40.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_40.convertType(src.getUrlElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getNameElement())); if (src.hasStatus()) tgt.setStatus(VersionConvertor_30_40.convertPublicationStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_40.convertType(src.getExperimentalElement())); if (src.hasDateElement()) tgt.setDateElement(VersionConvertor_30_40.convertDateTime(src.getDateElement())); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact()) tgt.addContact(VersionConvertor_30_40.convertContactDetail(t)); } @@ -145,23 +146,23 @@ public class SearchParameter30_40 { if (src.hasJurisdiction()) { for (org.hl7.fhir.r4.model.CodeableConcept t : src.getJurisdiction()) tgt.addJurisdiction(VersionConvertor_30_40.convertCodeableConcept(t)); } - if (src.hasPurpose()) - tgt.setPurpose(src.getPurpose()); - if (src.hasCode()) - tgt.setCode(src.getCode()); + if (src.hasPurposeElement()) + tgt.setPurposeElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_40.convertType(src.getPurposeElement())); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_30_40.convertType(src.getCodeElement())); if (src.hasBase()) { for (org.hl7.fhir.r4.model.CodeType t : src.getBase()) tgt.addBase(t.getValue()); } if (src.hasType()) tgt.setType(VersionConvertor_30_40.convertSearchParamType(src.getType())); - if (src.hasDerivedFrom()) - tgt.setDerivedFrom(src.getDerivedFrom()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - if (src.hasExpression()) - tgt.setExpression(src.getExpression()); - if (src.hasXpath()) - tgt.setXpath(src.getXpath()); + if (src.hasDerivedFromElement()) + tgt.setDerivedFromElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_40.convertType(src.getDerivedFromElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); + if (src.hasExpressionElement()) + tgt.setExpressionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getExpressionElement())); + if (src.hasXpathElement()) + tgt.setXpathElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getXpathElement())); if (src.hasXpathUsage()) tgt.setXpathUsage(convertXPathUsageType(src.getXpathUsage())); if (src.hasTarget()) { @@ -187,20 +188,20 @@ public class SearchParameter30_40 { return null; org.hl7.fhir.r4.model.SearchParameter tgt = new org.hl7.fhir.r4.model.SearchParameter(); VersionConvertor_30_40.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_30_40.convertType(src.getUrlElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getNameElement())); if (src.hasStatus()) tgt.setStatus(VersionConvertor_30_40.convertPublicationStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_30_40.convertType(src.getExperimentalElement())); if (src.hasDateElement()) tgt.setDateElement(VersionConvertor_30_40.convertDateTime(src.getDateElement())); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) tgt.addContact(VersionConvertor_30_40.convertContactDetail(t)); } @@ -210,23 +211,23 @@ public class SearchParameter30_40 { if (src.hasJurisdiction()) { for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getJurisdiction()) tgt.addJurisdiction(VersionConvertor_30_40.convertCodeableConcept(t)); } - if (src.hasPurpose()) - tgt.setPurpose(src.getPurpose()); - if (src.hasCode()) - tgt.setCode(src.getCode()); + if (src.hasPurposeElement()) + tgt.setPurposeElement((org.hl7.fhir.r4.model.MarkdownType) VersionConvertor_30_40.convertType(src.getPurposeElement())); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.r4.model.CodeType) VersionConvertor_30_40.convertType(src.getCodeElement())); if (src.hasBase()) { for (org.hl7.fhir.dstu3.model.CodeType t : src.getBase()) tgt.addBase(t.getValue()); } if (src.hasType()) tgt.setType(VersionConvertor_30_40.convertSearchParamType(src.getType())); - if (src.hasDerivedFrom()) - tgt.setDerivedFrom(src.getDerivedFrom()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - if (src.hasExpression()) - tgt.setExpression(src.getExpression()); - if (src.hasXpath()) - tgt.setXpath(src.getXpath()); + if (src.hasDerivedFromElement()) + tgt.setDerivedFromElement((org.hl7.fhir.r4.model.CanonicalType) VersionConvertor_30_40.convertType(src.getDerivedFromElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r4.model.MarkdownType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); + if (src.hasExpressionElement()) + tgt.setExpressionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getExpressionElement())); + if (src.hasXpathElement()) + tgt.setXpathElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getXpathElement())); if (src.hasXpathUsage()) tgt.setXpathUsage(convertXPathUsageType(src.getXpathUsage())); if (src.hasTarget()) { @@ -254,8 +255,8 @@ public class SearchParameter30_40 { VersionConvertor_30_40.copyElement(src, tgt); if (src.hasDefinition()) tgt.setDefinition(VersionConvertor_30_40.convertCanonicalToReference(src.getDefinitionElement())); - if (src.hasExpression()) - tgt.setExpression(src.getExpression()); + if (src.hasExpressionElement()) + tgt.setExpressionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getExpressionElement())); return tgt; } @@ -266,8 +267,8 @@ public class SearchParameter30_40 { VersionConvertor_30_40.copyElement(src, tgt); if (src.hasDefinition()) tgt.setDefinitionElement(VersionConvertor_30_40.convertReferenceToCanonical(src.getDefinition())); - if (src.hasExpression()) - tgt.setExpression(src.getExpression()); + if (src.hasExpressionElement()) + tgt.setExpressionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getExpressionElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Sequence30_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Sequence30_40.java index 718ee31db..d57680dbf 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Sequence30_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Sequence30_40.java @@ -1,7 +1,13 @@ package org.hl7.fhir.convertors.conv30_40; import org.hl7.fhir.convertors.VersionConvertor_30_40; +import org.hl7.fhir.dstu3.model.StringType; import org.hl7.fhir.exceptions.FHIRException; +import org.hl7.fhir.r4.model.DecimalType; +import org.hl7.fhir.r4.model.IntegerType; +import org.hl7.fhir.r4.model.UriType; + +import java.util.Collections; public class Sequence30_40 { @@ -83,8 +89,8 @@ public class Sequence30_40 { } if (src.hasType()) tgt.setType(convertSequenceType(src.getType())); - if (src.hasCoordinateSystem()) - tgt.setCoordinateSystem(src.getCoordinateSystem()); + if (src.hasCoordinateSystemElement()) + tgt.setCoordinateSystemElement((org.hl7.fhir.dstu3.model.IntegerType) VersionConvertor_30_40.convertType(src.getCoordinateSystemElement())); if (src.hasPatient()) tgt.setPatient(VersionConvertor_30_40.convertReference(src.getPatient())); if (src.hasSpecimen()) @@ -100,13 +106,13 @@ public class Sequence30_40 { if (src.hasVariant()) { for (org.hl7.fhir.r4.model.MolecularSequence.MolecularSequenceVariantComponent t : src.getVariant()) tgt.addVariant(convertSequenceVariantComponent(t)); } - if (src.hasObservedSeq()) - tgt.setObservedSeq(src.getObservedSeq()); + if (src.hasObservedSeqElement()) + tgt.setObservedSeqElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getObservedSeqElement())); if (src.hasQuality()) { for (org.hl7.fhir.r4.model.MolecularSequence.MolecularSequenceQualityComponent t : src.getQuality()) tgt.addQuality(convertSequenceQualityComponent(t)); } - if (src.hasReadCoverage()) - tgt.setReadCoverage(src.getReadCoverage()); + if (src.hasReadCoverageElement()) + tgt.setReadCoverageElement((org.hl7.fhir.dstu3.model.IntegerType) VersionConvertor_30_40.convertType(src.getReadCoverageElement())); if (src.hasRepository()) { for (org.hl7.fhir.r4.model.MolecularSequence.MolecularSequenceRepositoryComponent t : src.getRepository()) tgt.addRepository(convertSequenceRepositoryComponent(t)); } @@ -126,8 +132,8 @@ public class Sequence30_40 { } if (src.hasType()) tgt.setType(convertSequenceType(src.getType())); - if (src.hasCoordinateSystem()) - tgt.setCoordinateSystem(src.getCoordinateSystem()); + if (src.hasCoordinateSystemElement()) + tgt.setCoordinateSystemElement((org.hl7.fhir.r4.model.IntegerType) VersionConvertor_30_40.convertType(src.getCoordinateSystemElement())); if (src.hasPatient()) tgt.setPatient(VersionConvertor_30_40.convertReference(src.getPatient())); if (src.hasSpecimen()) @@ -143,13 +149,13 @@ public class Sequence30_40 { if (src.hasVariant()) { for (org.hl7.fhir.dstu3.model.Sequence.SequenceVariantComponent t : src.getVariant()) tgt.addVariant(convertSequenceVariantComponent(t)); } - if (src.hasObservedSeq()) - tgt.setObservedSeq(src.getObservedSeq()); + if (src.hasObservedSeqElement()) + tgt.setObservedSeqElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getObservedSeqElement())); if (src.hasQuality()) { for (org.hl7.fhir.dstu3.model.Sequence.SequenceQualityComponent t : src.getQuality()) tgt.addQuality(convertSequenceQualityComponent(t)); } - if (src.hasReadCoverage()) - tgt.setReadCoverage(src.getReadCoverage()); + if (src.hasReadCoverageElement()) + tgt.setReadCoverageElement((org.hl7.fhir.r4.model.IntegerType) VersionConvertor_30_40.convertType(src.getReadCoverageElement())); if (src.hasRepository()) { for (org.hl7.fhir.dstu3.model.Sequence.SequenceRepositoryComponent t : src.getRepository()) tgt.addRepository(convertSequenceRepositoryComponent(t)); } @@ -168,30 +174,30 @@ public class Sequence30_40 { tgt.setType(convertQualityType(src.getType())); if (src.hasStandardSequence()) tgt.setStandardSequence(VersionConvertor_30_40.convertCodeableConcept(src.getStandardSequence())); - if (src.hasStart()) - tgt.setStart(src.getStart()); - if (src.hasEnd()) - tgt.setEnd(src.getEnd()); + if (src.hasStartElement()) + tgt.setStartElement((IntegerType) VersionConvertor_30_40.convertType(src.getStartElement())); + if (src.hasEndElement()) + tgt.setEndElement((IntegerType) VersionConvertor_30_40.convertType(src.getEndElement())); if (src.hasScore()) tgt.setScore(VersionConvertor_30_40.convertQuantity(src.getScore())); if (src.hasMethod()) tgt.setMethod(VersionConvertor_30_40.convertCodeableConcept(src.getMethod())); - if (src.hasTruthTP()) - tgt.setTruthTP(src.getTruthTP()); - if (src.hasQueryTP()) - tgt.setQueryTP(src.getQueryTP()); - if (src.hasTruthFN()) - tgt.setTruthFN(src.getTruthFN()); - if (src.hasQueryFP()) - tgt.setQueryFP(src.getQueryFP()); - if (src.hasGtFP()) - tgt.setGtFP(src.getGtFP()); - if (src.hasPrecision()) - tgt.setPrecision(src.getPrecision()); - if (src.hasRecall()) - tgt.setRecall(src.getRecall()); - if (src.hasFScore()) - tgt.setFScore(src.getFScore()); + if (src.hasTruthTPElement()) + tgt.setTruthTPElement((DecimalType) VersionConvertor_30_40.convertType(src.getTruthTPElement())); + if (src.hasQueryTPElement()) + tgt.setQueryTPElement((DecimalType) VersionConvertor_30_40.convertType(src.getQueryTPElement())); + if (src.hasTruthFNElement()) + tgt.setTruthFNElement((DecimalType) VersionConvertor_30_40.convertType(src.getTruthFNElement())); + if (src.hasQueryFPElement()) + tgt.setQueryFPElement((DecimalType) VersionConvertor_30_40.convertType(src.getQueryFPElement())); + if (src.hasGtFPElement()) + tgt.setGtFPElement((DecimalType) VersionConvertor_30_40.convertType(src.getGtFPElement())); + if (src.hasPrecisionElement()) + tgt.setPrecisionElement((DecimalType) VersionConvertor_30_40.convertType(src.getPrecisionElement())); + if (src.hasRecallElement()) + tgt.setRecallElement((DecimalType) VersionConvertor_30_40.convertType(src.getRecallElement())); + if (src.hasFScoreElement()) + tgt.setFScoreElement((DecimalType) VersionConvertor_30_40.convertType(src.getFScoreElement())); return tgt; } @@ -212,22 +218,22 @@ public class Sequence30_40 { tgt.setScore(VersionConvertor_30_40.convertQuantity(src.getScore())); if (src.hasMethod()) tgt.setMethod(VersionConvertor_30_40.convertCodeableConcept(src.getMethod())); - if (src.hasTruthTP()) - tgt.setTruthTP(src.getTruthTP()); - if (src.hasQueryTP()) - tgt.setQueryTP(src.getQueryTP()); - if (src.hasTruthFN()) - tgt.setTruthFN(src.getTruthFN()); - if (src.hasQueryFP()) - tgt.setQueryFP(src.getQueryFP()); - if (src.hasGtFP()) - tgt.setGtFP(src.getGtFP()); - if (src.hasPrecision()) - tgt.setPrecision(src.getPrecision()); - if (src.hasRecall()) - tgt.setRecall(src.getRecall()); - if (src.hasFScore()) - tgt.setFScore(src.getFScore()); + if (src.hasTruthTPElement()) + tgt.setTruthTPElement((org.hl7.fhir.dstu3.model.DecimalType) VersionConvertor_30_40.convertType(src.getTruthTPElement())); + if (src.hasQueryTPElement()) + tgt.setQueryTPElement((org.hl7.fhir.dstu3.model.DecimalType) VersionConvertor_30_40.convertType(src.getQueryTPElement())); + if (src.hasTruthFNElement()) + tgt.setTruthFNElement((org.hl7.fhir.dstu3.model.DecimalType) VersionConvertor_30_40.convertType(src.getTruthFNElement())); + if (src.hasQueryFPElement()) + tgt.setQueryFPElement((org.hl7.fhir.dstu3.model.DecimalType) VersionConvertor_30_40.convertType(src.getQueryFPElement())); + if (src.hasGtFPElement()) + tgt.setGtFPElement((org.hl7.fhir.dstu3.model.DecimalType) VersionConvertor_30_40.convertType(src.getGtFPElement())); + if (src.hasPrecisionElement()) + tgt.setPrecisionElement((org.hl7.fhir.dstu3.model.DecimalType) VersionConvertor_30_40.convertType(src.getPrecisionElement())); + if (src.hasRecallElement()) + tgt.setRecallElement((org.hl7.fhir.dstu3.model.DecimalType) VersionConvertor_30_40.convertType(src.getRecallElement())); + if (src.hasFScoreElement()) + tgt.setFScoreElement((org.hl7.fhir.dstu3.model.DecimalType) VersionConvertor_30_40.convertType(src.getFScoreElement())); return tgt; } @@ -238,18 +244,18 @@ public class Sequence30_40 { VersionConvertor_30_40.copyElement(src, tgt); if (src.hasChromosome()) tgt.setChromosome(VersionConvertor_30_40.convertCodeableConcept(src.getChromosome())); - if (src.hasGenomeBuild()) - tgt.setGenomeBuild(src.getGenomeBuild()); + if (src.hasGenomeBuildElement()) + tgt.setGenomeBuildElement((StringType) VersionConvertor_30_40.convertType(src.getGenomeBuildElement())); if (src.hasReferenceSeqId()) tgt.setReferenceSeqId(VersionConvertor_30_40.convertCodeableConcept(src.getReferenceSeqId())); if (src.hasReferenceSeqPointer()) tgt.setReferenceSeqPointer(VersionConvertor_30_40.convertReference(src.getReferenceSeqPointer())); - if (src.hasReferenceSeqString()) - tgt.setReferenceSeqString(src.getReferenceSeqString()); - if (src.hasWindowStart()) - tgt.setWindowStart(src.getWindowStart()); - if (src.hasWindowEnd()) - tgt.setWindowEnd(src.getWindowEnd()); + if (src.hasReferenceSeqStringElement()) + tgt.setReferenceSeqStringElement((StringType) VersionConvertor_30_40.convertType(src.getReferenceSeqStringElement())); + if (src.hasWindowStartElement()) + tgt.setWindowStartElement((org.hl7.fhir.dstu3.model.IntegerType) VersionConvertor_30_40.convertType(src.getWindowStartElement())); + if (src.hasWindowEndElement()) + tgt.setWindowEndElement((org.hl7.fhir.dstu3.model.IntegerType) VersionConvertor_30_40.convertType(src.getWindowEndElement())); return tgt; } @@ -260,18 +266,18 @@ public class Sequence30_40 { VersionConvertor_30_40.copyElement(src, tgt); if (src.hasChromosome()) tgt.setChromosome(VersionConvertor_30_40.convertCodeableConcept(src.getChromosome())); - if (src.hasGenomeBuild()) - tgt.setGenomeBuild(src.getGenomeBuild()); + if (src.hasGenomeBuildElement()) + tgt.setGenomeBuildElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getGenomeBuildElement())); if (src.hasReferenceSeqId()) tgt.setReferenceSeqId(VersionConvertor_30_40.convertCodeableConcept(src.getReferenceSeqId())); if (src.hasReferenceSeqPointer()) tgt.setReferenceSeqPointer(VersionConvertor_30_40.convertReference(src.getReferenceSeqPointer())); - if (src.hasReferenceSeqString()) - tgt.setReferenceSeqString(src.getReferenceSeqString()); - if (src.hasWindowStart()) - tgt.setWindowStart(src.getWindowStart()); - if (src.hasWindowEnd()) - tgt.setWindowEnd(src.getWindowEnd()); + if (src.hasReferenceSeqStringElement()) + tgt.setReferenceSeqStringElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getReferenceSeqStringElement())); + if (src.hasWindowStartElement()) + tgt.setWindowStartElement((IntegerType) VersionConvertor_30_40.convertType(src.getWindowStartElement())); + if (src.hasWindowEndElement()) + tgt.setWindowEndElement((IntegerType) VersionConvertor_30_40.convertType(src.getWindowEndElement())); return tgt; } @@ -282,16 +288,16 @@ public class Sequence30_40 { VersionConvertor_30_40.copyElement(src, tgt); if (src.hasType()) tgt.setType(convertRepositoryType(src.getType())); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasDatasetId()) - tgt.setDatasetId(src.getDatasetId()); - if (src.hasVariantsetId()) - tgt.setVariantsetId(src.getVariantsetId()); - if (src.hasReadsetId()) - tgt.setReadsetId(src.getReadsetId()); + if (src.hasUrlElement()) + tgt.setUrlElement((UriType) VersionConvertor_30_40.convertType(src.getUrlElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getNameElement())); + if (src.hasDatasetIdElement()) + tgt.setDatasetIdElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getDatasetIdElement())); + if (src.hasVariantsetIdElement()) + tgt.setVariantsetIdElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getVariantsetIdElement())); + if (src.hasReadsetIdElement()) + tgt.setReadsetIdElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getReadsetIdElement())); return tgt; } @@ -302,16 +308,16 @@ public class Sequence30_40 { VersionConvertor_30_40.copyElement(src, tgt); if (src.hasType()) tgt.setType(convertRepositoryType(src.getType())); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasDatasetId()) - tgt.setDatasetId(src.getDatasetId()); - if (src.hasVariantsetId()) - tgt.setVariantsetId(src.getVariantsetId()); - if (src.hasReadsetId()) - tgt.setReadsetId(src.getReadsetId()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_40.convertType(src.getUrlElement())); + if (src.hasNameElement()) + tgt.setNameElement((StringType) VersionConvertor_30_40.convertType(src.getNameElement())); + if (src.hasDatasetIdElement()) + tgt.setDatasetIdElement((StringType) VersionConvertor_30_40.convertType(src.getDatasetIdElement())); + if (src.hasVariantsetIdElement()) + tgt.setVariantsetIdElement((StringType) VersionConvertor_30_40.convertType(src.getVariantsetIdElement())); + if (src.hasReadsetIdElement()) + tgt.setReadsetIdElement((StringType) VersionConvertor_30_40.convertType(src.getReadsetIdElement())); return tgt; } @@ -350,16 +356,16 @@ public class Sequence30_40 { return null; org.hl7.fhir.r4.model.MolecularSequence.MolecularSequenceVariantComponent tgt = new org.hl7.fhir.r4.model.MolecularSequence.MolecularSequenceVariantComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasStart()) - tgt.setStart(src.getStart()); - if (src.hasEnd()) - tgt.setEnd(src.getEnd()); - if (src.hasObservedAllele()) - tgt.setObservedAllele(src.getObservedAllele()); - if (src.hasReferenceAllele()) - tgt.setReferenceAllele(src.getReferenceAllele()); - if (src.hasCigar()) - tgt.setCigar(src.getCigar()); + if (src.hasStartElement()) + tgt.setStartElement((IntegerType) VersionConvertor_30_40.convertType(src.getStartElement())); + if (src.hasEndElement()) + tgt.setEndElement((IntegerType) VersionConvertor_30_40.convertType(src.getEndElement())); + if (src.hasObservedAlleleElement()) + tgt.setObservedAlleleElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getObservedAlleleElement())); + if (src.hasReferenceAlleleElement()) + tgt.setReferenceAlleleElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getReferenceAlleleElement())); + if (src.hasCigarElement()) + tgt.setCigarElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getCigarElement())); if (src.hasVariantPointer()) tgt.setVariantPointer(VersionConvertor_30_40.convertReference(src.getVariantPointer())); return tgt; @@ -370,16 +376,16 @@ public class Sequence30_40 { return null; org.hl7.fhir.dstu3.model.Sequence.SequenceVariantComponent tgt = new org.hl7.fhir.dstu3.model.Sequence.SequenceVariantComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasStart()) - tgt.setStart(src.getStart()); - if (src.hasEnd()) - tgt.setEnd(src.getEnd()); - if (src.hasObservedAllele()) - tgt.setObservedAllele(src.getObservedAllele()); - if (src.hasReferenceAllele()) - tgt.setReferenceAllele(src.getReferenceAllele()); - if (src.hasCigar()) - tgt.setCigar(src.getCigar()); + if (src.hasStartElement()) + tgt.setStartElement((org.hl7.fhir.dstu3.model.IntegerType) VersionConvertor_30_40.convertType(src.getStartElement())); + if (src.hasEndElement()) + tgt.setEndElement((org.hl7.fhir.dstu3.model.IntegerType) VersionConvertor_30_40.convertType(src.getEndElement())); + if (src.hasObservedAlleleElement()) + tgt.setObservedAlleleElement((StringType) VersionConvertor_30_40.convertType(src.getObservedAlleleElement())); + if (src.hasReferenceAlleleElement()) + tgt.setReferenceAlleleElement((StringType) VersionConvertor_30_40.convertType(src.getReferenceAlleleElement())); + if (src.hasCigarElement()) + tgt.setCigarElement((StringType) VersionConvertor_30_40.convertType(src.getCigarElement())); if (src.hasVariantPointer()) tgt.setVariantPointer(VersionConvertor_30_40.convertReference(src.getVariantPointer())); return tgt; diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Slot30_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Slot30_40.java index de6bc5c12..c0e194261 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Slot30_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Slot30_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_40; import org.hl7.fhir.convertors.VersionConvertor_30_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Slot30_40 { @@ -29,12 +30,12 @@ public class Slot30_40 { tgt.setStatus(convertSlotStatus(src.getStatus())); if (src.hasStart()) tgt.setStartElement(VersionConvertor_30_40.convertInstant(src.getStartElement())); - if (src.hasEnd()) - tgt.setEnd(src.getEnd()); - if (src.hasOverbooked()) - tgt.setOverbooked(src.getOverbooked()); - if (src.hasComment()) - tgt.setComment(src.getComment()); + if (src.hasEndElement()) + tgt.setEndElement((org.hl7.fhir.r4.model.InstantType) VersionConvertor_30_40.convertType(src.getEndElement())); + if (src.hasOverbookedElement()) + tgt.setOverbookedElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_30_40.convertType(src.getOverbookedElement())); + if (src.hasCommentElement()) + tgt.setCommentElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getCommentElement())); return tgt; } @@ -62,12 +63,12 @@ public class Slot30_40 { tgt.setStatus(convertSlotStatus(src.getStatus())); if (src.hasStart()) tgt.setStartElement(VersionConvertor_30_40.convertInstant(src.getStartElement())); - if (src.hasEnd()) - tgt.setEnd(src.getEnd()); - if (src.hasOverbooked()) - tgt.setOverbooked(src.getOverbooked()); - if (src.hasComment()) - tgt.setComment(src.getComment()); + if (src.hasEndElement()) + tgt.setEndElement((org.hl7.fhir.dstu3.model.InstantType) VersionConvertor_30_40.convertType(src.getEndElement())); + if (src.hasOverbookedElement()) + tgt.setOverbookedElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_40.convertType(src.getOverbookedElement())); + if (src.hasCommentElement()) + tgt.setCommentElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getCommentElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Specimen30_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Specimen30_40.java index 2263d8bb6..fc788a2df 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Specimen30_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Specimen30_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_40; import org.hl7.fhir.convertors.VersionConvertor_30_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Specimen30_40 { @@ -125,8 +126,8 @@ public class Specimen30_40 { if (src.hasIdentifier()) { for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_30_40.convertIdentifier(t)); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); if (src.hasType()) tgt.setType(VersionConvertor_30_40.convertCodeableConcept(src.getType())); if (src.hasCapacity()) @@ -146,8 +147,8 @@ public class Specimen30_40 { if (src.hasIdentifier()) { for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_30_40.convertIdentifier(t)); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); if (src.hasType()) tgt.setType(VersionConvertor_30_40.convertCodeableConcept(src.getType())); if (src.hasCapacity()) @@ -164,8 +165,8 @@ public class Specimen30_40 { return null; org.hl7.fhir.r4.model.Specimen.SpecimenProcessingComponent tgt = new org.hl7.fhir.r4.model.Specimen.SpecimenProcessingComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); if (src.hasProcedure()) tgt.setProcedure(VersionConvertor_30_40.convertCodeableConcept(src.getProcedure())); if (src.hasAdditive()) { @@ -181,8 +182,8 @@ public class Specimen30_40 { return null; org.hl7.fhir.dstu3.model.Specimen.SpecimenProcessingComponent tgt = new org.hl7.fhir.dstu3.model.Specimen.SpecimenProcessingComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); if (src.hasProcedure()) tgt.setProcedure(VersionConvertor_30_40.convertCodeableConcept(src.getProcedure())); if (src.hasAdditive()) { diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/StructureDefinition30_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/StructureDefinition30_40.java index f065a7ff1..35a77dc7f 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/StructureDefinition30_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/StructureDefinition30_40.java @@ -1,8 +1,10 @@ package org.hl7.fhir.convertors.conv30_40; import org.hl7.fhir.convertors.VersionConvertor_30_40; +import org.hl7.fhir.dstu3.model.CodeType; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.utilities.Utilities; +import java.util.Collections; public class StructureDefinition30_40 { @@ -46,40 +48,40 @@ public class StructureDefinition30_40 { return null; org.hl7.fhir.dstu3.model.StructureDefinition tgt = new org.hl7.fhir.dstu3.model.StructureDefinition(); VersionConvertor_30_40.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_40.convertType(src.getUrlElement())); if (src.hasIdentifier()) { for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_30_40.convertIdentifier(t)); } - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getNameElement())); + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getTitleElement())); if (src.hasStatus()) tgt.setStatus(VersionConvertor_30_40.convertPublicationStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_40.convertType(src.getExperimentalElement())); if (src.hasDateElement()) tgt.setDateElement(VersionConvertor_30_40.convertDateTime(src.getDateElement())); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact()) tgt.addContact(VersionConvertor_30_40.convertContactDetail(t)); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); if (src.hasUseContext()) { for (org.hl7.fhir.r4.model.UsageContext t : src.getUseContext()) tgt.addUseContext(VersionConvertor_30_40.convertUsageContext(t)); } if (src.hasJurisdiction()) { for (org.hl7.fhir.r4.model.CodeableConcept t : src.getJurisdiction()) tgt.addJurisdiction(VersionConvertor_30_40.convertCodeableConcept(t)); } - if (src.hasPurpose()) - tgt.setPurpose(src.getPurpose()); - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); + if (src.hasPurposeElement()) + tgt.setPurposeElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_40.convertType(src.getPurposeElement())); + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_40.convertType(src.getCopyrightElement())); if (src.hasKeyword()) { for (org.hl7.fhir.r4.model.Coding t : src.getKeyword()) tgt.addKeyword(VersionConvertor_30_40.convertCoding(t)); } @@ -90,20 +92,20 @@ public class StructureDefinition30_40 { } if (src.hasKind()) tgt.setKind(convertStructureDefinitionKind(src.getKind())); - if (src.hasAbstract()) - tgt.setAbstract(src.getAbstract()); + if (src.hasAbstractElement()) + tgt.setAbstractElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_40.convertType(src.getAbstractElement())); for (org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionContextComponent t : src.getContext()) { if (!tgt.hasContextType()) - tgt.setContextType(convertExtensionContext(t.getType(), t.getExpression())); + tgt.setTypeElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_30_40.convertType(src.getTypeElement())); tgt.addContext("Element".equals(t.getExpression()) ? "*" : t.getExpression()); } if (src.hasContextInvariant()) { for (org.hl7.fhir.r4.model.StringType t : src.getContextInvariant()) tgt.addContextInvariant(t.getValue()); } - if (src.hasType()) - tgt.setType(src.getType()); - if (src.hasBaseDefinition()) - tgt.setBaseDefinition(src.getBaseDefinition()); + if (src.hasTypeElement()) + tgt.setTypeElement((CodeType) VersionConvertor_30_40.convertType(src.getTypeElement())); + if (src.hasBaseDefinitionElement()) + tgt.setBaseDefinitionElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_40.convertType(src.getBaseDefinitionElement())); if (src.hasDerivation()) tgt.setDerivation(convertTypeDerivationRule(src.getDerivation())); if (src.hasSnapshot()) @@ -118,40 +120,40 @@ public class StructureDefinition30_40 { return null; org.hl7.fhir.r4.model.StructureDefinition tgt = new org.hl7.fhir.r4.model.StructureDefinition(); VersionConvertor_30_40.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_30_40.convertType(src.getUrlElement())); if (src.hasIdentifier()) { for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_30_40.convertIdentifier(t)); } - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getNameElement())); + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getTitleElement())); if (src.hasStatus()) tgt.setStatus(VersionConvertor_30_40.convertPublicationStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_30_40.convertType(src.getExperimentalElement())); if (src.hasDateElement()) tgt.setDateElement(VersionConvertor_30_40.convertDateTime(src.getDateElement())); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) tgt.addContact(VersionConvertor_30_40.convertContactDetail(t)); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r4.model.MarkdownType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); if (src.hasUseContext()) { for (org.hl7.fhir.dstu3.model.UsageContext t : src.getUseContext()) tgt.addUseContext(VersionConvertor_30_40.convertUsageContext(t)); } if (src.hasJurisdiction()) { for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getJurisdiction()) tgt.addJurisdiction(VersionConvertor_30_40.convertCodeableConcept(t)); } - if (src.hasPurpose()) - tgt.setPurpose(src.getPurpose()); - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); + if (src.hasPurposeElement()) + tgt.setPurposeElement((org.hl7.fhir.r4.model.MarkdownType) VersionConvertor_30_40.convertType(src.getPurposeElement())); + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.r4.model.MarkdownType) VersionConvertor_30_40.convertType(src.getCopyrightElement())); if (src.hasKeyword()) { for (org.hl7.fhir.dstu3.model.Coding t : src.getKeyword()) tgt.addKeyword(VersionConvertor_30_40.convertCoding(t)); } @@ -162,8 +164,8 @@ public class StructureDefinition30_40 { } if (src.hasKind()) tgt.setKind(convertStructureDefinitionKind(src.getKind())); - if (src.hasAbstract()) - tgt.setAbstract(src.getAbstract()); + if (src.hasAbstractElement()) + tgt.setAbstractElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_30_40.convertType(src.getAbstractElement())); for (org.hl7.fhir.dstu3.model.StringType t : src.getContext()) { org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionContextComponent ec = tgt.addContext(); if (src.hasContextType()) { @@ -174,10 +176,10 @@ public class StructureDefinition30_40 { if (src.hasContextInvariant()) { for (org.hl7.fhir.dstu3.model.StringType t : src.getContextInvariant()) tgt.addContextInvariant(t.getValue()); } - if (src.hasType()) - tgt.setType(src.getType()); - if (src.hasBaseDefinition()) - tgt.setBaseDefinition(src.getBaseDefinition()); + if (src.hasTypeElement()) + tgt.setTypeElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_30_40.convertType(src.getTypeElement())); + if (src.hasBaseDefinitionElement()) + tgt.setBaseDefinitionElement((org.hl7.fhir.r4.model.CanonicalType) VersionConvertor_30_40.convertType(src.getBaseDefinitionElement())); if (src.hasDerivation()) tgt.setDerivation(convertTypeDerivationRule(src.getDerivation())); if (src.hasSnapshot()) @@ -255,14 +257,14 @@ public class StructureDefinition30_40 { return null; org.hl7.fhir.dstu3.model.StructureDefinition.StructureDefinitionMappingComponent tgt = new org.hl7.fhir.dstu3.model.StructureDefinition.StructureDefinitionMappingComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasIdentity()) - tgt.setIdentity(src.getIdentity()); - if (src.hasUri()) - tgt.setUri(src.getUri()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasComment()) - tgt.setComment(src.getComment()); + if (src.hasIdentityElement()) + tgt.setIdentityElement((org.hl7.fhir.dstu3.model.IdType) VersionConvertor_30_40.convertType(src.getIdentityElement())); + if (src.hasUriElement()) + tgt.setUriElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_40.convertType(src.getUriElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getNameElement())); + if (src.hasCommentElement()) + tgt.setCommentElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getCommentElement())); return tgt; } @@ -271,14 +273,14 @@ public class StructureDefinition30_40 { return null; org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionMappingComponent tgt = new org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionMappingComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasIdentity()) - tgt.setIdentity(src.getIdentity()); - if (src.hasUri()) - tgt.setUri(src.getUri()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasComment()) - tgt.setComment(src.getComment()); + if (src.hasIdentityElement()) + tgt.setIdentityElement((org.hl7.fhir.r4.model.IdType) VersionConvertor_30_40.convertType(src.getIdentityElement())); + if (src.hasUriElement()) + tgt.setUriElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_30_40.convertType(src.getUriElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getNameElement())); + if (src.hasCommentElement()) + tgt.setCommentElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getCommentElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/StructureMap30_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/StructureMap30_40.java index 39ec10314..4e864b1a5 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/StructureMap30_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/StructureMap30_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_40; import org.hl7.fhir.convertors.VersionConvertor_30_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class StructureMap30_40 { @@ -10,40 +11,40 @@ public class StructureMap30_40 { return null; org.hl7.fhir.dstu3.model.StructureMap tgt = new org.hl7.fhir.dstu3.model.StructureMap(); VersionConvertor_30_40.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_40.convertType(src.getUrlElement())); if (src.hasIdentifier()) { for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_30_40.convertIdentifier(t)); } - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getNameElement())); + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getTitleElement())); if (src.hasStatus()) tgt.setStatus(VersionConvertor_30_40.convertPublicationStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_40.convertType(src.getExperimentalElement())); if (src.hasDateElement()) tgt.setDateElement(VersionConvertor_30_40.convertDateTime(src.getDateElement())); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact()) tgt.addContact(VersionConvertor_30_40.convertContactDetail(t)); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); if (src.hasUseContext()) { for (org.hl7.fhir.r4.model.UsageContext t : src.getUseContext()) tgt.addUseContext(VersionConvertor_30_40.convertUsageContext(t)); } if (src.hasJurisdiction()) { for (org.hl7.fhir.r4.model.CodeableConcept t : src.getJurisdiction()) tgt.addJurisdiction(VersionConvertor_30_40.convertCodeableConcept(t)); } - if (src.hasPurpose()) - tgt.setPurpose(src.getPurpose()); - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); + if (src.hasPurposeElement()) + tgt.setPurposeElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_40.convertType(src.getPurposeElement())); + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_40.convertType(src.getCopyrightElement())); if (src.hasStructure()) { for (org.hl7.fhir.r4.model.StructureMap.StructureMapStructureComponent t : src.getStructure()) tgt.addStructure(convertStructureMapStructureComponent(t)); } @@ -61,40 +62,40 @@ public class StructureMap30_40 { return null; org.hl7.fhir.r4.model.StructureMap tgt = new org.hl7.fhir.r4.model.StructureMap(); VersionConvertor_30_40.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_30_40.convertType(src.getUrlElement())); if (src.hasIdentifier()) { for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_30_40.convertIdentifier(t)); } - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getNameElement())); + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getTitleElement())); if (src.hasStatus()) tgt.setStatus(VersionConvertor_30_40.convertPublicationStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_30_40.convertType(src.getExperimentalElement())); if (src.hasDateElement()) tgt.setDateElement(VersionConvertor_30_40.convertDateTime(src.getDateElement())); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) tgt.addContact(VersionConvertor_30_40.convertContactDetail(t)); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r4.model.MarkdownType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); if (src.hasUseContext()) { for (org.hl7.fhir.dstu3.model.UsageContext t : src.getUseContext()) tgt.addUseContext(VersionConvertor_30_40.convertUsageContext(t)); } if (src.hasJurisdiction()) { for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getJurisdiction()) tgt.addJurisdiction(VersionConvertor_30_40.convertCodeableConcept(t)); } - if (src.hasPurpose()) - tgt.setPurpose(src.getPurpose()); - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); + if (src.hasPurposeElement()) + tgt.setPurposeElement((org.hl7.fhir.r4.model.MarkdownType) VersionConvertor_30_40.convertType(src.getPurposeElement())); + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.r4.model.MarkdownType) VersionConvertor_30_40.convertType(src.getCopyrightElement())); if (src.hasStructure()) { for (org.hl7.fhir.dstu3.model.StructureMap.StructureMapStructureComponent t : src.getStructure()) tgt.addStructure(convertStructureMapStructureComponent(t)); } @@ -138,14 +139,14 @@ public class StructureMap30_40 { return null; org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupComponent tgt = new org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasExtends()) - tgt.setExtends(src.getExtends()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.IdType) VersionConvertor_30_40.convertType(src.getNameElement())); + if (src.hasExtendsElement()) + tgt.setExtendsElement((org.hl7.fhir.dstu3.model.IdType) VersionConvertor_30_40.convertType(src.getExtendsElement())); if (src.hasTypeMode()) tgt.setTypeMode(convertStructureMapGroupTypeMode(src.getTypeMode())); - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getDocumentationElement())); if (src.hasInput()) { for (org.hl7.fhir.r4.model.StructureMap.StructureMapGroupInputComponent t : src.getInput()) tgt.addInput(convertStructureMapGroupInputComponent(t)); } @@ -160,14 +161,14 @@ public class StructureMap30_40 { return null; org.hl7.fhir.r4.model.StructureMap.StructureMapGroupComponent tgt = new org.hl7.fhir.r4.model.StructureMap.StructureMapGroupComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasExtends()) - tgt.setExtends(src.getExtends()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.IdType) VersionConvertor_30_40.convertType(src.getNameElement())); + if (src.hasExtendsElement()) + tgt.setExtendsElement((org.hl7.fhir.r4.model.IdType) VersionConvertor_30_40.convertType(src.getExtendsElement())); if (src.hasTypeMode()) tgt.setTypeMode(convertStructureMapGroupTypeMode(src.getTypeMode())); - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getDocumentationElement())); if (src.hasInput()) { for (org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupInputComponent t : src.getInput()) tgt.addInput(convertStructureMapGroupInputComponent(t)); } @@ -182,14 +183,14 @@ public class StructureMap30_40 { return null; org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupInputComponent tgt = new org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupInputComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasType()) - tgt.setType(src.getType()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.IdType) VersionConvertor_30_40.convertType(src.getNameElement())); + if (src.hasTypeElement()) + tgt.setTypeElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getTypeElement())); if (src.hasMode()) tgt.setMode(convertStructureMapInputMode(src.getMode())); - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getDocumentationElement())); return tgt; } @@ -198,14 +199,14 @@ public class StructureMap30_40 { return null; org.hl7.fhir.r4.model.StructureMap.StructureMapGroupInputComponent tgt = new org.hl7.fhir.r4.model.StructureMap.StructureMapGroupInputComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasType()) - tgt.setType(src.getType()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.IdType) VersionConvertor_30_40.convertType(src.getNameElement())); + if (src.hasTypeElement()) + tgt.setTypeElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getTypeElement())); if (src.hasMode()) tgt.setMode(convertStructureMapInputMode(src.getMode())); - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getDocumentationElement())); return tgt; } @@ -214,8 +215,8 @@ public class StructureMap30_40 { return null; org.hl7.fhir.r4.model.StructureMap.StructureMapGroupRuleComponent tgt = new org.hl7.fhir.r4.model.StructureMap.StructureMapGroupRuleComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.IdType) VersionConvertor_30_40.convertType(src.getNameElement())); if (src.hasSource()) { for (org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupRuleSourceComponent t : src.getSource()) tgt.addSource(convertStructureMapGroupRuleSourceComponent(t)); } @@ -228,8 +229,8 @@ public class StructureMap30_40 { if (src.hasDependent()) { for (org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupRuleDependentComponent t : src.getDependent()) tgt.addDependent(convertStructureMapGroupRuleDependentComponent(t)); } - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getDocumentationElement())); return tgt; } @@ -238,8 +239,8 @@ public class StructureMap30_40 { return null; org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupRuleComponent tgt = new org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupRuleComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.IdType) VersionConvertor_30_40.convertType(src.getNameElement())); if (src.hasSource()) { for (org.hl7.fhir.r4.model.StructureMap.StructureMapGroupRuleSourceComponent t : src.getSource()) tgt.addSource(convertStructureMapGroupRuleSourceComponent(t)); } @@ -252,8 +253,8 @@ public class StructureMap30_40 { if (src.hasDependent()) { for (org.hl7.fhir.r4.model.StructureMap.StructureMapGroupRuleDependentComponent t : src.getDependent()) tgt.addDependent(convertStructureMapGroupRuleDependentComponent(t)); } - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getDocumentationElement())); return tgt; } @@ -262,8 +263,8 @@ public class StructureMap30_40 { return null; org.hl7.fhir.r4.model.StructureMap.StructureMapGroupRuleDependentComponent tgt = new org.hl7.fhir.r4.model.StructureMap.StructureMapGroupRuleDependentComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.IdType) VersionConvertor_30_40.convertType(src.getNameElement())); if (src.hasVariable()) { for (org.hl7.fhir.dstu3.model.StringType t : src.getVariable()) tgt.addVariable(t.getValue()); } @@ -275,8 +276,8 @@ public class StructureMap30_40 { return null; org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupRuleDependentComponent tgt = new org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupRuleDependentComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.IdType) VersionConvertor_30_40.convertType(src.getNameElement())); if (src.hasVariable()) { for (org.hl7.fhir.r4.model.StringType t : src.getVariable()) tgt.addVariable(t.getValue()); } @@ -288,26 +289,26 @@ public class StructureMap30_40 { return null; org.hl7.fhir.r4.model.StructureMap.StructureMapGroupRuleSourceComponent tgt = new org.hl7.fhir.r4.model.StructureMap.StructureMapGroupRuleSourceComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasContext()) - tgt.setContext(src.getContext()); - if (src.hasMin()) - tgt.setMin(src.getMin()); - if (src.hasMax()) - tgt.setMax(src.getMax()); - if (src.hasType()) - tgt.setType(src.getType()); + if (src.hasContextElement()) + tgt.setContextElement((org.hl7.fhir.r4.model.IdType) VersionConvertor_30_40.convertType(src.getContextElement())); + if (src.hasMinElement()) + tgt.setMinElement((org.hl7.fhir.r4.model.IntegerType) VersionConvertor_30_40.convertType(src.getMinElement())); + if (src.hasMaxElement()) + tgt.setMaxElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getMaxElement())); + if (src.hasTypeElement()) + tgt.setTypeElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getTypeElement())); if (src.hasDefaultValue()) tgt.setDefaultValue(VersionConvertor_30_40.convertType(src.getDefaultValue())); - if (src.hasElement()) - tgt.setElement(src.getElement()); + if (src.hasElementElement()) + tgt.setElementElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getElementElement())); if (src.hasListMode()) tgt.setListMode(convertStructureMapSourceListMode(src.getListMode())); - if (src.hasVariable()) - tgt.setVariable(src.getVariable()); - if (src.hasCondition()) - tgt.setCondition(src.getCondition()); - if (src.hasCheck()) - tgt.setCheck(src.getCheck()); + if (src.hasVariableElement()) + tgt.setVariableElement((org.hl7.fhir.r4.model.IdType) VersionConvertor_30_40.convertType(src.getVariableElement())); + if (src.hasConditionElement()) + tgt.setConditionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getConditionElement())); + if (src.hasCheckElement()) + tgt.setCheckElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getCheckElement())); return tgt; } @@ -316,26 +317,26 @@ public class StructureMap30_40 { return null; org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupRuleSourceComponent tgt = new org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupRuleSourceComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasContext()) - tgt.setContext(src.getContext()); - if (src.hasMin()) - tgt.setMin(src.getMin()); - if (src.hasMax()) - tgt.setMax(src.getMax()); - if (src.hasType()) - tgt.setType(src.getType()); + if (src.hasContextElement()) + tgt.setContextElement((org.hl7.fhir.dstu3.model.IdType) VersionConvertor_30_40.convertType(src.getContextElement())); + if (src.hasMinElement()) + tgt.setMinElement((org.hl7.fhir.dstu3.model.IntegerType) VersionConvertor_30_40.convertType(src.getMinElement())); + if (src.hasMaxElement()) + tgt.setMaxElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getMaxElement())); + if (src.hasTypeElement()) + tgt.setTypeElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getTypeElement())); if (src.hasDefaultValue()) tgt.setDefaultValue(VersionConvertor_30_40.convertType(src.getDefaultValue())); - if (src.hasElement()) - tgt.setElement(src.getElement()); + if (src.hasElementElement()) + tgt.setElementElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getElementElement())); if (src.hasListMode()) tgt.setListMode(convertStructureMapSourceListMode(src.getListMode())); - if (src.hasVariable()) - tgt.setVariable(src.getVariable()); - if (src.hasCondition()) - tgt.setCondition(src.getCondition()); - if (src.hasCheck()) - tgt.setCheck(src.getCheck()); + if (src.hasVariableElement()) + tgt.setVariableElement((org.hl7.fhir.dstu3.model.IdType) VersionConvertor_30_40.convertType(src.getVariableElement())); + if (src.hasConditionElement()) + tgt.setConditionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getConditionElement())); + if (src.hasCheckElement()) + tgt.setCheckElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getCheckElement())); return tgt; } @@ -344,19 +345,19 @@ public class StructureMap30_40 { return null; org.hl7.fhir.r4.model.StructureMap.StructureMapGroupRuleTargetComponent tgt = new org.hl7.fhir.r4.model.StructureMap.StructureMapGroupRuleTargetComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasContext()) - tgt.setContext(src.getContext()); + if (src.hasContextElement()) + tgt.setContextElement((org.hl7.fhir.r4.model.IdType) VersionConvertor_30_40.convertType(src.getContextElement())); if (src.hasContextType()) tgt.setContextType(convertStructureMapContextType(src.getContextType())); - if (src.hasElement()) - tgt.setElement(src.getElement()); - if (src.hasVariable()) - tgt.setVariable(src.getVariable()); + if (src.hasElementElement()) + tgt.setElementElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getElementElement())); + if (src.hasVariableElement()) + tgt.setVariableElement((org.hl7.fhir.r4.model.IdType) VersionConvertor_30_40.convertType(src.getVariableElement())); if (src.hasListMode()) { for (org.hl7.fhir.dstu3.model.Enumeration t : src.getListMode()) VersionConvertor_30_40.copyElement(t, tgt.addListModeElement().setValue(convertStructureMapTargetListMode(t.getValue()))); } - if (src.hasListRuleId()) - tgt.setListRuleId(src.getListRuleId()); + if (src.hasListRuleIdElement()) + tgt.setListRuleIdElement((org.hl7.fhir.r4.model.IdType) VersionConvertor_30_40.convertType(src.getListRuleIdElement())); if (src.hasTransform()) tgt.setTransform(convertStructureMapTransform(src.getTransform())); if (src.hasParameter()) { @@ -370,19 +371,19 @@ public class StructureMap30_40 { return null; org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupRuleTargetComponent tgt = new org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupRuleTargetComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasContext()) - tgt.setContext(src.getContext()); + if (src.hasContextElement()) + tgt.setContextElement((org.hl7.fhir.dstu3.model.IdType) VersionConvertor_30_40.convertType(src.getContextElement())); if (src.hasContextType()) tgt.setContextType(convertStructureMapContextType(src.getContextType())); - if (src.hasElement()) - tgt.setElement(src.getElement()); - if (src.hasVariable()) - tgt.setVariable(src.getVariable()); + if (src.hasElementElement()) + tgt.setElementElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getElementElement())); + if (src.hasVariableElement()) + tgt.setVariableElement((org.hl7.fhir.dstu3.model.IdType) VersionConvertor_30_40.convertType(src.getVariableElement())); if (src.hasListMode()) { for (org.hl7.fhir.r4.model.Enumeration t : src.getListMode()) VersionConvertor_30_40.copyElement(t, tgt.addListModeElement().setValue(convertStructureMapTargetListMode(t.getValue()))); } - if (src.hasListRuleId()) - tgt.setListRuleId(src.getListRuleId()); + if (src.hasListRuleIdElement()) + tgt.setListRuleIdElement((org.hl7.fhir.dstu3.model.IdType) VersionConvertor_30_40.convertType(src.getListRuleIdElement())); if (src.hasTransform()) tgt.setTransform(convertStructureMapTransform(src.getTransform())); if (src.hasParameter()) { @@ -544,14 +545,14 @@ public class StructureMap30_40 { return null; org.hl7.fhir.dstu3.model.StructureMap.StructureMapStructureComponent tgt = new org.hl7.fhir.dstu3.model.StructureMap.StructureMapStructureComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_40.convertType(src.getUrlElement())); if (src.hasMode()) tgt.setMode(convertStructureMapModelMode(src.getMode())); - if (src.hasAlias()) - tgt.setAlias(src.getAlias()); - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasAliasElement()) + tgt.setAliasElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getAliasElement())); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getDocumentationElement())); return tgt; } @@ -560,14 +561,14 @@ public class StructureMap30_40 { return null; org.hl7.fhir.r4.model.StructureMap.StructureMapStructureComponent tgt = new org.hl7.fhir.r4.model.StructureMap.StructureMapStructureComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r4.model.CanonicalType) VersionConvertor_30_40.convertType(src.getUrlElement())); if (src.hasMode()) tgt.setMode(convertStructureMapModelMode(src.getMode())); - if (src.hasAlias()) - tgt.setAlias(src.getAlias()); - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasAliasElement()) + tgt.setAliasElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getAliasElement())); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getDocumentationElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Subscription30_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Subscription30_40.java index 154af62e2..40097dbcf 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Subscription30_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Subscription30_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_40; import org.hl7.fhir.convertors.VersionConvertor_30_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Subscription30_40 { @@ -15,14 +16,14 @@ public class Subscription30_40 { if (src.hasContact()) { for (org.hl7.fhir.dstu3.model.ContactPoint t : src.getContact()) tgt.addContact(VersionConvertor_30_40.convertContactPoint(t)); } - if (src.hasEnd()) - tgt.setEnd(src.getEnd()); - if (src.hasReason()) - tgt.setReason(src.getReason()); - if (src.hasCriteria()) - tgt.setCriteria(src.getCriteria()); - if (src.hasError()) - tgt.setError(src.getError()); + if (src.hasEndElement()) + tgt.setEndElement((org.hl7.fhir.r4.model.InstantType) VersionConvertor_30_40.convertType(src.getEndElement())); + if (src.hasReasonElement()) + tgt.setReasonElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getReasonElement())); + if (src.hasCriteriaElement()) + tgt.setCriteriaElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getCriteriaElement())); + if (src.hasErrorElement()) + tgt.setErrorElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getErrorElement())); if (src.hasChannel()) tgt.setChannel(convertSubscriptionChannelComponent(src.getChannel())); return tgt; @@ -38,14 +39,14 @@ public class Subscription30_40 { if (src.hasContact()) { for (org.hl7.fhir.r4.model.ContactPoint t : src.getContact()) tgt.addContact(VersionConvertor_30_40.convertContactPoint(t)); } - if (src.hasEnd()) - tgt.setEnd(src.getEnd()); - if (src.hasReason()) - tgt.setReason(src.getReason()); - if (src.hasCriteria()) - tgt.setCriteria(src.getCriteria()); - if (src.hasError()) - tgt.setError(src.getError()); + if (src.hasEndElement()) + tgt.setEndElement((org.hl7.fhir.dstu3.model.InstantType) VersionConvertor_30_40.convertType(src.getEndElement())); + if (src.hasReasonElement()) + tgt.setReasonElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getReasonElement())); + if (src.hasCriteriaElement()) + tgt.setCriteriaElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getCriteriaElement())); + if (src.hasErrorElement()) + tgt.setErrorElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getErrorElement())); if (src.hasChannel()) tgt.setChannel(convertSubscriptionChannelComponent(src.getChannel())); return tgt; @@ -58,10 +59,10 @@ public class Subscription30_40 { VersionConvertor_30_40.copyElement(src, tgt); if (src.hasType()) tgt.setType(convertSubscriptionChannelType(src.getType())); - if (src.hasEndpoint()) - tgt.setEndpoint(src.getEndpoint()); - if (src.hasPayload()) - tgt.setPayload(src.getPayload()); + if (src.hasEndpointElement()) + tgt.setEndpointElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_40.convertType(src.getEndpointElement())); + if (src.hasPayloadElement()) + tgt.setPayloadElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getPayloadElement())); if (src.hasHeader()) { for (org.hl7.fhir.r4.model.StringType t : src.getHeader()) tgt.addHeader(t.getValue()); } @@ -75,10 +76,10 @@ public class Subscription30_40 { VersionConvertor_30_40.copyElement(src, tgt); if (src.hasType()) tgt.setType(convertSubscriptionChannelType(src.getType())); - if (src.hasEndpoint()) - tgt.setEndpoint(src.getEndpoint()); - if (src.hasPayload()) - tgt.setPayload(src.getPayload()); + if (src.hasEndpointElement()) + tgt.setEndpointElement((org.hl7.fhir.r4.model.UrlType) VersionConvertor_30_40.convertType(src.getEndpointElement())); + if (src.hasPayloadElement()) + tgt.setPayloadElement((org.hl7.fhir.r4.model.CodeType) VersionConvertor_30_40.convertType(src.getPayloadElement())); if (src.hasHeader()) { for (org.hl7.fhir.dstu3.model.StringType t : src.getHeader()) tgt.addHeader(t.getValue()); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Substance30_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Substance30_40.java index 64fef25c6..e8869452b 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Substance30_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/Substance30_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_40; import org.hl7.fhir.convertors.VersionConvertor_30_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Substance30_40 { @@ -50,8 +51,8 @@ public class Substance30_40 { } if (src.hasCode()) tgt.setCode(VersionConvertor_30_40.convertCodeableConcept(src.getCode())); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); if (src.hasInstance()) { for (org.hl7.fhir.dstu3.model.Substance.SubstanceInstanceComponent t : src.getInstance()) tgt.addInstance(convertSubstanceInstanceComponent(t)); } @@ -76,8 +77,8 @@ public class Substance30_40 { } if (src.hasCode()) tgt.setCode(VersionConvertor_30_40.convertCodeableConcept(src.getCode())); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); if (src.hasInstance()) { for (org.hl7.fhir.r4.model.Substance.SubstanceInstanceComponent t : src.getInstance()) tgt.addInstance(convertSubstanceInstanceComponent(t)); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/SupplyDelivery30_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/SupplyDelivery30_40.java index 23b5a1d88..1a1b2bbd4 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/SupplyDelivery30_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/SupplyDelivery30_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_40; import org.hl7.fhir.convertors.VersionConvertor_30_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class SupplyDelivery30_40 { diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/TestReport30_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/TestReport30_40.java index 41e0fa78d..9296fffe4 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/TestReport30_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/TestReport30_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_40; import org.hl7.fhir.convertors.VersionConvertor_30_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class TestReport30_40 { @@ -12,18 +13,18 @@ public class TestReport30_40 { VersionConvertor_30_40.copyDomainResource(src, tgt); if (src.hasIdentifier()) tgt.setIdentifier(VersionConvertor_30_40.convertIdentifier(src.getIdentifier())); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getNameElement())); if (src.hasStatus()) tgt.setStatus(convertTestReportStatus(src.getStatus())); if (src.hasTestScript()) tgt.setTestScript(VersionConvertor_30_40.convertReference(src.getTestScript())); if (src.hasResult()) tgt.setResult(convertTestReportResult(src.getResult())); - if (src.hasScore()) - tgt.setScore(src.getScore()); - if (src.hasTester()) - tgt.setTester(src.getTester()); + if (src.hasScoreElement()) + tgt.setScoreElement((org.hl7.fhir.r4.model.DecimalType) VersionConvertor_30_40.convertType(src.getScoreElement())); + if (src.hasTesterElement()) + tgt.setTesterElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getTesterElement())); if (src.hasIssued()) tgt.setIssuedElement(VersionConvertor_30_40.convertDateTime(src.getIssuedElement())); if (src.hasParticipant()) { @@ -46,18 +47,18 @@ public class TestReport30_40 { VersionConvertor_30_40.copyDomainResource(src, tgt); if (src.hasIdentifier()) tgt.setIdentifier(VersionConvertor_30_40.convertIdentifier(src.getIdentifier())); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getNameElement())); if (src.hasStatus()) tgt.setStatus(convertTestReportStatus(src.getStatus())); if (src.hasTestScript()) tgt.setTestScript(VersionConvertor_30_40.convertReference(src.getTestScript())); if (src.hasResult()) tgt.setResult(convertTestReportResult(src.getResult())); - if (src.hasScore()) - tgt.setScore(src.getScore()); - if (src.hasTester()) - tgt.setTester(src.getTester()); + if (src.hasScoreElement()) + tgt.setScoreElement((org.hl7.fhir.dstu3.model.DecimalType) VersionConvertor_30_40.convertType(src.getScoreElement())); + if (src.hasTesterElement()) + tgt.setTesterElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getTesterElement())); if (src.hasIssued()) tgt.setIssuedElement(VersionConvertor_30_40.convertDateTime(src.getIssuedElement())); if (src.hasParticipant()) { @@ -80,10 +81,10 @@ public class TestReport30_40 { VersionConvertor_30_40.copyElement(src, tgt); if (src.hasType()) tgt.setType(convertTestReportParticipantType(src.getType())); - if (src.hasUri()) - tgt.setUri(src.getUri()); - if (src.hasDisplay()) - tgt.setDisplay(src.getDisplay()); + if (src.hasUriElement()) + tgt.setUriElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_30_40.convertType(src.getUriElement())); + if (src.hasDisplayElement()) + tgt.setDisplayElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getDisplayElement())); return tgt; } @@ -94,10 +95,10 @@ public class TestReport30_40 { VersionConvertor_30_40.copyElement(src, tgt); if (src.hasType()) tgt.setType(convertTestReportParticipantType(src.getType())); - if (src.hasUri()) - tgt.setUri(src.getUri()); - if (src.hasDisplay()) - tgt.setDisplay(src.getDisplay()); + if (src.hasUriElement()) + tgt.setUriElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_40.convertType(src.getUriElement())); + if (src.hasDisplayElement()) + tgt.setDisplayElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getDisplayElement())); return tgt; } @@ -248,10 +249,10 @@ public class TestReport30_40 { return null; org.hl7.fhir.dstu3.model.TestReport.TestReportTestComponent tgt = new org.hl7.fhir.dstu3.model.TestReport.TestReportTestComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getNameElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); if (src.hasAction()) { for (org.hl7.fhir.r4.model.TestReport.TestActionComponent t : src.getAction()) tgt.addAction(VersionConvertor_30_40.convertTestActionComponent(t)); } @@ -263,10 +264,10 @@ public class TestReport30_40 { return null; org.hl7.fhir.r4.model.TestReport.TestReportTestComponent tgt = new org.hl7.fhir.r4.model.TestReport.TestReportTestComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getNameElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); if (src.hasAction()) { for (org.hl7.fhir.dstu3.model.TestReport.TestActionComponent t : src.getAction()) tgt.addAction(VersionConvertor_30_40.convertTestActionComponent(t)); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/TestScript30_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/TestScript30_40.java index 711e27d9c..d469d10e2 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/TestScript30_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/TestScript30_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_40; import org.hl7.fhir.convertors.VersionConvertor_30_40; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class TestScript30_40 { @@ -10,39 +11,39 @@ public class TestScript30_40 { return null; org.hl7.fhir.r4.model.TestScript tgt = new org.hl7.fhir.r4.model.TestScript(); VersionConvertor_30_40.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_30_40.convertType(src.getUrlElement())); if (src.hasIdentifier()) tgt.setIdentifier(VersionConvertor_30_40.convertIdentifier(src.getIdentifier())); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getNameElement())); + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getTitleElement())); if (src.hasStatus()) tgt.setStatus(VersionConvertor_30_40.convertPublicationStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_30_40.convertType(src.getExperimentalElement())); if (src.hasDateElement()) tgt.setDateElement(VersionConvertor_30_40.convertDateTime(src.getDateElement())); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) tgt.addContact(VersionConvertor_30_40.convertContactDetail(t)); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r4.model.MarkdownType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); if (src.hasUseContext()) { for (org.hl7.fhir.dstu3.model.UsageContext t : src.getUseContext()) tgt.addUseContext(VersionConvertor_30_40.convertUsageContext(t)); } if (src.hasJurisdiction()) { for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getJurisdiction()) tgt.addJurisdiction(VersionConvertor_30_40.convertCodeableConcept(t)); } - if (src.hasPurpose()) - tgt.setPurpose(src.getPurpose()); - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); + if (src.hasPurposeElement()) + tgt.setPurposeElement((org.hl7.fhir.r4.model.MarkdownType) VersionConvertor_30_40.convertType(src.getPurposeElement())); + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.r4.model.MarkdownType) VersionConvertor_30_40.convertType(src.getCopyrightElement())); if (src.hasOrigin()) { for (org.hl7.fhir.dstu3.model.TestScript.TestScriptOriginComponent t : src.getOrigin()) tgt.addOrigin(convertTestScriptOriginComponent(t)); } @@ -75,39 +76,39 @@ public class TestScript30_40 { return null; org.hl7.fhir.dstu3.model.TestScript tgt = new org.hl7.fhir.dstu3.model.TestScript(); VersionConvertor_30_40.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_40.convertType(src.getUrlElement())); if (src.hasIdentifier()) tgt.setIdentifier(VersionConvertor_30_40.convertIdentifier(src.getIdentifier())); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getNameElement())); + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getTitleElement())); if (src.hasStatus()) tgt.setStatus(VersionConvertor_30_40.convertPublicationStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_40.convertType(src.getExperimentalElement())); if (src.hasDateElement()) tgt.setDateElement(VersionConvertor_30_40.convertDateTime(src.getDateElement())); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact()) tgt.addContact(VersionConvertor_30_40.convertContactDetail(t)); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); if (src.hasUseContext()) { for (org.hl7.fhir.r4.model.UsageContext t : src.getUseContext()) tgt.addUseContext(VersionConvertor_30_40.convertUsageContext(t)); } if (src.hasJurisdiction()) { for (org.hl7.fhir.r4.model.CodeableConcept t : src.getJurisdiction()) tgt.addJurisdiction(VersionConvertor_30_40.convertCodeableConcept(t)); } - if (src.hasPurpose()) - tgt.setPurpose(src.getPurpose()); - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); + if (src.hasPurposeElement()) + tgt.setPurposeElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_40.convertType(src.getPurposeElement())); + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_40.convertType(src.getCopyrightElement())); if (src.hasOrigin()) { for (org.hl7.fhir.r4.model.TestScript.TestScriptOriginComponent t : src.getOrigin()) tgt.addOrigin(convertTestScriptOriginComponent(t)); } @@ -140,8 +141,8 @@ public class TestScript30_40 { return null; org.hl7.fhir.r4.model.TestScript.TestScriptDestinationComponent tgt = new org.hl7.fhir.r4.model.TestScript.TestScriptDestinationComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasIndex()) - tgt.setIndex(src.getIndex()); + if (src.hasIndexElement()) + tgt.setIndexElement((org.hl7.fhir.r4.model.IntegerType) VersionConvertor_30_40.convertType(src.getIndexElement())); if (src.hasProfile()) tgt.setProfile(VersionConvertor_30_40.convertCoding(src.getProfile())); return tgt; @@ -152,8 +153,8 @@ public class TestScript30_40 { return null; org.hl7.fhir.dstu3.model.TestScript.TestScriptDestinationComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.TestScriptDestinationComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasIndex()) - tgt.setIndex(src.getIndex()); + if (src.hasIndexElement()) + tgt.setIndexElement((org.hl7.fhir.dstu3.model.IntegerType) VersionConvertor_30_40.convertType(src.getIndexElement())); if (src.hasProfile()) tgt.setProfile(VersionConvertor_30_40.convertCoding(src.getProfile())); return tgt; @@ -164,10 +165,10 @@ public class TestScript30_40 { return null; org.hl7.fhir.r4.model.TestScript.TestScriptFixtureComponent tgt = new org.hl7.fhir.r4.model.TestScript.TestScriptFixtureComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasAutocreate()) - tgt.setAutocreate(src.getAutocreate()); - if (src.hasAutodelete()) - tgt.setAutodelete(src.getAutodelete()); + if (src.hasAutocreateElement()) + tgt.setAutocreateElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_30_40.convertType(src.getAutocreateElement())); + if (src.hasAutodeleteElement()) + tgt.setAutodeleteElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_30_40.convertType(src.getAutodeleteElement())); if (src.hasResource()) tgt.setResource(VersionConvertor_30_40.convertReference(src.getResource())); return tgt; @@ -178,10 +179,10 @@ public class TestScript30_40 { return null; org.hl7.fhir.dstu3.model.TestScript.TestScriptFixtureComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.TestScriptFixtureComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasAutocreate()) - tgt.setAutocreate(src.getAutocreate()); - if (src.hasAutodelete()) - tgt.setAutodelete(src.getAutodelete()); + if (src.hasAutocreateElement()) + tgt.setAutocreateElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_40.convertType(src.getAutocreateElement())); + if (src.hasAutodeleteElement()) + tgt.setAutodeleteElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_40.convertType(src.getAutodeleteElement())); if (src.hasResource()) tgt.setResource(VersionConvertor_30_40.convertReference(src.getResource())); return tgt; @@ -192,17 +193,17 @@ public class TestScript30_40 { return null; org.hl7.fhir.r4.model.TestScript.TestScriptMetadataCapabilityComponent tgt = new org.hl7.fhir.r4.model.TestScript.TestScriptMetadataCapabilityComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasRequired()) - tgt.setRequired(src.getRequired()); - if (src.hasValidated()) - tgt.setValidated(src.getValidated()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasRequiredElement()) + tgt.setRequiredElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_30_40.convertType(src.getRequiredElement())); + if (src.hasValidatedElement()) + tgt.setValidatedElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_30_40.convertType(src.getValidatedElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); if (src.hasOrigin()) { for (org.hl7.fhir.dstu3.model.IntegerType t : src.getOrigin()) tgt.addOrigin(t.getValue()); } - if (src.hasDestination()) - tgt.setDestination(src.getDestination()); + if (src.hasDestinationElement()) + tgt.setDestinationElement((org.hl7.fhir.r4.model.IntegerType) VersionConvertor_30_40.convertType(src.getDestinationElement())); if (src.hasLink()) { for (org.hl7.fhir.dstu3.model.UriType t : src.getLink()) tgt.addLink(t.getValue()); } @@ -216,17 +217,17 @@ public class TestScript30_40 { return null; org.hl7.fhir.dstu3.model.TestScript.TestScriptMetadataCapabilityComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.TestScriptMetadataCapabilityComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasRequired()) - tgt.setRequired(src.getRequired()); - if (src.hasValidated()) - tgt.setValidated(src.getValidated()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasRequiredElement()) + tgt.setRequiredElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_40.convertType(src.getRequiredElement())); + if (src.hasValidatedElement()) + tgt.setValidatedElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_40.convertType(src.getValidatedElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); if (src.hasOrigin()) { for (org.hl7.fhir.r4.model.IntegerType t : src.getOrigin()) tgt.addOrigin(t.getValue()); } - if (src.hasDestination()) - tgt.setDestination(src.getDestination()); + if (src.hasDestinationElement()) + tgt.setDestinationElement((org.hl7.fhir.dstu3.model.IntegerType) VersionConvertor_30_40.convertType(src.getDestinationElement())); if (src.hasLink()) { for (org.hl7.fhir.r4.model.UriType t : src.getLink()) tgt.addLink(t.getValue()); } @@ -268,10 +269,10 @@ public class TestScript30_40 { return null; org.hl7.fhir.r4.model.TestScript.TestScriptMetadataLinkComponent tgt = new org.hl7.fhir.r4.model.TestScript.TestScriptMetadataLinkComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_30_40.convertType(src.getUrlElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); return tgt; } @@ -280,10 +281,10 @@ public class TestScript30_40 { return null; org.hl7.fhir.dstu3.model.TestScript.TestScriptMetadataLinkComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.TestScriptMetadataLinkComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_40.convertType(src.getUrlElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); return tgt; } @@ -292,8 +293,8 @@ public class TestScript30_40 { return null; org.hl7.fhir.dstu3.model.TestScript.TestScriptOriginComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.TestScriptOriginComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasIndex()) - tgt.setIndex(src.getIndex()); + if (src.hasIndexElement()) + tgt.setIndexElement((org.hl7.fhir.dstu3.model.IntegerType) VersionConvertor_30_40.convertType(src.getIndexElement())); if (src.hasProfile()) tgt.setProfile(VersionConvertor_30_40.convertCoding(src.getProfile())); return tgt; @@ -304,8 +305,8 @@ public class TestScript30_40 { return null; org.hl7.fhir.r4.model.TestScript.TestScriptOriginComponent tgt = new org.hl7.fhir.r4.model.TestScript.TestScriptOriginComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasIndex()) - tgt.setIndex(src.getIndex()); + if (src.hasIndexElement()) + tgt.setIndexElement((org.hl7.fhir.r4.model.IntegerType) VersionConvertor_30_40.convertType(src.getIndexElement())); if (src.hasProfile()) tgt.setProfile(VersionConvertor_30_40.convertCoding(src.getProfile())); return tgt; @@ -360,10 +361,10 @@ public class TestScript30_40 { return null; org.hl7.fhir.dstu3.model.TestScript.TestScriptTestComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.TestScriptTestComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getNameElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); if (src.hasAction()) { for (org.hl7.fhir.r4.model.TestScript.TestActionComponent t : src.getAction()) tgt.addAction(VersionConvertor_30_40.convertTestActionComponent(t)); } @@ -375,10 +376,10 @@ public class TestScript30_40 { return null; org.hl7.fhir.r4.model.TestScript.TestScriptTestComponent tgt = new org.hl7.fhir.r4.model.TestScript.TestScriptTestComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getNameElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); if (src.hasAction()) { for (org.hl7.fhir.dstu3.model.TestScript.TestActionComponent t : src.getAction()) tgt.addAction(VersionConvertor_30_40.convertTestActionComponent(t)); } @@ -390,22 +391,22 @@ public class TestScript30_40 { return null; org.hl7.fhir.dstu3.model.TestScript.TestScriptVariableComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.TestScriptVariableComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasDefaultValue()) - tgt.setDefaultValue(src.getDefaultValue()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - if (src.hasExpression()) - tgt.setExpression(src.getExpression()); - if (src.hasHeaderField()) - tgt.setHeaderField(src.getHeaderField()); - if (src.hasHint()) - tgt.setHint(src.getHint()); - if (src.hasPath()) - tgt.setPath(src.getPath()); - if (src.hasSourceId()) - tgt.setSourceId(src.getSourceId()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getNameElement())); + if (src.hasDefaultValueElement()) + tgt.setDefaultValueElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getDefaultValueElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); + if (src.hasExpressionElement()) + tgt.setExpressionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getExpressionElement())); + if (src.hasHeaderFieldElement()) + tgt.setHeaderFieldElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getHeaderFieldElement())); + if (src.hasHintElement()) + tgt.setHintElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getHintElement())); + if (src.hasPathElement()) + tgt.setPathElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getPathElement())); + if (src.hasSourceIdElement()) + tgt.setSourceIdElement((org.hl7.fhir.dstu3.model.IdType) VersionConvertor_30_40.convertType(src.getSourceIdElement())); return tgt; } @@ -414,22 +415,22 @@ public class TestScript30_40 { return null; org.hl7.fhir.r4.model.TestScript.TestScriptVariableComponent tgt = new org.hl7.fhir.r4.model.TestScript.TestScriptVariableComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasDefaultValue()) - tgt.setDefaultValue(src.getDefaultValue()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - if (src.hasExpression()) - tgt.setExpression(src.getExpression()); - if (src.hasHeaderField()) - tgt.setHeaderField(src.getHeaderField()); - if (src.hasHint()) - tgt.setHint(src.getHint()); - if (src.hasPath()) - tgt.setPath(src.getPath()); - if (src.hasSourceId()) - tgt.setSourceId(src.getSourceId()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getNameElement())); + if (src.hasDefaultValueElement()) + tgt.setDefaultValueElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getDefaultValueElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); + if (src.hasExpressionElement()) + tgt.setExpressionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getExpressionElement())); + if (src.hasHeaderFieldElement()) + tgt.setHeaderFieldElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getHeaderFieldElement())); + if (src.hasHintElement()) + tgt.setHintElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getHintElement())); + if (src.hasPathElement()) + tgt.setPathElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getPathElement())); + if (src.hasSourceIdElement()) + tgt.setSourceIdElement((org.hl7.fhir.r4.model.IdType) VersionConvertor_30_40.convertType(src.getSourceIdElement())); return tgt; } } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/ValueSet30_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/ValueSet30_40.java index 094bfb4f0..04fd2f26e 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/ValueSet30_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/ValueSet30_40.java @@ -3,6 +3,7 @@ package org.hl7.fhir.convertors.conv30_40; import org.hl7.fhir.convertors.VersionConvertor_30_40; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r4.model.BooleanType; +import java.util.Collections; public class ValueSet30_40 { @@ -11,10 +12,10 @@ public class ValueSet30_40 { return null; org.hl7.fhir.dstu3.model.ValueSet.ConceptReferenceComponent tgt = new org.hl7.fhir.dstu3.model.ValueSet.ConceptReferenceComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasCode()) - tgt.setCode(src.getCode()); - if (src.hasDisplay()) - tgt.setDisplay(src.getDisplay()); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_30_40.convertType(src.getCodeElement())); + if (src.hasDisplayElement()) + tgt.setDisplayElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getDisplayElement())); if (src.hasDesignation()) { for (org.hl7.fhir.r4.model.ValueSet.ConceptReferenceDesignationComponent t : src.getDesignation()) tgt.addDesignation(convertConceptReferenceDesignationComponent(t)); } @@ -26,10 +27,10 @@ public class ValueSet30_40 { return null; org.hl7.fhir.r4.model.ValueSet.ConceptReferenceComponent tgt = new org.hl7.fhir.r4.model.ValueSet.ConceptReferenceComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasCode()) - tgt.setCode(src.getCode()); - if (src.hasDisplay()) - tgt.setDisplay(src.getDisplay()); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.r4.model.CodeType) VersionConvertor_30_40.convertType(src.getCodeElement())); + if (src.hasDisplayElement()) + tgt.setDisplayElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getDisplayElement())); if (src.hasDesignation()) { for (org.hl7.fhir.dstu3.model.ValueSet.ConceptReferenceDesignationComponent t : src.getDesignation()) tgt.addDesignation(convertConceptReferenceDesignationComponent(t)); } @@ -41,12 +42,12 @@ public class ValueSet30_40 { return null; org.hl7.fhir.dstu3.model.ValueSet.ConceptReferenceDesignationComponent tgt = new org.hl7.fhir.dstu3.model.ValueSet.ConceptReferenceDesignationComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasLanguage()) - tgt.setLanguage(src.getLanguage()); + if (src.hasLanguageElement()) + tgt.setLanguageElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_30_40.convertType(src.getLanguageElement())); if (src.hasUse()) tgt.setUse(VersionConvertor_30_40.convertCoding(src.getUse())); - if (src.hasValue()) - tgt.setValue(src.getValue()); + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getValueElement())); return tgt; } @@ -55,12 +56,12 @@ public class ValueSet30_40 { return null; org.hl7.fhir.r4.model.ValueSet.ConceptReferenceDesignationComponent tgt = new org.hl7.fhir.r4.model.ValueSet.ConceptReferenceDesignationComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasLanguage()) - tgt.setLanguage(src.getLanguage()); + if (src.hasLanguageElement()) + tgt.setLanguageElement((org.hl7.fhir.r4.model.CodeType) VersionConvertor_30_40.convertType(src.getLanguageElement())); if (src.hasUse()) tgt.setUse(VersionConvertor_30_40.convertCoding(src.getUse())); - if (src.hasValue()) - tgt.setValue(src.getValue()); + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getValueElement())); return tgt; } @@ -69,10 +70,10 @@ public class ValueSet30_40 { return null; org.hl7.fhir.dstu3.model.ValueSet.ConceptSetComponent tgt = new org.hl7.fhir.dstu3.model.ValueSet.ConceptSetComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasSystem()) - tgt.setSystem(src.getSystem()); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); + if (src.hasSystemElement()) + tgt.setSystemElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_40.convertType(src.getSystemElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getVersionElement())); if (src.hasConcept()) { for (org.hl7.fhir.r4.model.ValueSet.ConceptReferenceComponent t : src.getConcept()) tgt.addConcept(convertConceptReferenceComponent(t)); } @@ -90,10 +91,10 @@ public class ValueSet30_40 { return null; org.hl7.fhir.r4.model.ValueSet.ConceptSetComponent tgt = new org.hl7.fhir.r4.model.ValueSet.ConceptSetComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasSystem()) - tgt.setSystem(src.getSystem()); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); + if (src.hasSystemElement()) + tgt.setSystemElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_30_40.convertType(src.getSystemElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getVersionElement())); if (src.hasConcept()) { for (org.hl7.fhir.dstu3.model.ValueSet.ConceptReferenceComponent t : src.getConcept()) tgt.addConcept(convertConceptReferenceComponent(t)); } @@ -111,12 +112,12 @@ public class ValueSet30_40 { return null; org.hl7.fhir.r4.model.ValueSet.ConceptSetFilterComponent tgt = new org.hl7.fhir.r4.model.ValueSet.ConceptSetFilterComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasProperty()) - tgt.setProperty(src.getProperty()); + if (src.hasPropertyElement()) + tgt.setPropertyElement((org.hl7.fhir.r4.model.CodeType) VersionConvertor_30_40.convertType(src.getPropertyElement())); if (src.hasOp()) tgt.setOp(VersionConvertor_30_40.convertFilterOperator(src.getOp())); - if (src.hasValue()) - tgt.setValue(src.getValue()); + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getValueElement())); return tgt; } @@ -125,12 +126,12 @@ public class ValueSet30_40 { return null; org.hl7.fhir.dstu3.model.ValueSet.ConceptSetFilterComponent tgt = new org.hl7.fhir.dstu3.model.ValueSet.ConceptSetFilterComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasProperty()) - tgt.setProperty(src.getProperty()); + if (src.hasPropertyElement()) + tgt.setPropertyElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_30_40.convertType(src.getPropertyElement())); if (src.hasOp()) tgt.setOp(VersionConvertor_30_40.convertFilterOperator(src.getOp())); - if (src.hasValue()) - tgt.setValue(src.getValue()); + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_30_40.convertType(src.getValueElement())); return tgt; } @@ -139,42 +140,42 @@ public class ValueSet30_40 { return null; org.hl7.fhir.dstu3.model.ValueSet tgt = new org.hl7.fhir.dstu3.model.ValueSet(); VersionConvertor_30_40.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_40.convertType(src.getUrlElement())); if (src.hasIdentifier()) { for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_30_40.convertIdentifier(t)); } - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getNameElement())); + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getTitleElement())); if (src.hasStatus()) tgt.setStatus(VersionConvertor_30_40.convertPublicationStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_40.convertType(src.getExperimentalElement())); if (src.hasDateElement()) tgt.setDateElement(VersionConvertor_30_40.convertDateTime(src.getDateElement())); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact()) tgt.addContact(VersionConvertor_30_40.convertContactDetail(t)); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); if (src.hasUseContext()) { for (org.hl7.fhir.r4.model.UsageContext t : src.getUseContext()) tgt.addUseContext(VersionConvertor_30_40.convertUsageContext(t)); } if (src.hasJurisdiction()) { for (org.hl7.fhir.r4.model.CodeableConcept t : src.getJurisdiction()) tgt.addJurisdiction(VersionConvertor_30_40.convertCodeableConcept(t)); } - if (src.hasImmutable()) - tgt.setImmutable(src.getImmutable()); - if (src.hasPurpose()) - tgt.setPurpose(src.getPurpose()); - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); + if (src.hasImmutableElement()) + tgt.setImmutableElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_40.convertType(src.getImmutableElement())); + if (src.hasPurposeElement()) + tgt.setPurposeElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_40.convertType(src.getPurposeElement())); + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_40.convertType(src.getCopyrightElement())); if (src.hasExtension("http://hl7.org/fhir/StructureDefinition/valueset-extensible")) tgt.setExtensible(((BooleanType) src.getExtensionByUrl("http://hl7.org/fhir/StructureDefinition/valueset-extensible").getValue()).booleanValue()); if (src.hasCompose()) @@ -189,42 +190,42 @@ public class ValueSet30_40 { return null; org.hl7.fhir.r4.model.ValueSet tgt = new org.hl7.fhir.r4.model.ValueSet(); VersionConvertor_30_40.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_30_40.convertType(src.getUrlElement())); if (src.hasIdentifier()) { for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_30_40.convertIdentifier(t)); } - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getNameElement())); + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getTitleElement())); if (src.hasStatus()) tgt.setStatus(VersionConvertor_30_40.convertPublicationStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_30_40.convertType(src.getExperimentalElement())); if (src.hasDateElement()) tgt.setDateElement(VersionConvertor_30_40.convertDateTime(src.getDateElement())); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) tgt.addContact(VersionConvertor_30_40.convertContactDetail(t)); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r4.model.MarkdownType) VersionConvertor_30_40.convertType(src.getDescriptionElement())); if (src.hasUseContext()) { for (org.hl7.fhir.dstu3.model.UsageContext t : src.getUseContext()) tgt.addUseContext(VersionConvertor_30_40.convertUsageContext(t)); } if (src.hasJurisdiction()) { for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getJurisdiction()) tgt.addJurisdiction(VersionConvertor_30_40.convertCodeableConcept(t)); } - if (src.hasImmutable()) - tgt.setImmutable(src.getImmutable()); - if (src.hasPurpose()) - tgt.setPurpose(src.getPurpose()); - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); + if (src.hasImmutableElement()) + tgt.setImmutableElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_30_40.convertType(src.getImmutableElement())); + if (src.hasPurposeElement()) + tgt.setPurposeElement((org.hl7.fhir.r4.model.MarkdownType) VersionConvertor_30_40.convertType(src.getPurposeElement())); + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.r4.model.MarkdownType) VersionConvertor_30_40.convertType(src.getCopyrightElement())); if (src.hasExtensible()) tgt.addExtension("http://hl7.org/fhir/StructureDefinition/valueset-extensible", new BooleanType(src.getExtensible())); if (src.hasCompose()) @@ -240,9 +241,9 @@ public class ValueSet30_40 { org.hl7.fhir.dstu3.model.ValueSet.ValueSetComposeComponent tgt = new org.hl7.fhir.dstu3.model.ValueSet.ValueSetComposeComponent(); VersionConvertor_30_40.copyElement(src, tgt); if (src.hasLockedDate()) - tgt.setLockedDateElement(VersionConvertor_30_40.convertDate(src.getLockedDateElement())); - if (src.hasInactive()) - tgt.setInactive(src.getInactive()); + tgt.setLockedDateElement(VersionConvertor_30_40.convertDate(src.getLockedDateElement())); + if (src.hasInactiveElement()) + tgt.setInactiveElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_40.convertType(src.getInactiveElement())); if (src.hasInclude()) { for (org.hl7.fhir.r4.model.ValueSet.ConceptSetComponent t : src.getInclude()) tgt.addInclude(convertConceptSetComponent(t)); } @@ -258,9 +259,9 @@ public class ValueSet30_40 { org.hl7.fhir.r4.model.ValueSet.ValueSetComposeComponent tgt = new org.hl7.fhir.r4.model.ValueSet.ValueSetComposeComponent(); VersionConvertor_30_40.copyElement(src, tgt); if (src.hasLockedDate()) - tgt.setLockedDateElement(VersionConvertor_30_40.convertDate(src.getLockedDateElement())); - if (src.hasInactive()) - tgt.setInactive(src.getInactive()); + tgt.setLockedDateElement(VersionConvertor_30_40.convertDate(src.getLockedDateElement())); + if (src.hasInactiveElement()) + tgt.setInactiveElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_30_40.convertType(src.getInactiveElement())); if (src.hasInclude()) { for (org.hl7.fhir.dstu3.model.ValueSet.ConceptSetComponent t : src.getInclude()) tgt.addInclude(convertConceptSetComponent(t)); } @@ -275,14 +276,14 @@ public class ValueSet30_40 { return null; org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionComponent tgt = new org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasIdentifier()) - tgt.setIdentifier(src.getIdentifier()); + if (src.hasIdentifierElement()) + tgt.setIdentifierElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_40.convertType(src.getIdentifierElement())); if (src.hasTimestamp()) tgt.setTimestampElement(VersionConvertor_30_40.convertDateTime(src.getTimestampElement())); - if (src.hasTotal()) - tgt.setTotal(src.getTotal()); - if (src.hasOffset()) - tgt.setOffset(src.getOffset()); + if (src.hasTotalElement()) + tgt.setTotalElement((org.hl7.fhir.dstu3.model.IntegerType) VersionConvertor_30_40.convertType(src.getTotalElement())); + if (src.hasOffsetElement()) + tgt.setOffsetElement((org.hl7.fhir.dstu3.model.IntegerType) VersionConvertor_30_40.convertType(src.getOffsetElement())); if (src.hasParameter()) { for (org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionParameterComponent t : src.getParameter()) tgt.addParameter(convertValueSetExpansionParameterComponent(t)); } @@ -297,14 +298,14 @@ public class ValueSet30_40 { return null; org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionComponent tgt = new org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasIdentifier()) - tgt.setIdentifier(src.getIdentifier()); + if (src.hasIdentifierElement()) + tgt.setIdentifierElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_30_40.convertType(src.getIdentifierElement())); if (src.hasTimestamp()) tgt.setTimestampElement(VersionConvertor_30_40.convertDateTime(src.getTimestampElement())); - if (src.hasTotal()) - tgt.setTotal(src.getTotal()); - if (src.hasOffset()) - tgt.setOffset(src.getOffset()); + if (src.hasTotalElement()) + tgt.setTotalElement((org.hl7.fhir.r4.model.IntegerType) VersionConvertor_30_40.convertType(src.getTotalElement())); + if (src.hasOffsetElement()) + tgt.setOffsetElement((org.hl7.fhir.r4.model.IntegerType) VersionConvertor_30_40.convertType(src.getOffsetElement())); if (src.hasParameter()) { for (org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionParameterComponent t : src.getParameter()) tgt.addParameter(convertValueSetExpansionParameterComponent(t)); } @@ -319,18 +320,18 @@ public class ValueSet30_40 { return null; org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionContainsComponent tgt = new org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionContainsComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasSystem()) - tgt.setSystem(src.getSystem()); - if (src.hasAbstract()) - tgt.setAbstract(src.getAbstract()); - if (src.hasInactive()) - tgt.setInactive(src.getInactive()); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasCode()) - tgt.setCode(src.getCode()); - if (src.hasDisplay()) - tgt.setDisplay(src.getDisplay()); + if (src.hasSystemElement()) + tgt.setSystemElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_40.convertType(src.getSystemElement())); + if (src.hasAbstractElement()) + tgt.setAbstractElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_40.convertType(src.getAbstractElement())); + if (src.hasInactiveElement()) + tgt.setInactiveElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_40.convertType(src.getInactiveElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getVersionElement())); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_30_40.convertType(src.getCodeElement())); + if (src.hasDisplayElement()) + tgt.setDisplayElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getDisplayElement())); if (src.hasDesignation()) { for (org.hl7.fhir.r4.model.ValueSet.ConceptReferenceDesignationComponent t : src.getDesignation()) tgt.addDesignation(convertConceptReferenceDesignationComponent(t)); } @@ -345,18 +346,18 @@ public class ValueSet30_40 { return null; org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionContainsComponent tgt = new org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionContainsComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasSystem()) - tgt.setSystem(src.getSystem()); - if (src.hasAbstract()) - tgt.setAbstract(src.getAbstract()); - if (src.hasInactive()) - tgt.setInactive(src.getInactive()); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasCode()) - tgt.setCode(src.getCode()); - if (src.hasDisplay()) - tgt.setDisplay(src.getDisplay()); + if (src.hasSystemElement()) + tgt.setSystemElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_30_40.convertType(src.getSystemElement())); + if (src.hasAbstractElement()) + tgt.setAbstractElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_30_40.convertType(src.getAbstractElement())); + if (src.hasInactiveElement()) + tgt.setInactiveElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_30_40.convertType(src.getInactiveElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getVersionElement())); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.r4.model.CodeType) VersionConvertor_30_40.convertType(src.getCodeElement())); + if (src.hasDisplayElement()) + tgt.setDisplayElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getDisplayElement())); if (src.hasDesignation()) { for (org.hl7.fhir.dstu3.model.ValueSet.ConceptReferenceDesignationComponent t : src.getDesignation()) tgt.addDesignation(convertConceptReferenceDesignationComponent(t)); } @@ -371,8 +372,8 @@ public class ValueSet30_40 { return null; org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionParameterComponent tgt = new org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionParameterComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_30_40.convertType(src.getNameElement())); if (src.hasValue()) tgt.setValue(VersionConvertor_30_40.convertType(src.getValue())); return tgt; @@ -383,8 +384,8 @@ public class ValueSet30_40 { return null; org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionParameterComponent tgt = new org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionParameterComponent(); VersionConvertor_30_40.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_40.convertType(src.getNameElement())); if (src.hasValue()) tgt.setValue(VersionConvertor_30_40.convertType(src.getValue())); return tgt; diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/parser/Parser.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/parser/Parser.java index 964f91658..6e54f824d 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/parser/Parser.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/parser/Parser.java @@ -92,7 +92,7 @@ public class Parser { // VERSION_FILES.forEach(version -> { - String version = "14_50"; + String version = "30_40"; List filenames = listAllJavaFilesInDirectory(new File("").getAbsolutePath() + "/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv" + version + "/"); System.out.println("Checking the following files:"); Collections.sort(filenames); From 8fd62a3614842d183b93748fe7dc75dd7c10b8f6 Mon Sep 17 00:00:00 2001 From: markiantorno Date: Mon, 10 Feb 2020 10:31:56 -0500 Subject: [PATCH 11/12] conv30_50 updated --- .../conv30_50/ActivityDefinition30_50.java | 140 ++++----- .../conv30_50/AllergyIntolerance30_50.java | 25 +- .../conv30_50/Appointment30_50.java | 57 ++-- .../conv30_50/AppointmentResponse30_50.java | 25 +- .../convertors/conv30_50/AuditEvent30_50.java | 83 +++--- .../fhir/convertors/conv30_50/Basic30_50.java | 9 +- .../convertors/conv30_50/Binary30_50.java | 19 +- .../convertors/conv30_50/BodySite30_50.java | 20 +- .../convertors/conv30_50/Bundle30_50.java | 113 ++++---- .../conv30_50/CapabilityStatement30_50.java | 265 ++++++++--------- .../convertors/conv30_50/CarePlan30_50.java | 114 +++----- .../convertors/conv30_50/CareTeam30_50.java | 9 +- .../conv30_50/ClinicalImpression30_50.java | 33 ++- .../convertors/conv30_50/CodeSystem30_50.java | 229 +++++++-------- .../conv30_50/Communication30_50.java | 17 +- .../conv30_50/CompartmentDefinition30_50.java | 89 +++--- .../conv30_50/Composition30_50.java | 33 ++- .../convertors/conv30_50/ConceptMap30_50.java | 195 +++++++------ .../convertors/conv30_50/Condition30_50.java | 1 + .../convertors/conv30_50/Consent30_50.java | 1 + .../conv30_50/DataElement30_50.java | 47 +-- .../conv30_50/DetectedIssue30_50.java | 25 +- .../conv30_50/DeviceUseStatement30_50.java | 9 +- .../conv30_50/DiagnosticReport30_50.java | 25 +- .../conv30_50/DocumentReference30_50.java | 20 +- .../convertors/conv30_50/Encounter30_50.java | 1 + .../convertors/conv30_50/Endpoint30_50.java | 17 +- .../conv30_50/EpisodeOfCare30_50.java | 1 + .../conv30_50/ExpansionProfile30_50.java | 1 + .../conv30_50/FamilyMemberHistory30_50.java | 25 +- .../fhir/convertors/conv30_50/Flag30_50.java | 1 + .../fhir/convertors/conv30_50/Goal30_50.java | 17 +- .../conv30_50/GraphDefinition30_50.java | 153 +++++----- .../fhir/convertors/conv30_50/Group30_50.java | 49 ++-- .../conv30_50/HealthcareService30_50.java | 81 +++--- .../conv30_50/ImagingStudy30_50.java | 164 ++++------- .../conv30_50/Immunization30_50.java | 25 +- .../conv30_50/ImplementationGuide30_50.java | 123 ++++---- .../convertors/conv30_50/Library30_50.java | 105 +++---- .../convertors/conv30_50/Linkage30_50.java | 9 +- .../fhir/convertors/conv30_50/List30_50.java | 37 ++- .../convertors/conv30_50/Location30_50.java | 41 +-- .../convertors/conv30_50/Measure30_50.java | 185 ++++++------ .../fhir/convertors/conv30_50/Media30_50.java | 1 + .../convertors/conv30_50/Medication30_50.java | 25 +- .../MedicationAdministration30_50.java | 9 +- .../conv30_50/MedicationDispense30_50.java | 25 +- .../conv30_50/MedicationRequest30_50.java | 17 +- .../conv30_50/MedicationStatement30_50.java | 11 +- .../conv30_50/MessageDefinition30_50.java | 113 ++++---- .../conv30_50/MessageHeader30_50.java | 57 ++-- .../conv30_50/NamingSystem30_50.java | 73 ++--- .../conv30_50/Observation30_50.java | 17 +- .../conv30_50/OperationDefinition30_50.java | 150 +++++----- .../conv30_50/OperationOutcome30_50.java | 9 +- .../conv30_50/Organization30_50.java | 17 +- .../convertors/conv30_50/Parameters30_50.java | 9 +- .../convertors/conv30_50/Patient30_50.java | 25 +- .../conv30_50/PaymentNotice30_50.java | 9 +- .../convertors/conv30_50/Person30_50.java | 17 +- .../conv30_50/PlanDefinition30_50.java | 196 +++++++------ .../conv30_50/Practitioner30_50.java | 17 +- .../conv30_50/PractitionerRole30_50.java | 49 ++-- .../conv30_50/Questionnaire30_50.java | 169 +++++------ .../conv30_50/QuestionnaireResponse30_50.java | 33 ++- .../conv30_50/RelatedPerson30_50.java | 39 +-- .../conv30_50/RiskAssessment30_50.java | 25 +- .../convertors/conv30_50/Schedule30_50.java | 17 +- .../conv30_50/SearchParameter30_50.java | 105 +++---- .../convertors/conv30_50/Sequence30_50.java | 210 +++++++------- .../fhir/convertors/conv30_50/Slot30_50.java | 33 ++- .../convertors/conv30_50/Specimen30_50.java | 25 +- .../conv30_50/StructureDefinition30_50.java | 135 ++++----- .../conv30_50/StructureMap30_50.java | 273 +++++++++--------- .../convertors/conv30_50/Substance30_50.java | 17 +- .../conv30_50/SupplyDelivery30_50.java | 1 + .../convertors/conv30_50/TestReport30_50.java | 65 +++-- .../convertors/conv30_50/TestScript30_50.java | 241 ++++++++-------- .../convertors/conv30_50/ValueSet30_50.java | 257 +++++++++-------- .../hl7/fhir/convertors/parser/Parser.java | 2 +- 80 files changed, 2562 insertions(+), 2569 deletions(-) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/ActivityDefinition30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/ActivityDefinition30_50.java index 133852b8f..c057caec6 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/ActivityDefinition30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/ActivityDefinition30_50.java @@ -4,6 +4,10 @@ import org.hl7.fhir.convertors.VersionConvertor_30_50; import org.hl7.fhir.dstu3.model.ContactDetail; import org.hl7.fhir.dstu3.model.Contributor.ContributorType; import org.hl7.fhir.exceptions.FHIRException; +import org.hl7.fhir.r5.model.CodeType; +import org.hl7.fhir.r5.model.StringType; + +import java.util.Collections; public class ActivityDefinition30_50 { @@ -12,35 +16,35 @@ public class ActivityDefinition30_50 { return null; org.hl7.fhir.r5.model.ActivityDefinition tgt = new org.hl7.fhir.r5.model.ActivityDefinition(); VersionConvertor_30_50.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r5.model.UriType) VersionConvertor_30_50.convertType(src.getUrlElement())); if (src.hasIdentifier()) { for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_30_50.convertIdentifier(t)); } - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getNameElement())); + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getTitleElement())); if (src.hasStatus()) tgt.setStatus(VersionConvertor_30_50.convertPublicationStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - if (src.hasPurpose()) - tgt.setPurpose(src.getPurpose()); - if (src.hasUsage()) - tgt.setUsage(src.getUsage()); - if (src.hasApprovalDate()) - tgt.setApprovalDate(src.getApprovalDate()); - if (src.hasLastReviewDate()) - tgt.setLastReviewDate(src.getLastReviewDate()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_30_50.convertType(src.getExperimentalElement())); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.r5.model.DateTimeType) VersionConvertor_30_50.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getPublisherElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r5.model.MarkdownType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); + if (src.hasPurposeElement()) + tgt.setPurposeElement((org.hl7.fhir.r5.model.MarkdownType) VersionConvertor_30_50.convertType(src.getPurposeElement())); + if (src.hasUsageElement()) + tgt.setUsageElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getUsageElement())); + if (src.hasApprovalDateElement()) + tgt.setApprovalDateElement((org.hl7.fhir.r5.model.DateType) VersionConvertor_30_50.convertType(src.getApprovalDateElement())); + if (src.hasLastReviewDateElement()) + tgt.setLastReviewDateElement((org.hl7.fhir.r5.model.DateType) VersionConvertor_30_50.convertType(src.getLastReviewDateElement())); if (src.hasEffectivePeriod()) tgt.setEffectivePeriod(VersionConvertor_30_50.convertPeriod(src.getEffectivePeriod())); if (src.hasUseContext()) { @@ -65,8 +69,8 @@ public class ActivityDefinition30_50 { if (src.hasContact()) { for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) tgt.addContact(VersionConvertor_30_50.convertContactDetail(t)); } - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.r5.model.MarkdownType) VersionConvertor_30_50.convertType(src.getCopyrightElement())); if (src.hasRelatedArtifact()) { for (org.hl7.fhir.dstu3.model.RelatedArtifact t : src.getRelatedArtifact()) tgt.addRelatedArtifact(VersionConvertor_30_50.convertRelatedArtifact(t)); } @@ -107,35 +111,35 @@ public class ActivityDefinition30_50 { return null; org.hl7.fhir.dstu3.model.ActivityDefinition tgt = new org.hl7.fhir.dstu3.model.ActivityDefinition(); VersionConvertor_30_50.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_50.convertType(src.getUrlElement())); if (src.hasIdentifier()) { for (org.hl7.fhir.r5.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_30_50.convertIdentifier(t)); } - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getNameElement())); + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getTitleElement())); if (src.hasStatus()) tgt.setStatus(VersionConvertor_30_50.convertPublicationStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - if (src.hasPurpose()) - tgt.setPurpose(src.getPurpose()); - if (src.hasUsage()) - tgt.setUsage(src.getUsage()); - if (src.hasApprovalDate()) - tgt.setApprovalDate(src.getApprovalDate()); - if (src.hasLastReviewDate()) - tgt.setLastReviewDate(src.getLastReviewDate()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_50.convertType(src.getExperimentalElement())); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_30_50.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getPublisherElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); + if (src.hasPurposeElement()) + tgt.setPurposeElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_50.convertType(src.getPurposeElement())); + if (src.hasUsageElement()) + tgt.setUsageElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getUsageElement())); + if (src.hasApprovalDateElement()) + tgt.setApprovalDateElement((org.hl7.fhir.dstu3.model.DateType) VersionConvertor_30_50.convertType(src.getApprovalDateElement())); + if (src.hasLastReviewDateElement()) + tgt.setLastReviewDateElement((org.hl7.fhir.dstu3.model.DateType) VersionConvertor_30_50.convertType(src.getLastReviewDateElement())); if (src.hasEffectivePeriod()) tgt.setEffectivePeriod(VersionConvertor_30_50.convertPeriod(src.getEffectivePeriod())); if (src.hasUseContext()) { @@ -174,8 +178,8 @@ public class ActivityDefinition30_50 { if (src.hasContact()) { for (org.hl7.fhir.r5.model.ContactDetail t : src.getContact()) tgt.addContact(VersionConvertor_30_50.convertContactDetail(t)); } - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_50.convertType(src.getCopyrightElement())); if (src.hasRelatedArtifact()) { for (org.hl7.fhir.r5.model.RelatedArtifact t : src.getRelatedArtifact()) tgt.addRelatedArtifact(VersionConvertor_30_50.convertRelatedArtifact(t)); } @@ -216,14 +220,14 @@ public class ActivityDefinition30_50 { return null; org.hl7.fhir.r5.model.ActivityDefinition.ActivityDefinitionDynamicValueComponent tgt = new org.hl7.fhir.r5.model.ActivityDefinition.ActivityDefinitionDynamicValueComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasDescription()) - tgt.getExpression().setDescription(src.getDescription()); - if (src.hasPath()) - tgt.setPath(src.getPath()); - if (src.hasLanguage()) - tgt.getExpression().setLanguage(src.getLanguage()); - if (src.hasExpression()) - tgt.getExpression().setExpression(src.getExpression()); + if (src.hasDescriptionElement()) + tgt.getExpression().setDescriptionElement((StringType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); + if (src.hasPathElement()) + tgt.setPathElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getPathElement())); + if (src.hasLanguageElement()) + tgt.getExpression().setLanguageElement((CodeType) VersionConvertor_30_50.convertType(src.getLanguageElement())); + if (src.hasExpressionElement()) + tgt.getExpression().setExpressionElement((StringType) VersionConvertor_30_50.convertType(src.getExpressionElement())); return tgt; } @@ -232,14 +236,14 @@ public class ActivityDefinition30_50 { return null; org.hl7.fhir.dstu3.model.ActivityDefinition.ActivityDefinitionDynamicValueComponent tgt = new org.hl7.fhir.dstu3.model.ActivityDefinition.ActivityDefinitionDynamicValueComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasPath()) - tgt.setPath(src.getPath()); - if (src.getExpression().hasDescription()) - tgt.setDescription(src.getExpression().getDescription()); - if (src.getExpression().hasLanguage()) - tgt.setLanguage(src.getExpression().getLanguage()); - if (src.getExpression().hasExpression()) - tgt.setExpression(src.getExpression().getExpression()); + if (src.hasPathElement()) + tgt.setPathElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getPathElement())); + if (src.getExpression().hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getExpression().getDescriptionElement())); + if (src.getExpression().hasLanguageElement()) + tgt.setLanguageElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getExpression().getLanguageElement())); + if (src.getExpression().hasExpressionElement()) + tgt.setExpressionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getExpression().getExpressionElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/AllergyIntolerance30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/AllergyIntolerance30_50.java index df3f25f0d..8973de9a1 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/AllergyIntolerance30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/AllergyIntolerance30_50.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_50; import org.hl7.fhir.convertors.VersionConvertor_30_50; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class AllergyIntolerance30_50 { @@ -36,8 +37,8 @@ public class AllergyIntolerance30_50 { tgt.setRecorder(VersionConvertor_30_50.convertReference(src.getRecorder())); if (src.hasAsserter()) tgt.setAsserter(VersionConvertor_30_50.convertReference(src.getAsserter())); - if (src.hasLastOccurrence()) - tgt.setLastOccurrence(src.getLastOccurrence()); + if (src.hasLastOccurrenceElement()) + tgt.setLastOccurrenceElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_30_50.convertType(src.getLastOccurrenceElement())); if (src.hasNote()) { for (org.hl7.fhir.r5.model.Annotation t : src.getNote()) tgt.addNote(VersionConvertor_30_50.convertAnnotation(t)); } @@ -78,8 +79,8 @@ public class AllergyIntolerance30_50 { tgt.setRecorder(VersionConvertor_30_50.convertReference(src.getRecorder())); if (src.hasAsserter()) tgt.setAsserter(VersionConvertor_30_50.convertReference(src.getAsserter())); - if (src.hasLastOccurrence()) - tgt.setLastOccurrence(src.getLastOccurrence()); + if (src.hasLastOccurrenceElement()) + tgt.setLastOccurrenceElement((org.hl7.fhir.r5.model.DateTimeType) VersionConvertor_30_50.convertType(src.getLastOccurrenceElement())); if (src.hasNote()) { for (org.hl7.fhir.dstu3.model.Annotation t : src.getNote()) tgt.addNote(VersionConvertor_30_50.convertAnnotation(t)); } @@ -190,10 +191,10 @@ public class AllergyIntolerance30_50 { if (src.hasManifestation()) { for (org.hl7.fhir.r5.model.CodeableConcept t : src.getManifestation()) tgt.addManifestation(VersionConvertor_30_50.convertCodeableConcept(t)); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - if (src.hasOnset()) - tgt.setOnset(src.getOnset()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); + if (src.hasOnsetElement()) + tgt.setOnsetElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_30_50.convertType(src.getOnsetElement())); if (src.hasSeverity()) tgt.setSeverity(convertAllergyIntoleranceSeverity(src.getSeverity())); if (src.hasExposureRoute()) @@ -214,10 +215,10 @@ public class AllergyIntolerance30_50 { if (src.hasManifestation()) { for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getManifestation()) tgt.addManifestation(VersionConvertor_30_50.convertCodeableConcept(t)); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - if (src.hasOnset()) - tgt.setOnset(src.getOnset()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); + if (src.hasOnsetElement()) + tgt.setOnsetElement((org.hl7.fhir.r5.model.DateTimeType) VersionConvertor_30_50.convertType(src.getOnsetElement())); if (src.hasSeverity()) tgt.setSeverity(convertAllergyIntoleranceSeverity(src.getSeverity())); if (src.hasExposureRoute()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Appointment30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Appointment30_50.java index 5776877f8..eb775cb64 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Appointment30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Appointment30_50.java @@ -3,6 +3,7 @@ package org.hl7.fhir.convertors.conv30_50; import org.hl7.fhir.convertors.VersionConvertor_30_50; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r5.model.CodeableReference; +import java.util.Collections; public class Appointment30_50 { @@ -30,26 +31,26 @@ public class Appointment30_50 { tgt.addReason(VersionConvertor_30_50.convertCodeableConcept(t.getConcept())); for (CodeableReference t : src.getReason()) if (t.hasReference()) tgt.addIndication(VersionConvertor_30_50.convertReference(t.getReference())); - if (src.hasPriority()) - tgt.setPriority(src.getPriority()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasPriorityElement()) + tgt.setPriorityElement((org.hl7.fhir.dstu3.model.UnsignedIntType) VersionConvertor_30_50.convertType(src.getPriorityElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); if (src.hasSupportingInformation()) { for (org.hl7.fhir.r5.model.Reference t : src.getSupportingInformation()) tgt.addSupportingInformation(VersionConvertor_30_50.convertReference(t)); } - if (src.hasStart()) - tgt.setStart(src.getStart()); - if (src.hasEnd()) - tgt.setEnd(src.getEnd()); - if (src.hasMinutesDuration()) - tgt.setMinutesDuration(src.getMinutesDuration()); + if (src.hasStartElement()) + tgt.setStartElement((org.hl7.fhir.dstu3.model.InstantType) VersionConvertor_30_50.convertType(src.getStartElement())); + if (src.hasEndElement()) + tgt.setEndElement((org.hl7.fhir.dstu3.model.InstantType) VersionConvertor_30_50.convertType(src.getEndElement())); + if (src.hasMinutesDurationElement()) + tgt.setMinutesDurationElement((org.hl7.fhir.dstu3.model.PositiveIntType) VersionConvertor_30_50.convertType(src.getMinutesDurationElement())); if (src.hasSlot()) { for (org.hl7.fhir.r5.model.Reference t : src.getSlot()) tgt.addSlot(VersionConvertor_30_50.convertReference(t)); } - if (src.hasCreated()) - tgt.setCreated(src.getCreated()); - if (src.hasComment()) - tgt.setComment(src.getComment()); + if (src.hasCreatedElement()) + tgt.setCreatedElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_30_50.convertType(src.getCreatedElement())); + if (src.hasCommentElement()) + tgt.setCommentElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getCommentElement())); if (src.hasBasedOn()) { for (org.hl7.fhir.r5.model.Reference t : src.getBasedOn()) tgt.addIncomingReferral(VersionConvertor_30_50.convertReference(t)); } @@ -88,26 +89,26 @@ public class Appointment30_50 { if (src.hasIndication()) { for (org.hl7.fhir.dstu3.model.Reference t : src.getIndication()) tgt.addReason(VersionConvertor_30_50.convertReferenceToCodableReference(t)); } - if (src.hasPriority()) - tgt.setPriority(src.getPriority()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasPriorityElement()) + tgt.setPriorityElement((org.hl7.fhir.r5.model.UnsignedIntType) VersionConvertor_30_50.convertType(src.getPriorityElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); if (src.hasSupportingInformation()) { for (org.hl7.fhir.dstu3.model.Reference t : src.getSupportingInformation()) tgt.addSupportingInformation(VersionConvertor_30_50.convertReference(t)); } - if (src.hasStart()) - tgt.setStart(src.getStart()); - if (src.hasEnd()) - tgt.setEnd(src.getEnd()); - if (src.hasMinutesDuration()) - tgt.setMinutesDuration(src.getMinutesDuration()); + if (src.hasStartElement()) + tgt.setStartElement((org.hl7.fhir.r5.model.InstantType) VersionConvertor_30_50.convertType(src.getStartElement())); + if (src.hasEndElement()) + tgt.setEndElement((org.hl7.fhir.r5.model.InstantType) VersionConvertor_30_50.convertType(src.getEndElement())); + if (src.hasMinutesDurationElement()) + tgt.setMinutesDurationElement((org.hl7.fhir.r5.model.PositiveIntType) VersionConvertor_30_50.convertType(src.getMinutesDurationElement())); if (src.hasSlot()) { for (org.hl7.fhir.dstu3.model.Reference t : src.getSlot()) tgt.addSlot(VersionConvertor_30_50.convertReference(t)); } - if (src.hasCreated()) - tgt.setCreated(src.getCreated()); - if (src.hasComment()) - tgt.setComment(src.getComment()); + if (src.hasCreatedElement()) + tgt.setCreatedElement((org.hl7.fhir.r5.model.DateTimeType) VersionConvertor_30_50.convertType(src.getCreatedElement())); + if (src.hasCommentElement()) + tgt.setCommentElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getCommentElement())); if (src.hasIncomingReferral()) { for (org.hl7.fhir.dstu3.model.Reference t : src.getIncomingReferral()) tgt.addBasedOn(VersionConvertor_30_50.convertReference(t)); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/AppointmentResponse30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/AppointmentResponse30_50.java index 0e2c0baff..5d3a01ea9 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/AppointmentResponse30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/AppointmentResponse30_50.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_50; import org.hl7.fhir.convertors.VersionConvertor_30_50; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class AppointmentResponse30_50 { @@ -15,10 +16,10 @@ public class AppointmentResponse30_50 { } if (src.hasAppointment()) tgt.setAppointment(VersionConvertor_30_50.convertReference(src.getAppointment())); - if (src.hasStart()) - tgt.setStart(src.getStart()); - if (src.hasEnd()) - tgt.setEnd(src.getEnd()); + if (src.hasStartElement()) + tgt.setStartElement((org.hl7.fhir.r5.model.InstantType) VersionConvertor_30_50.convertType(src.getStartElement())); + if (src.hasEndElement()) + tgt.setEndElement((org.hl7.fhir.r5.model.InstantType) VersionConvertor_30_50.convertType(src.getEndElement())); if (src.hasParticipantType()) { for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getParticipantType()) tgt.addParticipantType(VersionConvertor_30_50.convertCodeableConcept(t)); } @@ -26,8 +27,8 @@ public class AppointmentResponse30_50 { tgt.setActor(VersionConvertor_30_50.convertReference(src.getActor())); if (src.hasParticipantStatus()) tgt.setParticipantStatus(convertParticipantStatus(src.getParticipantStatus())); - if (src.hasComment()) - tgt.setComment(src.getComment()); + if (src.hasCommentElement()) + tgt.setCommentElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getCommentElement())); return tgt; } @@ -41,10 +42,10 @@ public class AppointmentResponse30_50 { } if (src.hasAppointment()) tgt.setAppointment(VersionConvertor_30_50.convertReference(src.getAppointment())); - if (src.hasStart()) - tgt.setStart(src.getStart()); - if (src.hasEnd()) - tgt.setEnd(src.getEnd()); + if (src.hasStartElement()) + tgt.setStartElement((org.hl7.fhir.dstu3.model.InstantType) VersionConvertor_30_50.convertType(src.getStartElement())); + if (src.hasEndElement()) + tgt.setEndElement((org.hl7.fhir.dstu3.model.InstantType) VersionConvertor_30_50.convertType(src.getEndElement())); if (src.hasParticipantType()) { for (org.hl7.fhir.r5.model.CodeableConcept t : src.getParticipantType()) tgt.addParticipantType(VersionConvertor_30_50.convertCodeableConcept(t)); } @@ -52,8 +53,8 @@ public class AppointmentResponse30_50 { tgt.setActor(VersionConvertor_30_50.convertReference(src.getActor())); if (src.hasParticipantStatus()) tgt.setParticipantStatus(convertParticipantStatus(src.getParticipantStatus())); - if (src.hasComment()) - tgt.setComment(src.getComment()); + if (src.hasCommentElement()) + tgt.setCommentElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getCommentElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/AuditEvent30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/AuditEvent30_50.java index c5f454c86..1d27f2978 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/AuditEvent30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/AuditEvent30_50.java @@ -2,6 +2,9 @@ package org.hl7.fhir.convertors.conv30_50; import org.hl7.fhir.convertors.VersionConvertor_30_50; import org.hl7.fhir.exceptions.FHIRException; +import org.hl7.fhir.r5.model.Base64BinaryType; + +import java.util.Collections; public class AuditEvent30_50 { @@ -17,12 +20,12 @@ public class AuditEvent30_50 { } if (src.hasAction()) tgt.setAction(convertAuditEventAction(src.getAction())); - if (src.hasRecorded()) - tgt.setRecorded(src.getRecorded()); + if (src.hasRecordedElement()) + tgt.setRecordedElement((org.hl7.fhir.r5.model.InstantType) VersionConvertor_30_50.convertType(src.getRecordedElement())); if (src.hasOutcome()) tgt.setOutcome(convertAuditEventOutcome(src.getOutcome())); - if (src.hasOutcomeDesc()) - tgt.setOutcomeDesc(src.getOutcomeDesc()); + if (src.hasOutcomeDescElement()) + tgt.setOutcomeDescElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getOutcomeDescElement())); if (src.hasPurposeOfEvent()) { for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getPurposeOfEvent()) tgt.addPurposeOfEvent(VersionConvertor_30_50.convertCodeableConcept(t)); } @@ -49,12 +52,12 @@ public class AuditEvent30_50 { } if (src.hasAction()) tgt.setAction(convertAuditEventAction(src.getAction())); - if (src.hasRecorded()) - tgt.setRecorded(src.getRecorded()); + if (src.hasRecordedElement()) + tgt.setRecordedElement((org.hl7.fhir.dstu3.model.InstantType) VersionConvertor_30_50.convertType(src.getRecordedElement())); if (src.hasOutcome()) tgt.setOutcome(convertAuditEventOutcome(src.getOutcome())); - if (src.hasOutcomeDesc()) - tgt.setOutcomeDesc(src.getOutcomeDesc()); + if (src.hasOutcomeDescElement()) + tgt.setOutcomeDescElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getOutcomeDescElement())); if (src.hasPurposeOfEvent()) { for (org.hl7.fhir.r5.model.CodeableConcept t : src.getPurposeOfEvent()) tgt.addPurposeOfEvent(VersionConvertor_30_50.convertCodeableConcept(t)); } @@ -119,12 +122,12 @@ public class AuditEvent30_50 { tgt.setWho(VersionConvertor_30_50.convertReference(src.getReference())); if (src.hasUserId()) tgt.getWho().setIdentifier(VersionConvertor_30_50.convertIdentifier(src.getUserId())); - if (src.hasAltId()) - tgt.setAltId(src.getAltId()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasRequestor()) - tgt.setRequestor(src.getRequestor()); + if (src.hasAltIdElement()) + tgt.setAltIdElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getAltIdElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getNameElement())); + if (src.hasRequestorElement()) + tgt.setRequestorElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_30_50.convertType(src.getRequestorElement())); if (src.hasLocation()) tgt.setLocation(VersionConvertor_30_50.convertReference(src.getLocation())); if (src.hasPolicy()) { @@ -154,12 +157,12 @@ public class AuditEvent30_50 { if (src.getWho().hasReference() || src.getWho().hasDisplay() || src.getWho().hasExtension() || src.getWho().hasId()) tgt.setReference(VersionConvertor_30_50.convertReference(src.getWho())); } - if (src.hasAltId()) - tgt.setAltId(src.getAltId()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasRequestor()) - tgt.setRequestor(src.getRequestor()); + if (src.hasAltIdElement()) + tgt.setAltIdElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getAltIdElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getNameElement())); + if (src.hasRequestorElement()) + tgt.setRequestorElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_50.convertType(src.getRequestorElement())); if (src.hasLocation()) tgt.setLocation(VersionConvertor_30_50.convertReference(src.getLocation())); if (src.hasPolicy()) { @@ -180,8 +183,8 @@ public class AuditEvent30_50 { return null; org.hl7.fhir.dstu3.model.AuditEvent.AuditEventAgentNetworkComponent tgt = new org.hl7.fhir.dstu3.model.AuditEvent.AuditEventAgentNetworkComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasAddress()) - tgt.setAddress(src.getAddress()); + if (src.hasAddressElement()) + tgt.setAddressElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getAddressElement())); if (src.hasType()) tgt.setType(convertAuditEventAgentNetworkType(src.getType())); return tgt; @@ -192,8 +195,8 @@ public class AuditEvent30_50 { return null; org.hl7.fhir.r5.model.AuditEvent.AuditEventAgentNetworkComponent tgt = new org.hl7.fhir.r5.model.AuditEvent.AuditEventAgentNetworkComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasAddress()) - tgt.setAddress(src.getAddress()); + if (src.hasAddressElement()) + tgt.setAddressElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getAddressElement())); if (src.hasType()) tgt.setType(convertAuditEventAgentNetworkType(src.getType())); return tgt; @@ -255,10 +258,10 @@ public class AuditEvent30_50 { if (src.hasSecurityLabel()) { for (org.hl7.fhir.dstu3.model.Coding t : src.getSecurityLabel()) tgt.addSecurityLabel(VersionConvertor_30_50.convertCoding(t)); } - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasQuery()) - tgt.setQuery(src.getQuery()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getNameElement())); + if (src.hasQueryElement()) + tgt.setQueryElement((Base64BinaryType) VersionConvertor_30_50.convertType(src.getQueryElement())); if (src.hasDetail()) { for (org.hl7.fhir.dstu3.model.AuditEvent.AuditEventEntityDetailComponent t : src.getDetail()) tgt.addDetail(convertAuditEventEntityDetailComponent(t)); } @@ -285,10 +288,10 @@ public class AuditEvent30_50 { if (src.hasSecurityLabel()) { for (org.hl7.fhir.r5.model.Coding t : src.getSecurityLabel()) tgt.addSecurityLabel(VersionConvertor_30_50.convertCoding(t)); } - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasQuery()) - tgt.setQuery(src.getQuery()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getNameElement())); + if (src.hasQueryElement()) + tgt.setQueryElement((org.hl7.fhir.dstu3.model.Base64BinaryType) VersionConvertor_30_50.convertType(src.getQueryElement())); if (src.hasDetail()) { for (org.hl7.fhir.r5.model.AuditEvent.AuditEventEntityDetailComponent t : src.getDetail()) tgt.addDetail(convertAuditEventEntityDetailComponent(t)); } @@ -300,8 +303,8 @@ public class AuditEvent30_50 { return null; org.hl7.fhir.dstu3.model.AuditEvent.AuditEventEntityDetailComponent tgt = new org.hl7.fhir.dstu3.model.AuditEvent.AuditEventEntityDetailComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasType()) - tgt.setType(src.getType()); + if (src.hasTypeElement()) + tgt.setTypeElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getTypeElement())); if (src.hasValueStringType()) tgt.setValue(src.getValueStringType().getValue().getBytes()); else if (src.hasValueBase64BinaryType()) @@ -314,8 +317,8 @@ public class AuditEvent30_50 { return null; org.hl7.fhir.r5.model.AuditEvent.AuditEventEntityDetailComponent tgt = new org.hl7.fhir.r5.model.AuditEvent.AuditEventEntityDetailComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasType()) - tgt.setType(src.getType()); + if (src.hasTypeElement()) + tgt.setTypeElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getTypeElement())); if (src.hasValue()) tgt.setValue(new org.hl7.fhir.r5.model.Base64BinaryType(src.getValue())); return tgt; @@ -360,8 +363,8 @@ public class AuditEvent30_50 { return null; org.hl7.fhir.dstu3.model.AuditEvent.AuditEventSourceComponent tgt = new org.hl7.fhir.dstu3.model.AuditEvent.AuditEventSourceComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasSite()) - tgt.setSite(src.getSite()); + if (src.hasSiteElement()) + tgt.setSiteElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getSiteElement())); if (src.hasObserver()) tgt.setIdentifier(VersionConvertor_30_50.convertIdentifier(src.getObserver().getIdentifier())); if (src.hasType()) { @@ -375,8 +378,8 @@ public class AuditEvent30_50 { return null; org.hl7.fhir.r5.model.AuditEvent.AuditEventSourceComponent tgt = new org.hl7.fhir.r5.model.AuditEvent.AuditEventSourceComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasSite()) - tgt.setSite(src.getSite()); + if (src.hasSiteElement()) + tgt.setSiteElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getSiteElement())); if (src.hasIdentifier()) tgt.getObserver().setIdentifier(VersionConvertor_30_50.convertIdentifier(src.getIdentifier())); if (src.hasType()) { diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Basic30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Basic30_50.java index 3f2b8d56a..e42e25792 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Basic30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Basic30_50.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_50; import org.hl7.fhir.convertors.VersionConvertor_30_50; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Basic30_50 { @@ -17,8 +18,8 @@ public class Basic30_50 { tgt.setCode(VersionConvertor_30_50.convertCodeableConcept(src.getCode())); if (src.hasSubject()) tgt.setSubject(VersionConvertor_30_50.convertReference(src.getSubject())); - if (src.hasCreated()) - tgt.setCreated(src.getCreated()); + if (src.hasCreatedElement()) + tgt.setCreatedElement((org.hl7.fhir.r5.model.DateType) VersionConvertor_30_50.convertType(src.getCreatedElement())); if (src.hasAuthor()) tgt.setAuthor(VersionConvertor_30_50.convertReference(src.getAuthor())); return tgt; @@ -36,8 +37,8 @@ public class Basic30_50 { tgt.setCode(VersionConvertor_30_50.convertCodeableConcept(src.getCode())); if (src.hasSubject()) tgt.setSubject(VersionConvertor_30_50.convertReference(src.getSubject())); - if (src.hasCreated()) - tgt.setCreated(src.getCreated()); + if (src.hasCreatedElement()) + tgt.setCreatedElement((org.hl7.fhir.dstu3.model.DateType) VersionConvertor_30_50.convertType(src.getCreatedElement())); if (src.hasAuthor()) tgt.setAuthor(VersionConvertor_30_50.convertReference(src.getAuthor())); return tgt; diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Binary30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Binary30_50.java index 61d45446f..80fdc4c0e 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Binary30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Binary30_50.java @@ -2,6 +2,9 @@ package org.hl7.fhir.convertors.conv30_50; import org.hl7.fhir.convertors.VersionConvertor_30_50; import org.hl7.fhir.exceptions.FHIRException; +import org.hl7.fhir.r5.model.Base64BinaryType; + +import java.util.Collections; public class Binary30_50 { @@ -10,12 +13,12 @@ public class Binary30_50 { return null; org.hl7.fhir.r5.model.Binary tgt = new org.hl7.fhir.r5.model.Binary(); VersionConvertor_30_50.copyResource(src, tgt); - if (src.hasContentType()) - tgt.setContentType(src.getContentType()); + if (src.hasContentTypeElement()) + tgt.setContentTypeElement((org.hl7.fhir.r5.model.CodeType) VersionConvertor_30_50.convertType(src.getContentTypeElement())); if (src.hasSecurityContext()) tgt.setSecurityContext(VersionConvertor_30_50.convertReference(src.getSecurityContext())); - if (src.hasContent()) - tgt.setData(src.getContent()); + if (src.hasContentElement()) + tgt.setDataElement((Base64BinaryType) VersionConvertor_30_50.convertType(src.getContentElement())); return tgt; } @@ -24,12 +27,12 @@ public class Binary30_50 { return null; org.hl7.fhir.dstu3.model.Binary tgt = new org.hl7.fhir.dstu3.model.Binary(); VersionConvertor_30_50.copyResource(src, tgt); - if (src.hasContentType()) - tgt.setContentType(src.getContentType()); + if (src.hasContentTypeElement()) + tgt.setContentTypeElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_30_50.convertType(src.getContentTypeElement())); if (src.hasSecurityContext()) tgt.setSecurityContext(VersionConvertor_30_50.convertReference(src.getSecurityContext())); - if (src.hasData()) - tgt.setContent(src.getData()); + if (src.hasDataElement()) + tgt.setContentElement((org.hl7.fhir.dstu3.model.Base64BinaryType) VersionConvertor_30_50.convertType(src.getDataElement())); return tgt; } } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/BodySite30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/BodySite30_50.java index 1ad48d84b..e89d570d0 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/BodySite30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/BodySite30_50.java @@ -2,6 +2,10 @@ package org.hl7.fhir.convertors.conv30_50; import org.hl7.fhir.convertors.VersionConvertor_30_50; import org.hl7.fhir.exceptions.FHIRException; +import org.hl7.fhir.r5.model.BooleanType; +import org.hl7.fhir.r5.model.StringType; + +import java.util.Collections; public class BodySite30_50 { @@ -13,10 +17,10 @@ public class BodySite30_50 { if (src.hasIdentifier()) { for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_30_50.convertIdentifier(t)); } - if (src.hasActive()) - tgt.setActive(src.getActive()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasActiveElement()) + tgt.setActiveElement((BooleanType) VersionConvertor_30_50.convertType(src.getActiveElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((StringType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); if (src.hasImage()) { for (org.hl7.fhir.dstu3.model.Attachment t : src.getImage()) tgt.addImage(VersionConvertor_30_50.convertAttachment(t)); } @@ -33,10 +37,10 @@ public class BodySite30_50 { if (src.hasIdentifier()) { for (org.hl7.fhir.r5.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_30_50.convertIdentifier(t)); } - if (src.hasActive()) - tgt.setActive(src.getActive()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasActiveElement()) + tgt.setActiveElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_50.convertType(src.getActiveElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); if (src.hasImage()) { for (org.hl7.fhir.r5.model.Attachment t : src.getImage()) tgt.addImage(VersionConvertor_30_50.convertAttachment(t)); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Bundle30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Bundle30_50.java index a38d1bfbc..4398bd787 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Bundle30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Bundle30_50.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_50; import org.hl7.fhir.convertors.VersionConvertor_30_50; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Bundle30_50 { @@ -14,8 +15,8 @@ public class Bundle30_50 { tgt.setIdentifier(VersionConvertor_30_50.convertIdentifier(src.getIdentifier())); if (src.hasType()) tgt.setType(convertBundleType(src.getType())); - if (src.hasTotal()) - tgt.setTotal(src.getTotal()); + if (src.hasTotalElement()) + tgt.setTotalElement((org.hl7.fhir.r5.model.UnsignedIntType) VersionConvertor_30_50.convertType(src.getTotalElement())); if (src.hasLink()) { for (org.hl7.fhir.dstu3.model.Bundle.BundleLinkComponent t : src.getLink()) tgt.addLink(convertBundleLinkComponent(t)); } @@ -36,8 +37,8 @@ public class Bundle30_50 { tgt.setIdentifier(VersionConvertor_30_50.convertIdentifier(src.getIdentifier())); if (src.hasType()) tgt.setType(convertBundleType(src.getType())); - if (src.hasTotal()) - tgt.setTotal(src.getTotal()); + if (src.hasTotalElement()) + tgt.setTotalElement((org.hl7.fhir.dstu3.model.UnsignedIntType) VersionConvertor_30_50.convertType(src.getTotalElement())); if (src.hasLink()) { for (org.hl7.fhir.r5.model.Bundle.BundleLinkComponent t : src.getLink()) tgt.addLink(convertBundleLinkComponent(t)); } @@ -57,8 +58,8 @@ public class Bundle30_50 { if (src.hasLink()) { for (org.hl7.fhir.r5.model.Bundle.BundleLinkComponent t : src.getLink()) tgt.addLink(convertBundleLinkComponent(t)); } - if (src.hasFullUrl()) - tgt.setFullUrl(src.getFullUrl()); + if (src.hasFullUrlElement()) + tgt.setFullUrlElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_50.convertType(src.getFullUrlElement())); if (src.hasResource()) tgt.setResource(VersionConvertor_30_50.convertResource(src.getResource(), false)); if (src.hasSearch()) @@ -78,8 +79,8 @@ public class Bundle30_50 { if (src.hasLink()) { for (org.hl7.fhir.dstu3.model.Bundle.BundleLinkComponent t : src.getLink()) tgt.addLink(convertBundleLinkComponent(t)); } - if (src.hasFullUrl()) - tgt.setFullUrl(src.getFullUrl()); + if (src.hasFullUrlElement()) + tgt.setFullUrlElement((org.hl7.fhir.r5.model.UriType) VersionConvertor_30_50.convertType(src.getFullUrlElement())); if (src.hasResource()) tgt.setResource(VersionConvertor_30_50.convertResource(src.getResource(), false)); if (src.hasSearch()) @@ -98,16 +99,16 @@ public class Bundle30_50 { VersionConvertor_30_50.copyElement(src, tgt); if (src.hasMethod()) tgt.setMethod(convertHTTPVerb(src.getMethod())); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); - if (src.hasIfNoneMatch()) - tgt.setIfNoneMatch(src.getIfNoneMatch()); - if (src.hasIfModifiedSince()) - tgt.setIfModifiedSince(src.getIfModifiedSince()); - if (src.hasIfMatch()) - tgt.setIfMatch(src.getIfMatch()); - if (src.hasIfNoneExist()) - tgt.setIfNoneExist(src.getIfNoneExist()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r5.model.UriType) VersionConvertor_30_50.convertType(src.getUrlElement())); + if (src.hasIfNoneMatchElement()) + tgt.setIfNoneMatchElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getIfNoneMatchElement())); + if (src.hasIfModifiedSinceElement()) + tgt.setIfModifiedSinceElement((org.hl7.fhir.r5.model.InstantType) VersionConvertor_30_50.convertType(src.getIfModifiedSinceElement())); + if (src.hasIfMatchElement()) + tgt.setIfMatchElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getIfMatchElement())); + if (src.hasIfNoneExistElement()) + tgt.setIfNoneExistElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getIfNoneExistElement())); return tgt; } @@ -118,16 +119,16 @@ public class Bundle30_50 { VersionConvertor_30_50.copyElement(src, tgt); if (src.hasMethod()) tgt.setMethod(convertHTTPVerb(src.getMethod())); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); - if (src.hasIfNoneMatch()) - tgt.setIfNoneMatch(src.getIfNoneMatch()); - if (src.hasIfModifiedSince()) - tgt.setIfModifiedSince(src.getIfModifiedSince()); - if (src.hasIfMatch()) - tgt.setIfMatch(src.getIfMatch()); - if (src.hasIfNoneExist()) - tgt.setIfNoneExist(src.getIfNoneExist()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_50.convertType(src.getUrlElement())); + if (src.hasIfNoneMatchElement()) + tgt.setIfNoneMatchElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getIfNoneMatchElement())); + if (src.hasIfModifiedSinceElement()) + tgt.setIfModifiedSinceElement((org.hl7.fhir.dstu3.model.InstantType) VersionConvertor_30_50.convertType(src.getIfModifiedSinceElement())); + if (src.hasIfMatchElement()) + tgt.setIfMatchElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getIfMatchElement())); + if (src.hasIfNoneExistElement()) + tgt.setIfNoneExistElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getIfNoneExistElement())); return tgt; } @@ -136,14 +137,14 @@ public class Bundle30_50 { return null; org.hl7.fhir.r5.model.Bundle.BundleEntryResponseComponent tgt = new org.hl7.fhir.r5.model.Bundle.BundleEntryResponseComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasStatus()) - tgt.setStatus(src.getStatus()); - if (src.hasLocation()) - tgt.setLocation(src.getLocation()); - if (src.hasEtag()) - tgt.setEtag(src.getEtag()); - if (src.hasLastModified()) - tgt.setLastModified(src.getLastModified()); + if (src.hasStatusElement()) + tgt.setStatusElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getStatusElement())); + if (src.hasLocationElement()) + tgt.setLocationElement((org.hl7.fhir.r5.model.UriType) VersionConvertor_30_50.convertType(src.getLocationElement())); + if (src.hasEtagElement()) + tgt.setEtagElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getEtagElement())); + if (src.hasLastModifiedElement()) + tgt.setLastModifiedElement((org.hl7.fhir.r5.model.InstantType) VersionConvertor_30_50.convertType(src.getLastModifiedElement())); if (src.hasOutcome()) tgt.setOutcome(VersionConvertor_30_50.convertResource(src.getOutcome(), false)); return tgt; @@ -154,14 +155,14 @@ public class Bundle30_50 { return null; org.hl7.fhir.dstu3.model.Bundle.BundleEntryResponseComponent tgt = new org.hl7.fhir.dstu3.model.Bundle.BundleEntryResponseComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasStatus()) - tgt.setStatus(src.getStatus()); - if (src.hasLocation()) - tgt.setLocation(src.getLocation()); - if (src.hasEtag()) - tgt.setEtag(src.getEtag()); - if (src.hasLastModified()) - tgt.setLastModified(src.getLastModified()); + if (src.hasStatusElement()) + tgt.setStatusElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getStatusElement())); + if (src.hasLocationElement()) + tgt.setLocationElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_50.convertType(src.getLocationElement())); + if (src.hasEtagElement()) + tgt.setEtagElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getEtagElement())); + if (src.hasLastModifiedElement()) + tgt.setLastModifiedElement((org.hl7.fhir.dstu3.model.InstantType) VersionConvertor_30_50.convertType(src.getLastModifiedElement())); if (src.hasOutcome()) tgt.setOutcome(VersionConvertor_30_50.convertResource(src.getOutcome(), false)); return tgt; @@ -174,8 +175,8 @@ public class Bundle30_50 { VersionConvertor_30_50.copyElement(src, tgt); if (src.hasMode()) tgt.setMode(convertSearchEntryMode(src.getMode())); - if (src.hasScore()) - tgt.setScore(src.getScore()); + if (src.hasScoreElement()) + tgt.setScoreElement((org.hl7.fhir.dstu3.model.DecimalType) VersionConvertor_30_50.convertType(src.getScoreElement())); return tgt; } @@ -186,8 +187,8 @@ public class Bundle30_50 { VersionConvertor_30_50.copyElement(src, tgt); if (src.hasMode()) tgt.setMode(convertSearchEntryMode(src.getMode())); - if (src.hasScore()) - tgt.setScore(src.getScore()); + if (src.hasScoreElement()) + tgt.setScoreElement((org.hl7.fhir.r5.model.DecimalType) VersionConvertor_30_50.convertType(src.getScoreElement())); return tgt; } @@ -196,10 +197,10 @@ public class Bundle30_50 { return null; org.hl7.fhir.r5.model.Bundle.BundleLinkComponent tgt = new org.hl7.fhir.r5.model.Bundle.BundleLinkComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasRelation()) - tgt.setRelation(src.getRelation()); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasRelationElement()) + tgt.setRelationElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getRelationElement())); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r5.model.UriType) VersionConvertor_30_50.convertType(src.getUrlElement())); return tgt; } @@ -208,10 +209,10 @@ public class Bundle30_50 { return null; org.hl7.fhir.dstu3.model.Bundle.BundleLinkComponent tgt = new org.hl7.fhir.dstu3.model.Bundle.BundleLinkComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasRelation()) - tgt.setRelation(src.getRelation()); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasRelationElement()) + tgt.setRelationElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getRelationElement())); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_50.convertType(src.getUrlElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/CapabilityStatement30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/CapabilityStatement30_50.java index 48b9d21f3..9761bf1f1 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/CapabilityStatement30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/CapabilityStatement30_50.java @@ -3,6 +3,7 @@ package org.hl7.fhir.convertors.conv30_50; import org.hl7.fhir.convertors.VersionConvertorConstants; import org.hl7.fhir.convertors.VersionConvertor_30_50; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class CapabilityStatement30_50 { @@ -11,37 +12,37 @@ public class CapabilityStatement30_50 { return null; org.hl7.fhir.r5.model.CapabilityStatement tgt = new org.hl7.fhir.r5.model.CapabilityStatement(); VersionConvertor_30_50.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r5.model.UriType) VersionConvertor_30_50.convertType(src.getUrlElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getNameElement())); + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getTitleElement())); if (src.hasStatus()) tgt.setStatus(VersionConvertor_30_50.convertPublicationStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_30_50.convertType(src.getExperimentalElement())); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.r5.model.DateTimeType) VersionConvertor_30_50.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) tgt.addContact(VersionConvertor_30_50.convertContactDetail(t)); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r5.model.MarkdownType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); if (src.hasUseContext()) { for (org.hl7.fhir.dstu3.model.UsageContext t : src.getUseContext()) tgt.addUseContext(VersionConvertor_30_50.convertUsageContext(t)); } if (src.hasJurisdiction()) { for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getJurisdiction()) tgt.addJurisdiction(VersionConvertor_30_50.convertCodeableConcept(t)); } - if (src.hasPurpose()) - tgt.setPurpose(src.getPurpose()); - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); + if (src.hasPurposeElement()) + tgt.setPurposeElement((org.hl7.fhir.r5.model.MarkdownType) VersionConvertor_30_50.convertType(src.getPurposeElement())); + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.r5.model.MarkdownType) VersionConvertor_30_50.convertType(src.getCopyrightElement())); if (src.hasKind()) tgt.setKind(convertCapabilityStatementKind(src.getKind())); if (src.hasInstantiates()) { @@ -84,37 +85,37 @@ public class CapabilityStatement30_50 { return null; org.hl7.fhir.dstu3.model.CapabilityStatement tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement(); VersionConvertor_30_50.copyDomainResource(src, tgt, "http://hl7.org/fhir/3.0/StructureDefinition/extension-CapabilityStatement.acceptUnknown", "http://hl7.org/fhir/3.0/StructureDefinition/extension-CapabilityStatement.profile"); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_50.convertType(src.getUrlElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getNameElement())); + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getTitleElement())); if (src.hasStatus()) tgt.setStatus(VersionConvertor_30_50.convertPublicationStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_50.convertType(src.getExperimentalElement())); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_30_50.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.r5.model.ContactDetail t : src.getContact()) tgt.addContact(VersionConvertor_30_50.convertContactDetail(t)); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); if (src.hasUseContext()) { for (org.hl7.fhir.r5.model.UsageContext t : src.getUseContext()) tgt.addUseContext(VersionConvertor_30_50.convertUsageContext(t)); } if (src.hasJurisdiction()) { for (org.hl7.fhir.r5.model.CodeableConcept t : src.getJurisdiction()) tgt.addJurisdiction(VersionConvertor_30_50.convertCodeableConcept(t)); } - if (src.hasPurpose()) - tgt.setPurpose(src.getPurpose()); - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); + if (src.hasPurposeElement()) + tgt.setPurposeElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_50.convertType(src.getPurposeElement())); + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_50.convertType(src.getCopyrightElement())); if (src.hasKind()) tgt.setKind(convertCapabilityStatementKind(src.getKind())); if (src.hasInstantiates()) { @@ -190,10 +191,10 @@ public class CapabilityStatement30_50 { return null; org.hl7.fhir.r5.model.CapabilityStatement.CapabilityStatementImplementationComponent tgt = new org.hl7.fhir.r5.model.CapabilityStatement.CapabilityStatementImplementationComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r5.model.UrlType) VersionConvertor_30_50.convertType(src.getUrlElement())); return tgt; } @@ -202,10 +203,10 @@ public class CapabilityStatement30_50 { return null; org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementImplementationComponent tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementImplementationComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_50.convertType(src.getUrlElement())); return tgt; } @@ -247,10 +248,10 @@ public class CapabilityStatement30_50 { if (src.hasEndpoint()) { for (org.hl7.fhir.r5.model.CapabilityStatement.CapabilityStatementMessagingEndpointComponent t : src.getEndpoint()) tgt.addEndpoint(convertCapabilityStatementMessagingEndpointComponent(t)); } - if (src.hasReliableCache()) - tgt.setReliableCache(src.getReliableCache()); - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasReliableCacheElement()) + tgt.setReliableCacheElement((org.hl7.fhir.dstu3.model.UnsignedIntType) VersionConvertor_30_50.convertType(src.getReliableCacheElement())); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getDocumentationElement())); if (src.hasSupportedMessage()) { for (org.hl7.fhir.r5.model.CapabilityStatement.CapabilityStatementMessagingSupportedMessageComponent t : src.getSupportedMessage()) tgt.addSupportedMessage(convertCapabilityStatementMessagingSupportedMessageComponent(t)); } @@ -284,10 +285,10 @@ public class CapabilityStatement30_50 { if (src.hasEndpoint()) { for (org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingEndpointComponent t : src.getEndpoint()) tgt.addEndpoint(convertCapabilityStatementMessagingEndpointComponent(t)); } - if (src.hasReliableCache()) - tgt.setReliableCache(src.getReliableCache()); - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasReliableCacheElement()) + tgt.setReliableCacheElement((org.hl7.fhir.r5.model.UnsignedIntType) VersionConvertor_30_50.convertType(src.getReliableCacheElement())); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.r5.model.MarkdownType) VersionConvertor_30_50.convertType(src.getDocumentationElement())); if (src.hasSupportedMessage()) { for (org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingSupportedMessageComponent t : src.getSupportedMessage()) tgt.addSupportedMessage(convertCapabilityStatementMessagingSupportedMessageComponent(t)); } @@ -321,8 +322,8 @@ public class CapabilityStatement30_50 { VersionConvertor_30_50.copyElement(src, tgt); if (src.hasProtocol()) tgt.setProtocol(VersionConvertor_30_50.convertCoding(src.getProtocol())); - if (src.hasAddress()) - tgt.setAddress(src.getAddress()); + if (src.hasAddressElement()) + tgt.setAddressElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_50.convertType(src.getAddressElement())); return tgt; } @@ -333,8 +334,8 @@ public class CapabilityStatement30_50 { VersionConvertor_30_50.copyElement(src, tgt); if (src.hasProtocol()) tgt.setProtocol(VersionConvertor_30_50.convertCoding(src.getProtocol())); - if (src.hasAddress()) - tgt.setAddress(src.getAddress()); + if (src.hasAddressElement()) + tgt.setAddressElement((org.hl7.fhir.r5.model.UrlType) VersionConvertor_30_50.convertType(src.getAddressElement())); return tgt; } @@ -369,8 +370,8 @@ public class CapabilityStatement30_50 { VersionConvertor_30_50.copyElement(src, tgt); if (src.hasMode()) tgt.setMode(convertRestfulCapabilityMode(src.getMode())); - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getDocumentationElement())); if (src.hasSecurity()) tgt.setSecurity(convertCapabilityStatementRestSecurityComponent(src.getSecurity())); if (src.hasResource()) { @@ -398,8 +399,8 @@ public class CapabilityStatement30_50 { VersionConvertor_30_50.copyElement(src, tgt); if (src.hasMode()) tgt.setMode(convertRestfulCapabilityMode(src.getMode())); - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.r5.model.MarkdownType) VersionConvertor_30_50.convertType(src.getDocumentationElement())); if (src.hasSecurity()) tgt.setSecurity(convertCapabilityStatementRestSecurityComponent(src.getSecurity())); if (src.hasResource()) { @@ -425,8 +426,8 @@ public class CapabilityStatement30_50 { return null; org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestOperationComponent tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestOperationComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getNameElement())); if (src.hasDefinition()) tgt.setDefinition(VersionConvertor_30_50.convertCanonicalToReference(src.getDefinitionElement())); return tgt; @@ -437,8 +438,8 @@ public class CapabilityStatement30_50 { return null; org.hl7.fhir.r5.model.CapabilityStatement.CapabilityStatementRestResourceOperationComponent tgt = new org.hl7.fhir.r5.model.CapabilityStatement.CapabilityStatementRestResourceOperationComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getNameElement())); if (src.hasDefinition()) tgt.setDefinitionElement(VersionConvertor_30_50.convertReferenceToCanonical(src.getDefinition())); return tgt; @@ -449,27 +450,27 @@ public class CapabilityStatement30_50 { return null; org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestResourceComponent tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestResourceComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasType()) - tgt.setType(src.getType()); + if (src.hasTypeElement()) + tgt.setTypeElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_30_50.convertType(src.getTypeElement())); if (src.hasProfile()) tgt.setProfile(VersionConvertor_30_50.convertCanonicalToReference(src.getProfileElement())); - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_50.convertType(src.getDocumentationElement())); if (src.hasInteraction()) { for (org.hl7.fhir.r5.model.CapabilityStatement.ResourceInteractionComponent t : src.getInteraction()) tgt.addInteraction(convertResourceInteractionComponent(t)); } if (src.hasVersioning()) tgt.setVersioning(convertResourceVersionPolicy(src.getVersioning())); - if (src.hasReadHistory()) - tgt.setReadHistory(src.getReadHistory()); - if (src.hasUpdateCreate()) - tgt.setUpdateCreate(src.getUpdateCreate()); - if (src.hasConditionalCreate()) - tgt.setConditionalCreate(src.getConditionalCreate()); + if (src.hasReadHistoryElement()) + tgt.setReadHistoryElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_50.convertType(src.getReadHistoryElement())); + if (src.hasUpdateCreateElement()) + tgt.setUpdateCreateElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_50.convertType(src.getUpdateCreateElement())); + if (src.hasConditionalCreateElement()) + tgt.setConditionalCreateElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_50.convertType(src.getConditionalCreateElement())); if (src.hasConditionalRead()) tgt.setConditionalRead(convertConditionalReadStatus(src.getConditionalRead())); - if (src.hasConditionalUpdate()) - tgt.setConditionalUpdate(src.getConditionalUpdate()); + if (src.hasConditionalUpdateElement()) + tgt.setConditionalUpdateElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_50.convertType(src.getConditionalUpdateElement())); if (src.hasConditionalDelete()) tgt.setConditionalDelete(convertConditionalDeleteStatus(src.getConditionalDelete())); if (src.hasReferencePolicy()) { @@ -492,27 +493,27 @@ public class CapabilityStatement30_50 { return null; org.hl7.fhir.r5.model.CapabilityStatement.CapabilityStatementRestResourceComponent tgt = new org.hl7.fhir.r5.model.CapabilityStatement.CapabilityStatementRestResourceComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasType()) - tgt.setType(src.getType()); + if (src.hasTypeElement()) + tgt.setTypeElement((org.hl7.fhir.r5.model.CodeType) VersionConvertor_30_50.convertType(src.getTypeElement())); if (src.hasProfile()) tgt.setProfileElement(VersionConvertor_30_50.convertReferenceToCanonical(src.getProfile())); - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.r5.model.MarkdownType) VersionConvertor_30_50.convertType(src.getDocumentationElement())); if (src.hasInteraction()) { for (org.hl7.fhir.dstu3.model.CapabilityStatement.ResourceInteractionComponent t : src.getInteraction()) tgt.addInteraction(convertResourceInteractionComponent(t)); } if (src.hasVersioning()) tgt.setVersioning(convertResourceVersionPolicy(src.getVersioning())); - if (src.hasReadHistory()) - tgt.setReadHistory(src.getReadHistory()); - if (src.hasUpdateCreate()) - tgt.setUpdateCreate(src.getUpdateCreate()); - if (src.hasConditionalCreate()) - tgt.setConditionalCreate(src.getConditionalCreate()); + if (src.hasReadHistoryElement()) + tgt.setReadHistoryElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_30_50.convertType(src.getReadHistoryElement())); + if (src.hasUpdateCreateElement()) + tgt.setUpdateCreateElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_30_50.convertType(src.getUpdateCreateElement())); + if (src.hasConditionalCreateElement()) + tgt.setConditionalCreateElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_30_50.convertType(src.getConditionalCreateElement())); if (src.hasConditionalRead()) tgt.setConditionalRead(convertConditionalReadStatus(src.getConditionalRead())); - if (src.hasConditionalUpdate()) - tgt.setConditionalUpdate(src.getConditionalUpdate()); + if (src.hasConditionalUpdateElement()) + tgt.setConditionalUpdateElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_30_50.convertType(src.getConditionalUpdateElement())); if (src.hasConditionalDelete()) tgt.setConditionalDelete(convertConditionalDeleteStatus(src.getConditionalDelete())); if (src.hasReferencePolicy()) { @@ -535,14 +536,14 @@ public class CapabilityStatement30_50 { return null; org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasDefinition()) - tgt.setDefinition(src.getDefinition()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getNameElement())); + if (src.hasDefinitionElement()) + tgt.setDefinitionElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_50.convertType(src.getDefinitionElement())); if (src.hasType()) tgt.setType(VersionConvertor_30_50.convertSearchParamType(src.getType())); - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getDocumentationElement())); return tgt; } @@ -551,14 +552,14 @@ public class CapabilityStatement30_50 { return null; org.hl7.fhir.r5.model.CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent tgt = new org.hl7.fhir.r5.model.CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasDefinition()) - tgt.setDefinition(src.getDefinition()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getNameElement())); + if (src.hasDefinitionElement()) + tgt.setDefinitionElement((org.hl7.fhir.r5.model.CanonicalType) VersionConvertor_30_50.convertType(src.getDefinitionElement())); if (src.hasType()) tgt.setType(VersionConvertor_30_50.convertSearchParamType(src.getType())); - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.r5.model.MarkdownType) VersionConvertor_30_50.convertType(src.getDocumentationElement())); return tgt; } @@ -567,13 +568,13 @@ public class CapabilityStatement30_50 { return null; org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestSecurityComponent tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestSecurityComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasCors()) - tgt.setCors(src.getCors()); + if (src.hasCorsElement()) + tgt.setCorsElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_50.convertType(src.getCorsElement())); if (src.hasService()) { for (org.hl7.fhir.r5.model.CodeableConcept t : src.getService()) tgt.addService(VersionConvertor_30_50.convertCodeableConcept(t)); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); return tgt; } @@ -582,13 +583,13 @@ public class CapabilityStatement30_50 { return null; org.hl7.fhir.r5.model.CapabilityStatement.CapabilityStatementRestSecurityComponent tgt = new org.hl7.fhir.r5.model.CapabilityStatement.CapabilityStatementRestSecurityComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasCors()) - tgt.setCors(src.getCors()); + if (src.hasCorsElement()) + tgt.setCorsElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_30_50.convertType(src.getCorsElement())); if (src.hasService()) { for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getService()) tgt.addService(VersionConvertor_30_50.convertCodeableConcept(t)); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r5.model.MarkdownType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); return tgt; } @@ -597,12 +598,12 @@ public class CapabilityStatement30_50 { return null; org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementSoftwareComponent tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementSoftwareComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasReleaseDate()) - tgt.setReleaseDate(src.getReleaseDate()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getNameElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getVersionElement())); + if (src.hasReleaseDateElement()) + tgt.setReleaseDateElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_30_50.convertType(src.getReleaseDateElement())); return tgt; } @@ -611,12 +612,12 @@ public class CapabilityStatement30_50 { return null; org.hl7.fhir.r5.model.CapabilityStatement.CapabilityStatementSoftwareComponent tgt = new org.hl7.fhir.r5.model.CapabilityStatement.CapabilityStatementSoftwareComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasReleaseDate()) - tgt.setReleaseDate(src.getReleaseDate()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getNameElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getVersionElement())); + if (src.hasReleaseDateElement()) + tgt.setReleaseDateElement((org.hl7.fhir.r5.model.DateTimeType) VersionConvertor_30_50.convertType(src.getReleaseDateElement())); return tgt; } @@ -781,8 +782,8 @@ public class CapabilityStatement30_50 { VersionConvertor_30_50.copyElement(src, tgt); if (src.hasCode()) tgt.setCode(convertTypeRestfulInteraction(src.getCode())); - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.r5.model.MarkdownType) VersionConvertor_30_50.convertType(src.getDocumentationElement())); return tgt; } @@ -793,8 +794,8 @@ public class CapabilityStatement30_50 { VersionConvertor_30_50.copyElement(src, tgt); if (src.hasCode()) tgt.setCode(convertTypeRestfulInteraction(src.getCode())); - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getDocumentationElement())); return tgt; } @@ -861,8 +862,8 @@ public class CapabilityStatement30_50 { VersionConvertor_30_50.copyElement(src, tgt); if (src.hasCode()) tgt.setCode(convertSystemRestfulInteraction(src.getCode())); - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getDocumentationElement())); return tgt; } @@ -873,8 +874,8 @@ public class CapabilityStatement30_50 { VersionConvertor_30_50.copyElement(src, tgt); if (src.hasCode()) tgt.setCode(convertSystemRestfulInteraction(src.getCode())); - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.r5.model.MarkdownType) VersionConvertor_30_50.convertType(src.getDocumentationElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/CarePlan30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/CarePlan30_50.java index c163a4130..ecb3561ca 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/CarePlan30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/CarePlan30_50.java @@ -2,8 +2,10 @@ package org.hl7.fhir.convertors.conv30_50; import org.hl7.fhir.convertors.VersionConvertor_30_50; import org.hl7.fhir.exceptions.FHIRException; +import org.hl7.fhir.r5.model.CodeType; import org.hl7.fhir.r5.model.CodeableReference; import java.util.List; +import java.util.Collections; public class CarePlan30_50 { @@ -33,12 +35,10 @@ public class CarePlan30_50 { for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getCategory()) { tgt.addCategory(VersionConvertor_30_50.convertCodeableConcept(t)); } - if (src.hasTitle()) { - tgt.setTitle(src.getTitle()); - } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getTitleElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); if (src.hasSubject()) { tgt.setSubject(VersionConvertor_30_50.convertReference(src.getSubject())); } @@ -93,47 +93,29 @@ public class CarePlan30_50 { tgt.addPartOf(VersionConvertor_30_50.convertReference(t)); } if (src.hasStatus()) { - if (src.hasStatus()) { - tgt.setStatus(convertCarePlanStatus(src.getStatus())); - } + tgt.setStatus(convertCarePlanStatus(src.getStatus())); } if (src.hasIntent()) { - if (src.hasIntent()) { - tgt.setIntent(convertCarePlanIntent(src.getIntent())); - } + tgt.setIntent(convertCarePlanIntent(src.getIntent())); } for (org.hl7.fhir.r5.model.CodeableConcept t : src.getCategory()) { tgt.addCategory(VersionConvertor_30_50.convertCodeableConcept(t)); } - if (src.hasTitle()) { - if (src.hasTitle()) { - tgt.setTitle(src.getTitle()); - } - } - if (src.hasDescription()) { - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } - } + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getTitleElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); if (src.hasSubject()) { - if (src.hasSubject()) { - tgt.setSubject(VersionConvertor_30_50.convertReference(src.getSubject())); - } + tgt.setSubject(VersionConvertor_30_50.convertReference(src.getSubject())); } if (src.hasEncounter()) { - if (src.hasEncounter()) { - tgt.setContext(VersionConvertor_30_50.convertReference(src.getEncounter())); - } + tgt.setContext(VersionConvertor_30_50.convertReference(src.getEncounter())); } if (src.hasPeriod()) { - if (src.hasPeriod()) { - tgt.setPeriod(VersionConvertor_30_50.convertPeriod(src.getPeriod())); - } + tgt.setPeriod(VersionConvertor_30_50.convertPeriod(src.getPeriod())); } if (src.hasAuthor()) { - if (src.hasAuthor()) { - tgt.addAuthor(VersionConvertor_30_50.convertReference(src.getAuthor())); - } + tgt.addAuthor(VersionConvertor_30_50.convertReference(src.getAuthor())); } for (org.hl7.fhir.r5.model.Reference t : src.getCareTeam()) { tgt.addCareTeam(VersionConvertor_30_50.convertReference(t)); @@ -174,14 +156,10 @@ public class CarePlan30_50 { tgt.addProgress(VersionConvertor_30_50.convertAnnotation(t)); } if (src.hasReference()) { - if (src.hasReference()) { - tgt.setReference(VersionConvertor_30_50.convertReference(src.getReference())); - } + tgt.setReference(VersionConvertor_30_50.convertReference(src.getReference())); } if (src.hasDetail()) { - if (src.hasDetail()) { - tgt.setDetail(convertCarePlanActivityDetailComponent(src.getDetail())); - } + tgt.setDetail(convertCarePlanActivityDetailComponent(src.getDetail())); } return tgt; } @@ -201,14 +179,10 @@ public class CarePlan30_50 { tgt.addProgress(VersionConvertor_30_50.convertAnnotation(t)); } if (src.hasReference()) { - if (src.hasReference()) { - tgt.setReference(VersionConvertor_30_50.convertReference(src.getReference())); - } + tgt.setReference(VersionConvertor_30_50.convertReference(src.getReference())); } if (src.hasDetail()) { - if (src.hasDetail()) { - tgt.setDetail(convertCarePlanActivityDetailComponent(src.getDetail())); - } + tgt.setDetail(convertCarePlanActivityDetailComponent(src.getDetail())); } return tgt; } @@ -271,9 +245,8 @@ public class CarePlan30_50 { if (src.hasQuantity()) { tgt.setQuantity(VersionConvertor_30_50.convertSimpleQuantity(src.getQuantity())); } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); return tgt; } @@ -291,9 +264,7 @@ public class CarePlan30_50 { tgt.addExtension(t); } if (src.hasCode()) { - if (src.hasCode()) { - tgt.setCode(VersionConvertor_30_50.convertCodeableConcept(src.getCode())); - } + tgt.setCode(VersionConvertor_30_50.convertCodeableConcept(src.getCode())); } for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getReasonCode()) { tgt.addReason(VersionConvertor_30_50.convertCodeableConceptToCodableReference(t)); @@ -305,56 +276,39 @@ public class CarePlan30_50 { tgt.addGoal(VersionConvertor_30_50.convertReference(t)); } if (src.hasStatus()) { - if (src.hasStatus()) { - tgt.setStatus(convertCarePlanActivityStatus(src.getStatus())); - } + tgt.setStatus(convertCarePlanActivityStatus(src.getStatus())); } if (src.hasStatusReason()) { org.hl7.fhir.r5.model.Coding code = new org.hl7.fhir.r5.model.Coding(); - if (src.hasStatusReason()) { - code.setCode(src.getStatusReason()); + if (src.hasStatusReasonElement()) { + code.setCodeElement((CodeType) VersionConvertor_30_50.convertType(src.getStatusReasonElement())); } org.hl7.fhir.r5.model.CodeableConcept t = new org.hl7.fhir.r5.model.CodeableConcept(code); tgt.setStatusReason(t); } if (src.hasProhibited()) { - if (src.hasProhibited()) { - tgt.setDoNotPerform(src.getProhibited()); - } + tgt.setDoNotPerform(src.getProhibited()); } if (src.hasScheduled()) { - if (src.hasScheduled()) { - tgt.setScheduled(VersionConvertor_30_50.convertType(src.getScheduled())); - } + tgt.setScheduled(VersionConvertor_30_50.convertType(src.getScheduled())); } if (src.hasLocation()) { - if (src.hasLocation()) { - tgt.setLocation(VersionConvertor_30_50.convertReference(src.getLocation())); - } + tgt.setLocation(VersionConvertor_30_50.convertReference(src.getLocation())); } for (org.hl7.fhir.dstu3.model.Reference t : src.getPerformer()) { tgt.addPerformer(VersionConvertor_30_50.convertReference(t)); } if (src.hasProduct()) { - if (src.hasProduct()) { - tgt.setProduct(VersionConvertor_30_50.convertType(src.getProduct())); - } + tgt.setProduct(VersionConvertor_30_50.convertType(src.getProduct())); } if (src.hasDailyAmount()) { - if (src.hasDailyAmount()) { - tgt.setDailyAmount(VersionConvertor_30_50.convertSimpleQuantity(src.getDailyAmount())); - } + tgt.setDailyAmount(VersionConvertor_30_50.convertSimpleQuantity(src.getDailyAmount())); } if (src.hasQuantity()) { - if (src.hasQuantity()) { - tgt.setQuantity(VersionConvertor_30_50.convertSimpleQuantity(src.getQuantity())); - } - } - if (src.hasDescription()) { - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + tgt.setQuantity(VersionConvertor_30_50.convertSimpleQuantity(src.getQuantity())); } + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/CareTeam30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/CareTeam30_50.java index 501d6c5b2..d7a9587d6 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/CareTeam30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/CareTeam30_50.java @@ -3,6 +3,7 @@ package org.hl7.fhir.convertors.conv30_50; import org.hl7.fhir.convertors.VersionConvertor_30_50; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r5.model.CodeableReference; +import java.util.Collections; public class CareTeam30_50 { @@ -19,8 +20,8 @@ public class CareTeam30_50 { if (src.hasCategory()) { for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getCategory()) tgt.addCategory(VersionConvertor_30_50.convertCodeableConcept(t)); } - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getNameElement())); if (src.hasSubject()) tgt.setSubject(VersionConvertor_30_50.convertReference(src.getSubject())); if (src.hasPeriod()) @@ -56,8 +57,8 @@ public class CareTeam30_50 { if (src.hasCategory()) { for (org.hl7.fhir.r5.model.CodeableConcept t : src.getCategory()) tgt.addCategory(VersionConvertor_30_50.convertCodeableConcept(t)); } - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getNameElement())); if (src.hasSubject()) tgt.setSubject(VersionConvertor_30_50.convertReference(src.getSubject())); if (src.hasPeriod()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/ClinicalImpression30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/ClinicalImpression30_50.java index e0cfff415..eab1f0ba9 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/ClinicalImpression30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/ClinicalImpression30_50.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_50; import org.hl7.fhir.convertors.VersionConvertor_30_50; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class ClinicalImpression30_50 { @@ -15,16 +16,16 @@ public class ClinicalImpression30_50 { } if (src.hasStatus()) tgt.setStatus(convertClinicalImpressionStatus(src.getStatus())); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); if (src.hasSubject()) tgt.setSubject(VersionConvertor_30_50.convertReference(src.getSubject())); if (src.hasEncounter()) tgt.setContext(VersionConvertor_30_50.convertReference(src.getEncounter())); if (src.hasEffective()) tgt.setEffective(VersionConvertor_30_50.convertType(src.getEffective())); - if (src.hasDate()) - tgt.setDate(src.getDate()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_30_50.convertType(src.getDateElement())); if (src.hasPerformer()) tgt.setAssessor(VersionConvertor_30_50.convertReference(src.getPerformer())); if (src.hasPrevious()) @@ -35,8 +36,8 @@ public class ClinicalImpression30_50 { if (src.hasProtocol()) { for (org.hl7.fhir.r5.model.UriType t : src.getProtocol()) tgt.addProtocol(t.getValue()); } - if (src.hasSummary()) - tgt.setSummary(src.getSummary()); + if (src.hasSummaryElement()) + tgt.setSummaryElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getSummaryElement())); if (src.hasFinding()) { for (org.hl7.fhir.r5.model.ClinicalImpression.ClinicalImpressionFindingComponent t : src.getFinding()) tgt.addFinding(convertClinicalImpressionFindingComponent(t)); } @@ -62,16 +63,16 @@ public class ClinicalImpression30_50 { } if (src.hasStatus()) tgt.setStatus(convertClinicalImpressionStatus(src.getStatus())); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); if (src.hasSubject()) tgt.setSubject(VersionConvertor_30_50.convertReference(src.getSubject())); if (src.hasContext()) tgt.setEncounter(VersionConvertor_30_50.convertReference(src.getContext())); if (src.hasEffective()) tgt.setEffective(VersionConvertor_30_50.convertType(src.getEffective())); - if (src.hasDate()) - tgt.setDate(src.getDate()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.r5.model.DateTimeType) VersionConvertor_30_50.convertType(src.getDateElement())); if (src.hasAssessor()) tgt.setPerformer(VersionConvertor_30_50.convertReference(src.getAssessor())); if (src.hasPrevious()) @@ -82,8 +83,8 @@ public class ClinicalImpression30_50 { if (src.hasProtocol()) { for (org.hl7.fhir.dstu3.model.UriType t : src.getProtocol()) tgt.addProtocol(t.getValue()); } - if (src.hasSummary()) - tgt.setSummary(src.getSummary()); + if (src.hasSummaryElement()) + tgt.setSummaryElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getSummaryElement())); if (src.hasFinding()) { for (org.hl7.fhir.dstu3.model.ClinicalImpression.ClinicalImpressionFindingComponent t : src.getFinding()) tgt.addFinding(convertClinicalImpressionFindingComponent(t)); } @@ -108,8 +109,8 @@ public class ClinicalImpression30_50 { tgt.setItem(VersionConvertor_30_50.convertType(src.getItem().getConcept())); else if (src.hasItem() && src.getItem().hasReference()) tgt.setItem(VersionConvertor_30_50.convertType(src.getItem().getReference())); - if (src.hasBasis()) - tgt.setBasis(src.getBasis()); + if (src.hasBasisElement()) + tgt.setBasisElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getBasisElement())); return tgt; } @@ -122,8 +123,8 @@ public class ClinicalImpression30_50 { tgt.setItem(VersionConvertor_30_50.convertCodeableConceptToCodableReference(src.getItemCodeableConcept())); if (src.hasItemReference()) tgt.setItem(VersionConvertor_30_50.convertReferenceToCodableReference(src.getItemReference())); - if (src.hasBasis()) - tgt.setBasis(src.getBasis()); + if (src.hasBasisElement()) + tgt.setBasisElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getBasisElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/CodeSystem30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/CodeSystem30_50.java index 6b77acc33..b45479e6d 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/CodeSystem30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/CodeSystem30_50.java @@ -2,6 +2,9 @@ package org.hl7.fhir.convertors.conv30_50; import org.hl7.fhir.convertors.VersionConvertor_30_50; import org.hl7.fhir.exceptions.FHIRException; +import org.hl7.fhir.r5.model.StringType; + +import java.util.Collections; public class CodeSystem30_50 { @@ -10,53 +13,53 @@ public class CodeSystem30_50 { return null; org.hl7.fhir.dstu3.model.CodeSystem tgt = new org.hl7.fhir.dstu3.model.CodeSystem(); VersionConvertor_30_50.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_50.convertType(src.getUrlElement())); if (src.hasIdentifier()) tgt.setIdentifier(VersionConvertor_30_50.convertIdentifier(src.getIdentifierFirstRep())); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getNameElement())); + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getTitleElement())); if (src.hasStatus()) tgt.setStatus(VersionConvertor_30_50.convertPublicationStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_50.convertType(src.getExperimentalElement())); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_30_50.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.r5.model.ContactDetail t : src.getContact()) tgt.addContact(VersionConvertor_30_50.convertContactDetail(t)); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); if (src.hasUseContext()) { for (org.hl7.fhir.r5.model.UsageContext t : src.getUseContext()) tgt.addUseContext(VersionConvertor_30_50.convertUsageContext(t)); } if (src.hasJurisdiction()) { for (org.hl7.fhir.r5.model.CodeableConcept t : src.getJurisdiction()) tgt.addJurisdiction(VersionConvertor_30_50.convertCodeableConcept(t)); } - if (src.hasPurpose()) - tgt.setPurpose(src.getPurpose()); - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); - if (src.hasCaseSensitive()) - tgt.setCaseSensitive(src.getCaseSensitive()); - if (src.hasValueSet()) - tgt.setValueSet(src.getValueSet()); + if (src.hasPurposeElement()) + tgt.setPurposeElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_50.convertType(src.getPurposeElement())); + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_50.convertType(src.getCopyrightElement())); + if (src.hasCaseSensitiveElement()) + tgt.setCaseSensitiveElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_50.convertType(src.getCaseSensitiveElement())); + if (src.hasValueSetElement()) + tgt.setValueSetElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_50.convertType(src.getValueSetElement())); if (src.hasHierarchyMeaning()) tgt.setHierarchyMeaning(convertCodeSystemHierarchyMeaning(src.getHierarchyMeaning())); - if (src.hasCompositional()) - tgt.setCompositional(src.getCompositional()); - if (src.hasVersionNeeded()) - tgt.setVersionNeeded(src.getVersionNeeded()); + if (src.hasCompositionalElement()) + tgt.setCompositionalElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_50.convertType(src.getCompositionalElement())); + if (src.hasVersionNeededElement()) + tgt.setVersionNeededElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_50.convertType(src.getVersionNeededElement())); if (src.hasContent()) tgt.setContent(convertCodeSystemContentMode(src.getContent())); - if (src.hasCount()) - tgt.setCount(src.getCount()); + if (src.hasCountElement()) + tgt.setCountElement((org.hl7.fhir.dstu3.model.UnsignedIntType) VersionConvertor_30_50.convertType(src.getCountElement())); if (src.hasFilter()) { for (org.hl7.fhir.r5.model.CodeSystem.CodeSystemFilterComponent t : src.getFilter()) tgt.addFilter(convertCodeSystemFilterComponent(t)); } @@ -74,53 +77,53 @@ public class CodeSystem30_50 { return null; org.hl7.fhir.r5.model.CodeSystem tgt = new org.hl7.fhir.r5.model.CodeSystem(); VersionConvertor_30_50.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r5.model.UriType) VersionConvertor_30_50.convertType(src.getUrlElement())); if (src.hasIdentifier()) tgt.addIdentifier(VersionConvertor_30_50.convertIdentifier(src.getIdentifier())); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getNameElement())); + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getTitleElement())); if (src.hasStatus()) tgt.setStatus(VersionConvertor_30_50.convertPublicationStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_30_50.convertType(src.getExperimentalElement())); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.r5.model.DateTimeType) VersionConvertor_30_50.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) tgt.addContact(VersionConvertor_30_50.convertContactDetail(t)); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r5.model.MarkdownType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); if (src.hasUseContext()) { for (org.hl7.fhir.dstu3.model.UsageContext t : src.getUseContext()) tgt.addUseContext(VersionConvertor_30_50.convertUsageContext(t)); } if (src.hasJurisdiction()) { for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getJurisdiction()) tgt.addJurisdiction(VersionConvertor_30_50.convertCodeableConcept(t)); } - if (src.hasPurpose()) - tgt.setPurpose(src.getPurpose()); - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); - if (src.hasCaseSensitive()) - tgt.setCaseSensitive(src.getCaseSensitive()); - if (src.hasValueSet()) - tgt.setValueSet(src.getValueSet()); + if (src.hasPurposeElement()) + tgt.setPurposeElement((org.hl7.fhir.r5.model.MarkdownType) VersionConvertor_30_50.convertType(src.getPurposeElement())); + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.r5.model.MarkdownType) VersionConvertor_30_50.convertType(src.getCopyrightElement())); + if (src.hasCaseSensitiveElement()) + tgt.setCaseSensitiveElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_30_50.convertType(src.getCaseSensitiveElement())); + if (src.hasValueSetElement()) + tgt.setValueSetElement((org.hl7.fhir.r5.model.CanonicalType) VersionConvertor_30_50.convertType(src.getValueSetElement())); if (src.hasHierarchyMeaning()) tgt.setHierarchyMeaning(convertCodeSystemHierarchyMeaning(src.getHierarchyMeaning())); - if (src.hasCompositional()) - tgt.setCompositional(src.getCompositional()); - if (src.hasVersionNeeded()) - tgt.setVersionNeeded(src.getVersionNeeded()); + if (src.hasCompositionalElement()) + tgt.setCompositionalElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_30_50.convertType(src.getCompositionalElement())); + if (src.hasVersionNeededElement()) + tgt.setVersionNeededElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_30_50.convertType(src.getVersionNeededElement())); if (src.hasContent()) tgt.setContent(convertCodeSystemContentMode(src.getContent())); - if (src.hasCount()) - tgt.setCount(src.getCount()); + if (src.hasCountElement()) + tgt.setCountElement((org.hl7.fhir.r5.model.UnsignedIntType) VersionConvertor_30_50.convertType(src.getCountElement())); if (src.hasFilter()) { for (org.hl7.fhir.dstu3.model.CodeSystem.CodeSystemFilterComponent t : src.getFilter()) tgt.addFilter(convertCodeSystemFilterComponent(t)); } @@ -172,15 +175,14 @@ public class CodeSystem30_50 { return null; org.hl7.fhir.r5.model.CodeSystem.CodeSystemFilterComponent tgt = new org.hl7.fhir.r5.model.CodeSystem.CodeSystemFilterComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasCode()) - tgt.setCode(src.getCode()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - if (src.hasOperator()) { - for (org.hl7.fhir.dstu3.model.Enumeration t : src.getOperator()) VersionConvertor_30_50.copyElement(t, tgt.addOperatorElement().setValue(VersionConvertor_30_50.convertFilterOperator(t.getValue()))); - } - if (src.hasValue()) - tgt.setValue(src.getValue()); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.r5.model.CodeType) VersionConvertor_30_50.convertType(src.getCodeElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getValueElement())); + if (src.hasValueElement()) + tgt.setValueElement((StringType) VersionConvertor_30_50.convertType(src.getValueElement())); return tgt; } @@ -189,15 +191,14 @@ public class CodeSystem30_50 { return null; org.hl7.fhir.dstu3.model.CodeSystem.CodeSystemFilterComponent tgt = new org.hl7.fhir.dstu3.model.CodeSystem.CodeSystemFilterComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasCode()) - tgt.setCode(src.getCode()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - if (src.hasOperator()) { - for (org.hl7.fhir.r5.model.Enumeration t : src.getOperator()) VersionConvertor_30_50.copyElement(t, tgt.addOperatorElement().setValue(VersionConvertor_30_50.convertFilterOperator(t.getValue()))); - } - if (src.hasValue()) - tgt.setValue(src.getValue()); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_30_50.convertType(src.getCodeElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getValueElement())); + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getValueElement())); return tgt; } @@ -240,12 +241,12 @@ public class CodeSystem30_50 { return null; org.hl7.fhir.dstu3.model.CodeSystem.ConceptDefinitionComponent tgt = new org.hl7.fhir.dstu3.model.CodeSystem.ConceptDefinitionComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasCode()) - tgt.setCode(src.getCode()); - if (src.hasDisplay()) - tgt.setDisplay(src.getDisplay()); - if (src.hasDefinition()) - tgt.setDefinition(src.getDefinition()); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_30_50.convertType(src.getCodeElement())); + if (src.hasDisplayElement()) + tgt.setDisplayElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getDisplayElement())); + if (src.hasDefinitionElement()) + tgt.setDefinitionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getDefinitionElement())); if (src.hasDesignation()) { for (org.hl7.fhir.r5.model.CodeSystem.ConceptDefinitionDesignationComponent t : src.getDesignation()) tgt.addDesignation(convertConceptDefinitionDesignationComponent(t)); } @@ -263,12 +264,12 @@ public class CodeSystem30_50 { return null; org.hl7.fhir.r5.model.CodeSystem.ConceptDefinitionComponent tgt = new org.hl7.fhir.r5.model.CodeSystem.ConceptDefinitionComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasCode()) - tgt.setCode(src.getCode()); - if (src.hasDisplay()) - tgt.setDisplay(src.getDisplay()); - if (src.hasDefinition()) - tgt.setDefinition(src.getDefinition()); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.r5.model.CodeType) VersionConvertor_30_50.convertType(src.getCodeElement())); + if (src.hasDisplayElement()) + tgt.setDisplayElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getDisplayElement())); + if (src.hasDefinitionElement()) + tgt.setDefinitionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getDefinitionElement())); if (src.hasDesignation()) { for (org.hl7.fhir.dstu3.model.CodeSystem.ConceptDefinitionDesignationComponent t : src.getDesignation()) tgt.addDesignation(convertConceptDefinitionDesignationComponent(t)); } @@ -286,12 +287,12 @@ public class CodeSystem30_50 { return null; org.hl7.fhir.dstu3.model.CodeSystem.ConceptDefinitionDesignationComponent tgt = new org.hl7.fhir.dstu3.model.CodeSystem.ConceptDefinitionDesignationComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasLanguage()) - tgt.setLanguage(src.getLanguage()); + if (src.hasLanguageElement()) + tgt.setLanguageElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_30_50.convertType(src.getLanguageElement())); if (src.hasUse()) tgt.setUse(VersionConvertor_30_50.convertCoding(src.getUse())); - if (src.hasValue()) - tgt.setValue(src.getValue()); + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getValueElement())); return tgt; } @@ -300,12 +301,12 @@ public class CodeSystem30_50 { return null; org.hl7.fhir.r5.model.CodeSystem.ConceptDefinitionDesignationComponent tgt = new org.hl7.fhir.r5.model.CodeSystem.ConceptDefinitionDesignationComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasLanguage()) - tgt.setLanguage(src.getLanguage()); + if (src.hasLanguageElement()) + tgt.setLanguageElement((org.hl7.fhir.r5.model.CodeType) VersionConvertor_30_50.convertType(src.getLanguageElement())); if (src.hasUse()) tgt.setUse(VersionConvertor_30_50.convertCoding(src.getUse())); - if (src.hasValue()) - tgt.setValue(src.getValue()); + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getValueElement())); return tgt; } @@ -314,8 +315,8 @@ public class CodeSystem30_50 { return null; org.hl7.fhir.r5.model.CodeSystem.ConceptPropertyComponent tgt = new org.hl7.fhir.r5.model.CodeSystem.ConceptPropertyComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasCode()) - tgt.setCode(src.getCode()); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.r5.model.CodeType) VersionConvertor_30_50.convertType(src.getCodeElement())); if (src.hasValue()) tgt.setValue(VersionConvertor_30_50.convertType(src.getValue())); return tgt; @@ -326,8 +327,8 @@ public class CodeSystem30_50 { return null; org.hl7.fhir.dstu3.model.CodeSystem.ConceptPropertyComponent tgt = new org.hl7.fhir.dstu3.model.CodeSystem.ConceptPropertyComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasCode()) - tgt.setCode(src.getCode()); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_30_50.convertType(src.getCodeElement())); if (src.hasValue()) tgt.setValue(VersionConvertor_30_50.convertType(src.getValue())); return tgt; @@ -338,12 +339,12 @@ public class CodeSystem30_50 { return null; org.hl7.fhir.r5.model.CodeSystem.PropertyComponent tgt = new org.hl7.fhir.r5.model.CodeSystem.PropertyComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasCode()) - tgt.setCode(src.getCode()); - if (src.hasUri()) - tgt.setUri(src.getUri()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.r5.model.CodeType) VersionConvertor_30_50.convertType(src.getCodeElement())); + if (src.hasUriElement()) + tgt.setUriElement((org.hl7.fhir.r5.model.UriType) VersionConvertor_30_50.convertType(src.getUriElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); if (src.hasType()) tgt.setType(convertPropertyType(src.getType())); return tgt; @@ -354,12 +355,12 @@ public class CodeSystem30_50 { return null; org.hl7.fhir.dstu3.model.CodeSystem.PropertyComponent tgt = new org.hl7.fhir.dstu3.model.CodeSystem.PropertyComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasCode()) - tgt.setCode(src.getCode()); - if (src.hasUri()) - tgt.setUri(src.getUri()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_30_50.convertType(src.getCodeElement())); + if (src.hasUriElement()) + tgt.setUriElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_50.convertType(src.getUriElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); if (src.hasType()) tgt.setType(convertPropertyType(src.getType())); return tgt; diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Communication30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Communication30_50.java index 5020b2556..0d2b81652 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Communication30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Communication30_50.java @@ -3,6 +3,7 @@ package org.hl7.fhir.convertors.conv30_50; import org.hl7.fhir.convertors.VersionConvertor_30_50; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r5.model.CodeableReference; +import java.util.Collections; public class Communication30_50 { @@ -43,10 +44,10 @@ public class Communication30_50 { } if (src.hasEncounter()) tgt.setContext(VersionConvertor_30_50.convertReference(src.getEncounter())); - if (src.hasSent()) - tgt.setSent(src.getSent()); - if (src.hasReceived()) - tgt.setReceived(src.getReceived()); + if (src.hasSentElement()) + tgt.setSentElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_30_50.convertType(src.getSentElement())); + if (src.hasReceivedElement()) + tgt.setReceivedElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_30_50.convertType(src.getReceivedElement())); if (src.hasSender()) tgt.setSender(VersionConvertor_30_50.convertReference(src.getSender())); for (CodeableReference t : src.getReason()) if (t.hasConcept()) @@ -98,10 +99,10 @@ public class Communication30_50 { } if (src.hasContext()) tgt.setEncounter(VersionConvertor_30_50.convertReference(src.getContext())); - if (src.hasSent()) - tgt.setSent(src.getSent()); - if (src.hasReceived()) - tgt.setReceived(src.getReceived()); + if (src.hasSentElement()) + tgt.setSentElement((org.hl7.fhir.r5.model.DateTimeType) VersionConvertor_30_50.convertType(src.getSentElement())); + if (src.hasReceivedElement()) + tgt.setReceivedElement((org.hl7.fhir.r5.model.DateTimeType) VersionConvertor_30_50.convertType(src.getReceivedElement())); if (src.hasSender()) tgt.setSender(VersionConvertor_30_50.convertReference(src.getSender())); if (src.hasReasonCode()) { diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/CompartmentDefinition30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/CompartmentDefinition30_50.java index c6b9d9d7b..21816e694 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/CompartmentDefinition30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/CompartmentDefinition30_50.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_50; import org.hl7.fhir.convertors.VersionConvertor_30_50; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class CompartmentDefinition30_50 { @@ -10,27 +11,27 @@ public class CompartmentDefinition30_50 { return null; org.hl7.fhir.r5.model.CompartmentDefinition tgt = new org.hl7.fhir.r5.model.CompartmentDefinition(); VersionConvertor_30_50.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r5.model.UriType) VersionConvertor_30_50.convertType(src.getUrlElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getNameElement())); + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getTitleElement())); if (src.hasStatus()) tgt.setStatus(VersionConvertor_30_50.convertPublicationStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_30_50.convertType(src.getExperimentalElement())); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.r5.model.DateTimeType) VersionConvertor_30_50.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) tgt.addContact(VersionConvertor_30_50.convertContactDetail(t)); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - if (src.hasPurpose()) - tgt.setPurpose(src.getPurpose()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r5.model.MarkdownType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); + if (src.hasPurposeElement()) + tgt.setPurposeElement((org.hl7.fhir.r5.model.MarkdownType) VersionConvertor_30_50.convertType(src.getPurposeElement())); if (src.hasUseContext()) { for (org.hl7.fhir.dstu3.model.UsageContext t : src.getUseContext()) tgt.addUseContext(VersionConvertor_30_50.convertUsageContext(t)); } @@ -39,8 +40,8 @@ public class CompartmentDefinition30_50 { } if (src.hasCode()) tgt.setCode(convertCompartmentType(src.getCode())); - if (src.hasSearch()) - tgt.setSearch(src.getSearch()); + if (src.hasSearchElement()) + tgt.setSearchElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_30_50.convertType(src.getSearchElement())); if (src.hasResource()) { for (org.hl7.fhir.dstu3.model.CompartmentDefinition.CompartmentDefinitionResourceComponent t : src.getResource()) tgt.addResource(convertCompartmentDefinitionResourceComponent(t)); } @@ -52,27 +53,27 @@ public class CompartmentDefinition30_50 { return null; org.hl7.fhir.dstu3.model.CompartmentDefinition tgt = new org.hl7.fhir.dstu3.model.CompartmentDefinition(); VersionConvertor_30_50.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_50.convertType(src.getUrlElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getNameElement())); + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getTitleElement())); if (src.hasStatus()) tgt.setStatus(VersionConvertor_30_50.convertPublicationStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_50.convertType(src.getExperimentalElement())); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_30_50.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.r5.model.ContactDetail t : src.getContact()) tgt.addContact(VersionConvertor_30_50.convertContactDetail(t)); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - if (src.hasPurpose()) - tgt.setPurpose(src.getPurpose()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); + if (src.hasPurposeElement()) + tgt.setPurposeElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_50.convertType(src.getPurposeElement())); if (src.hasUseContext()) { for (org.hl7.fhir.r5.model.UsageContext t : src.getUseContext()) tgt.addUseContext(VersionConvertor_30_50.convertUsageContext(t)); } @@ -81,8 +82,8 @@ public class CompartmentDefinition30_50 { } if (src.hasCode()) tgt.setCode(convertCompartmentType(src.getCode())); - if (src.hasSearch()) - tgt.setSearch(src.getSearch()); + if (src.hasSearchElement()) + tgt.setSearchElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_50.convertType(src.getSearchElement())); if (src.hasResource()) { for (org.hl7.fhir.r5.model.CompartmentDefinition.CompartmentDefinitionResourceComponent t : src.getResource()) tgt.addResource(convertCompartmentDefinitionResourceComponent(t)); } @@ -94,13 +95,13 @@ public class CompartmentDefinition30_50 { return null; org.hl7.fhir.r5.model.CompartmentDefinition.CompartmentDefinitionResourceComponent tgt = new org.hl7.fhir.r5.model.CompartmentDefinition.CompartmentDefinitionResourceComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasCode()) - tgt.setCode(src.getCode()); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.r5.model.CodeType) VersionConvertor_30_50.convertType(src.getCodeElement())); if (src.hasParam()) { for (org.hl7.fhir.dstu3.model.StringType t : src.getParam()) tgt.addParam(t.getValue()); } - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getDocumentationElement())); return tgt; } @@ -109,13 +110,13 @@ public class CompartmentDefinition30_50 { return null; org.hl7.fhir.dstu3.model.CompartmentDefinition.CompartmentDefinitionResourceComponent tgt = new org.hl7.fhir.dstu3.model.CompartmentDefinition.CompartmentDefinitionResourceComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasCode()) - tgt.setCode(src.getCode()); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_30_50.convertType(src.getCodeElement())); if (src.hasParam()) { for (org.hl7.fhir.r5.model.StringType t : src.getParam()) tgt.addParam(t.getValue()); } - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getDocumentationElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Composition30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Composition30_50.java index 2f9549d8d..792eae7b8 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Composition30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Composition30_50.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_50; import org.hl7.fhir.convertors.VersionConvertor_30_50; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Composition30_50 { @@ -22,13 +23,13 @@ public class Composition30_50 { tgt.setSubject(VersionConvertor_30_50.convertReference(src.getSubject())); if (src.hasEncounter()) tgt.setEncounter(VersionConvertor_30_50.convertReference(src.getEncounter())); - if (src.hasDate()) - tgt.setDate(src.getDate()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.r5.model.DateTimeType) VersionConvertor_30_50.convertType(src.getDateElement())); if (src.hasAuthor()) { for (org.hl7.fhir.dstu3.model.Reference t : src.getAuthor()) tgt.addAuthor(VersionConvertor_30_50.convertReference(t)); } - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getTitleElement())); if (src.hasConfidentiality()) tgt.setConfidentiality(convertDocumentConfidentiality(src.getConfidentiality())); if (src.hasAttester()) { @@ -65,13 +66,13 @@ public class Composition30_50 { tgt.setSubject(VersionConvertor_30_50.convertReference(src.getSubject())); if (src.hasEncounter()) tgt.setEncounter(VersionConvertor_30_50.convertReference(src.getEncounter())); - if (src.hasDate()) - tgt.setDate(src.getDate()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_30_50.convertType(src.getDateElement())); if (src.hasAuthor()) { for (org.hl7.fhir.r5.model.Reference t : src.getAuthor()) tgt.addAuthor(VersionConvertor_30_50.convertReference(t)); } - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getTitleElement())); if (src.hasConfidentiality()) tgt.setConfidentiality(convertDocumentConfidentiality(src.getConfidentiality())); if (src.hasAttester()) { @@ -132,8 +133,8 @@ public class Composition30_50 { VersionConvertor_30_50.copyElement(src, tgt); if (src.hasMode()) tgt.setMode(convertCompositionAttestationMode(src.getMode().get(0).getValue())); - if (src.hasTime()) - tgt.setTime(src.getTime()); + if (src.hasTimeElement()) + tgt.setTimeElement((org.hl7.fhir.r5.model.DateTimeType) VersionConvertor_30_50.convertType(src.getTimeElement())); if (src.hasParty()) tgt.setParty(VersionConvertor_30_50.convertReference(src.getParty())); return tgt; @@ -146,8 +147,8 @@ public class Composition30_50 { VersionConvertor_30_50.copyElement(src, tgt); if (src.hasMode()) tgt.addMode(convertCompositionAttestationMode(src.getMode())); - if (src.hasTime()) - tgt.setTime(src.getTime()); + if (src.hasTimeElement()) + tgt.setTimeElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_30_50.convertType(src.getTimeElement())); if (src.hasParty()) tgt.setParty(VersionConvertor_30_50.convertReference(src.getParty())); return tgt; @@ -290,8 +291,8 @@ public class Composition30_50 { return null; org.hl7.fhir.dstu3.model.Composition.SectionComponent tgt = new org.hl7.fhir.dstu3.model.Composition.SectionComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getTitleElement())); if (src.hasCode()) tgt.setCode(VersionConvertor_30_50.convertCodeableConcept(src.getCode())); if (src.hasText()) @@ -316,8 +317,8 @@ public class Composition30_50 { return null; org.hl7.fhir.r5.model.Composition.SectionComponent tgt = new org.hl7.fhir.r5.model.Composition.SectionComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getTitleElement())); if (src.hasCode()) tgt.setCode(VersionConvertor_30_50.convertCodeableConcept(src.getCode())); if (src.hasText()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/ConceptMap30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/ConceptMap30_50.java index a1d2b2b62..0ab9161fe 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/ConceptMap30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/ConceptMap30_50.java @@ -2,6 +2,9 @@ package org.hl7.fhir.convertors.conv30_50; import org.hl7.fhir.convertors.VersionConvertor_30_50; import org.hl7.fhir.exceptions.FHIRException; +import org.hl7.fhir.r5.model.StringType; + +import java.util.Collections; public class ConceptMap30_50 { @@ -10,39 +13,39 @@ public class ConceptMap30_50 { return null; org.hl7.fhir.dstu3.model.ConceptMap tgt = new org.hl7.fhir.dstu3.model.ConceptMap(); VersionConvertor_30_50.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_50.convertType(src.getUrlElement())); if (src.hasIdentifier()) tgt.setIdentifier(VersionConvertor_30_50.convertIdentifier(src.getIdentifierFirstRep())); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getNameElement())); + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getTitleElement())); if (src.hasStatus()) tgt.setStatus(VersionConvertor_30_50.convertPublicationStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_50.convertType(src.getExperimentalElement())); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_30_50.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.r5.model.ContactDetail t : src.getContact()) tgt.addContact(VersionConvertor_30_50.convertContactDetail(t)); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); if (src.hasUseContext()) { for (org.hl7.fhir.r5.model.UsageContext t : src.getUseContext()) tgt.addUseContext(VersionConvertor_30_50.convertUsageContext(t)); } if (src.hasJurisdiction()) { for (org.hl7.fhir.r5.model.CodeableConcept t : src.getJurisdiction()) tgt.addJurisdiction(VersionConvertor_30_50.convertCodeableConcept(t)); } - if (src.hasPurpose()) - tgt.setPurpose(src.getPurpose()); - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); + if (src.hasPurposeElement()) + tgt.setPurposeElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_50.convertType(src.getPurposeElement())); + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_50.convertType(src.getCopyrightElement())); if (src.hasSource()) tgt.setSource(VersionConvertor_30_50.convertType(src.getSource())); if (src.hasTarget()) @@ -58,33 +61,33 @@ public class ConceptMap30_50 { return null; org.hl7.fhir.r5.model.ConceptMap tgt = new org.hl7.fhir.r5.model.ConceptMap(); VersionConvertor_30_50.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r5.model.UriType) VersionConvertor_30_50.convertType(src.getUrlElement())); if (src.hasIdentifier()) tgt.addIdentifier(VersionConvertor_30_50.convertIdentifier(src.getIdentifier())); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getNameElement())); + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getTitleElement())); if (src.hasStatus()) tgt.setStatus(VersionConvertor_30_50.convertPublicationStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_30_50.convertType(src.getExperimentalElement())); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.r5.model.DateTimeType) VersionConvertor_30_50.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getPublisherElement())); for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) tgt.addContact(VersionConvertor_30_50.convertContactDetail(t)); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r5.model.MarkdownType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); for (org.hl7.fhir.dstu3.model.UsageContext t : src.getUseContext()) tgt.addUseContext(VersionConvertor_30_50.convertUsageContext(t)); for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getJurisdiction()) tgt.addJurisdiction(VersionConvertor_30_50.convertCodeableConcept(t)); - if (src.hasPurpose()) - tgt.setPurpose(src.getPurpose()); - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); + if (src.hasPurposeElement()) + tgt.setPurposeElement((org.hl7.fhir.r5.model.MarkdownType) VersionConvertor_30_50.convertType(src.getPurposeElement())); + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.r5.model.MarkdownType) VersionConvertor_30_50.convertType(src.getCopyrightElement())); if (src.hasSource()) { org.hl7.fhir.r5.model.DataType t = VersionConvertor_30_50.convertType(src.getSource()); tgt.setSource(t instanceof org.hl7.fhir.r5.model.Reference ? new org.hl7.fhir.r5.model.CanonicalType(((org.hl7.fhir.r5.model.Reference) t).getReference()) : t); @@ -121,10 +124,10 @@ public class ConceptMap30_50 { return null; org.hl7.fhir.r5.model.ConceptMap.ConceptMapGroupComponent tgt = new org.hl7.fhir.r5.model.ConceptMap.ConceptMapGroupComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasSource()) - tgt.setSource(src.getSource()); - if (src.hasSourceVersion()) - tgt.setSourceVersion(src.getSourceVersion()); + if (src.hasSourceElement()) + tgt.setSourceElement((org.hl7.fhir.r5.model.UriType) VersionConvertor_30_50.convertType(src.getSourceElement())); + if (src.hasSourceVersionElement()) + tgt.setSourceVersionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getSourceVersionElement())); if (src.hasTarget()) tgt.setTarget(src.getTarget()); if (src.hasTargetVersion()) @@ -142,10 +145,10 @@ public class ConceptMap30_50 { return null; org.hl7.fhir.dstu3.model.ConceptMap.ConceptMapGroupComponent tgt = new org.hl7.fhir.dstu3.model.ConceptMap.ConceptMapGroupComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasSource()) - tgt.setSource(src.getSource()); - if (src.hasSourceVersion()) - tgt.setSourceVersion(src.getSourceVersion()); + if (src.hasSourceElement()) + tgt.setSourceElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_50.convertType(src.getSourceElement())); + if (src.hasSourceVersionElement()) + tgt.setSourceVersionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getSourceVersionElement())); if (src.hasTarget()) tgt.setTarget(src.getTarget()); if (src.hasTargetVersion()) @@ -165,12 +168,12 @@ public class ConceptMap30_50 { VersionConvertor_30_50.copyElement(src, tgt); if (src.hasMode()) tgt.setMode(convertConceptMapGroupUnmappedMode(src.getMode())); - if (src.hasCode()) - tgt.setCode(src.getCode()); - if (src.hasDisplay()) - tgt.setDisplay(src.getDisplay()); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.r5.model.CodeType) VersionConvertor_30_50.convertType(src.getCodeElement())); + if (src.hasDisplayElement()) + tgt.setDisplayElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getDisplayElement())); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r5.model.CanonicalType) VersionConvertor_30_50.convertType(src.getUrlElement())); return tgt; } @@ -181,12 +184,12 @@ public class ConceptMap30_50 { VersionConvertor_30_50.copyElement(src, tgt); if (src.hasMode()) tgt.setMode(convertConceptMapGroupUnmappedMode(src.getMode())); - if (src.hasCode()) - tgt.setCode(src.getCode()); - if (src.hasDisplay()) - tgt.setDisplay(src.getDisplay()); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_30_50.convertType(src.getCodeElement())); + if (src.hasDisplayElement()) + tgt.setDisplayElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getDisplayElement())); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_50.convertType(src.getUrlElement())); return tgt; } @@ -254,14 +257,14 @@ public class ConceptMap30_50 { return null; org.hl7.fhir.r5.model.ConceptMap.OtherElementComponent tgt = new org.hl7.fhir.r5.model.ConceptMap.OtherElementComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasProperty()) - tgt.setProperty(src.getProperty()); - if (src.hasSystem()) - tgt.setSystem(src.getSystem()); - if (src.hasCode()) - tgt.setValue(src.getCode()); - if (src.hasDisplay()) - tgt.setDisplay(src.getDisplay()); + if (src.hasPropertyElement()) + tgt.setPropertyElement((org.hl7.fhir.r5.model.UriType) VersionConvertor_30_50.convertType(src.getPropertyElement())); + if (src.hasSystemElement()) + tgt.setSystemElement((org.hl7.fhir.r5.model.CanonicalType) VersionConvertor_30_50.convertType(src.getSystemElement())); + if (src.hasCodeElement()) + tgt.setValueElement((StringType) VersionConvertor_30_50.convertType(src.getCodeElement())); + if (src.hasDisplayElement()) + tgt.setDisplayElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getDisplayElement())); return tgt; } @@ -270,14 +273,14 @@ public class ConceptMap30_50 { return null; org.hl7.fhir.dstu3.model.ConceptMap.OtherElementComponent tgt = new org.hl7.fhir.dstu3.model.ConceptMap.OtherElementComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasProperty()) - tgt.setProperty(src.getProperty()); - if (src.hasSystem()) - tgt.setSystem(src.getSystem()); - if (src.hasValue()) - tgt.setCode(src.getValue()); - if (src.hasDisplay()) - tgt.setDisplay(src.getDisplay()); + if (src.hasPropertyElement()) + tgt.setPropertyElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_50.convertType(src.getPropertyElement())); + if (src.hasSystemElement()) + tgt.setSystemElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_50.convertType(src.getSystemElement())); + if (src.hasValueElement()) + tgt.setCodeElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getValueElement())); + if (src.hasDisplayElement()) + tgt.setDisplayElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getDisplayElement())); return tgt; } @@ -286,10 +289,10 @@ public class ConceptMap30_50 { return null; org.hl7.fhir.dstu3.model.ConceptMap.SourceElementComponent tgt = new org.hl7.fhir.dstu3.model.ConceptMap.SourceElementComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasCode()) - tgt.setCode(src.getCode()); - if (src.hasDisplay()) - tgt.setDisplay(src.getDisplay()); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_30_50.convertType(src.getCodeElement())); + if (src.hasDisplayElement()) + tgt.setDisplayElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getDisplayElement())); if (src.hasNoMap() && src.getNoMap() == true) { tgt.addTarget(new org.hl7.fhir.dstu3.model.ConceptMap.TargetElementComponent().setEquivalence(org.hl7.fhir.dstu3.model.Enumerations.ConceptMapEquivalence.UNMATCHED)); } else { @@ -305,10 +308,10 @@ public class ConceptMap30_50 { return null; org.hl7.fhir.r5.model.ConceptMap.SourceElementComponent tgt = new org.hl7.fhir.r5.model.ConceptMap.SourceElementComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasCode()) - tgt.setCode(src.getCode()); - if (src.hasDisplay()) - tgt.setDisplay(src.getDisplay()); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.r5.model.CodeType) VersionConvertor_30_50.convertType(src.getCodeElement())); + if (src.hasDisplayElement()) + tgt.setDisplayElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getDisplayElement())); for (org.hl7.fhir.dstu3.model.ConceptMap.TargetElementComponent t : src.getTarget()) if (t.getEquivalence() == org.hl7.fhir.dstu3.model.Enumerations.ConceptMapEquivalence.UNMATCHED) { tgt.setNoMap(true); } else { @@ -322,14 +325,14 @@ public class ConceptMap30_50 { return null; org.hl7.fhir.r5.model.ConceptMap.TargetElementComponent tgt = new org.hl7.fhir.r5.model.ConceptMap.TargetElementComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasCode()) - tgt.setCode(src.getCode()); - if (src.hasDisplay()) - tgt.setDisplay(src.getDisplay()); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.r5.model.CodeType) VersionConvertor_30_50.convertType(src.getCodeElement())); + if (src.hasDisplayElement()) + tgt.setDisplayElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getDisplayElement())); if (src.hasEquivalence()) tgt.setRelationship(convertConceptMapRelationship(src.getEquivalence())); - if (src.hasComment()) - tgt.setComment(src.getComment()); + if (src.hasCommentElement()) + tgt.setCommentElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getCommentElement())); if (src.hasDependsOn()) { for (org.hl7.fhir.dstu3.model.ConceptMap.OtherElementComponent t : src.getDependsOn()) tgt.addDependsOn(convertOtherElementComponent(t)); } @@ -344,14 +347,14 @@ public class ConceptMap30_50 { return null; org.hl7.fhir.dstu3.model.ConceptMap.TargetElementComponent tgt = new org.hl7.fhir.dstu3.model.ConceptMap.TargetElementComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasCode()) - tgt.setCode(src.getCode()); - if (src.hasDisplay()) - tgt.setDisplay(src.getDisplay()); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_30_50.convertType(src.getCodeElement())); + if (src.hasDisplayElement()) + tgt.setDisplayElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getDisplayElement())); if (src.hasRelationship()) tgt.setEquivalence(convertConceptMapEquivalence(src.getRelationship())); - if (src.hasComment()) - tgt.setComment(src.getComment()); + if (src.hasCommentElement()) + tgt.setCommentElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getCommentElement())); if (src.hasDependsOn()) { for (org.hl7.fhir.r5.model.ConceptMap.OtherElementComponent t : src.getDependsOn()) tgt.addDependsOn(convertOtherElementComponent(t)); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Condition30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Condition30_50.java index e79ac4d1c..f77e7029c 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Condition30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Condition30_50.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_50; import org.hl7.fhir.convertors.VersionConvertor_30_50; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Condition30_50 { diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Consent30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Consent30_50.java index 8d4bc4a89..f9ec24120 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Consent30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Consent30_50.java @@ -1,6 +1,7 @@ package org.hl7.fhir.convertors.conv30_50; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Consent30_50 { diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/DataElement30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/DataElement30_50.java index f6907ddd2..c5c8f08b5 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/DataElement30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/DataElement30_50.java @@ -2,6 +2,9 @@ package org.hl7.fhir.convertors.conv30_50; import org.hl7.fhir.convertors.VersionConvertor_30_50; import org.hl7.fhir.exceptions.FHIRException; +import org.hl7.fhir.r5.model.*; + +import java.util.Collections; public class DataElement30_50 { @@ -15,20 +18,20 @@ public class DataElement30_50 { if (src.hasIdentifier()) { for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_30_50.convertIdentifier(t)); } - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); + if (src.hasVersionElement()) + tgt.setVersionElement((StringType) VersionConvertor_30_50.convertType(src.getVersionElement())); if (src.hasStatus()) tgt.setStatus(VersionConvertor_30_50.convertPublicationStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((BooleanType) VersionConvertor_30_50.convertType(src.getExperimentalElement())); + if (src.hasDateElement()) + tgt.setDateElement((DateTimeType) VersionConvertor_30_50.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((StringType) VersionConvertor_30_50.convertType(src.getPublisherElement())); + if (src.hasNameElement()) + tgt.setNameElement((StringType) VersionConvertor_30_50.convertType(src.getNameElement())); + if (src.hasTitleElement()) + tgt.setTitleElement((StringType) VersionConvertor_30_50.convertType(src.getTitleElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) tgt.addContact(VersionConvertor_30_50.convertContactDetail(t)); } @@ -38,8 +41,8 @@ public class DataElement30_50 { if (src.hasJurisdiction()) { for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getJurisdiction()) tgt.addJurisdiction(VersionConvertor_30_50.convertCodeableConcept(t)); } - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((MarkdownType) VersionConvertor_30_50.convertType(src.getCopyrightElement())); if (src.hasMapping()) { for (org.hl7.fhir.dstu3.model.DataElement.DataElementMappingComponent t : src.getMapping()) tgt.addMapping(convertDataElementMappingComponent(t)); } @@ -59,14 +62,14 @@ public class DataElement30_50 { return null; org.hl7.fhir.r5.model.StructureDefinition.StructureDefinitionMappingComponent tgt = new org.hl7.fhir.r5.model.StructureDefinition.StructureDefinitionMappingComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasIdentity()) - tgt.setIdentity(src.getIdentity()); - if (src.hasUri()) - tgt.setUri(src.getUri()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasComment()) - tgt.setComment(src.getComment()); + if (src.hasIdentityElement()) + tgt.setIdentityElement((IdType) VersionConvertor_30_50.convertType(src.getIdentityElement())); + if (src.hasUriElement()) + tgt.setUriElement((UriType) VersionConvertor_30_50.convertType(src.getUriElement())); + if (src.hasNameElement()) + tgt.setNameElement((StringType) VersionConvertor_30_50.convertType(src.getNameElement())); + if (src.hasCommentElement()) + tgt.setCommentElement((StringType) VersionConvertor_30_50.convertType(src.getCommentElement())); return tgt; } } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/DetectedIssue30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/DetectedIssue30_50.java index 5175753ec..900f1827c 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/DetectedIssue30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/DetectedIssue30_50.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_50; import org.hl7.fhir.convertors.VersionConvertor_30_50; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class DetectedIssue30_50 { @@ -27,10 +28,10 @@ public class DetectedIssue30_50 { if (src.hasImplicated()) { for (org.hl7.fhir.r5.model.Reference t : src.getImplicated()) tgt.addImplicated(VersionConvertor_30_50.convertReference(t)); } - if (src.hasDetail()) - tgt.setDetail(src.getDetail()); - if (src.hasReference()) - tgt.setReference(src.getReference()); + if (src.hasDetailElement()) + tgt.setDetailElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getDetailElement())); + if (src.hasReferenceElement()) + tgt.setReferenceElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_50.convertType(src.getReferenceElement())); if (src.hasMitigation()) { for (org.hl7.fhir.r5.model.DetectedIssue.DetectedIssueMitigationComponent t : src.getMitigation()) tgt.addMitigation(convertDetectedIssueMitigationComponent(t)); } @@ -59,10 +60,10 @@ public class DetectedIssue30_50 { if (src.hasImplicated()) { for (org.hl7.fhir.dstu3.model.Reference t : src.getImplicated()) tgt.addImplicated(VersionConvertor_30_50.convertReference(t)); } - if (src.hasDetail()) - tgt.setDetail(src.getDetail()); - if (src.hasReference()) - tgt.setReference(src.getReference()); + if (src.hasDetailElement()) + tgt.setDetailElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getDetailElement())); + if (src.hasReferenceElement()) + tgt.setReferenceElement((org.hl7.fhir.r5.model.UriType) VersionConvertor_30_50.convertType(src.getReferenceElement())); if (src.hasMitigation()) { for (org.hl7.fhir.dstu3.model.DetectedIssue.DetectedIssueMitigationComponent t : src.getMitigation()) tgt.addMitigation(convertDetectedIssueMitigationComponent(t)); } @@ -76,8 +77,8 @@ public class DetectedIssue30_50 { VersionConvertor_30_50.copyElement(src, tgt); if (src.hasAction()) tgt.setAction(VersionConvertor_30_50.convertCodeableConcept(src.getAction())); - if (src.hasDate()) - tgt.setDate(src.getDate()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_30_50.convertType(src.getDateElement())); if (src.hasAuthor()) tgt.setAuthor(VersionConvertor_30_50.convertReference(src.getAuthor())); return tgt; @@ -90,8 +91,8 @@ public class DetectedIssue30_50 { VersionConvertor_30_50.copyElement(src, tgt); if (src.hasAction()) tgt.setAction(VersionConvertor_30_50.convertCodeableConcept(src.getAction())); - if (src.hasDate()) - tgt.setDate(src.getDate()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.r5.model.DateTimeType) VersionConvertor_30_50.convertType(src.getDateElement())); if (src.hasAuthor()) tgt.setAuthor(VersionConvertor_30_50.convertReference(src.getAuthor())); return tgt; diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/DeviceUseStatement30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/DeviceUseStatement30_50.java index 5a47e08ac..b7588172d 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/DeviceUseStatement30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/DeviceUseStatement30_50.java @@ -3,6 +3,7 @@ package org.hl7.fhir.convertors.conv30_50; import org.hl7.fhir.convertors.VersionConvertor_30_50; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r5.model.CodeableReference; +import java.util.Collections; public class DeviceUseStatement30_50 { @@ -20,8 +21,8 @@ public class DeviceUseStatement30_50 { tgt.setSubject(VersionConvertor_30_50.convertReference(src.getSubject())); if (src.hasTiming()) tgt.setTiming(VersionConvertor_30_50.convertType(src.getTiming())); - if (src.hasRecordedOn()) - tgt.setRecordedOn(src.getRecordedOn()); + if (src.hasRecordedOnElement()) + tgt.setRecordedOnElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_30_50.convertType(src.getRecordedOnElement())); if (src.hasSource()) tgt.setSource(VersionConvertor_30_50.convertReference(src.getSource())); if (src.hasDevice()) @@ -50,8 +51,8 @@ public class DeviceUseStatement30_50 { tgt.setSubject(VersionConvertor_30_50.convertReference(src.getSubject())); if (src.hasTiming()) tgt.setTiming(VersionConvertor_30_50.convertType(src.getTiming())); - if (src.hasRecordedOn()) - tgt.setRecordedOn(src.getRecordedOn()); + if (src.hasRecordedOnElement()) + tgt.setRecordedOnElement((org.hl7.fhir.r5.model.DateTimeType) VersionConvertor_30_50.convertType(src.getRecordedOnElement())); if (src.hasSource()) tgt.setSource(VersionConvertor_30_50.convertReference(src.getSource())); if (src.hasDevice()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/DiagnosticReport30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/DiagnosticReport30_50.java index d5c7fee8d..691d7c27c 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/DiagnosticReport30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/DiagnosticReport30_50.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_50; import org.hl7.fhir.convertors.VersionConvertor_30_50; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class DiagnosticReport30_50 { @@ -28,8 +29,8 @@ public class DiagnosticReport30_50 { tgt.setEncounter(VersionConvertor_30_50.convertReference(src.getContext())); if (src.hasEffective()) tgt.setEffective(VersionConvertor_30_50.convertType(src.getEffective())); - if (src.hasIssued()) - tgt.setIssued(src.getIssued()); + if (src.hasIssuedElement()) + tgt.setIssuedElement((org.hl7.fhir.r5.model.InstantType) VersionConvertor_30_50.convertType(src.getIssuedElement())); if (src.hasSpecimen()) { for (org.hl7.fhir.dstu3.model.Reference t : src.getSpecimen()) tgt.addSpecimen(VersionConvertor_30_50.convertReference(t)); } @@ -42,8 +43,8 @@ public class DiagnosticReport30_50 { if (src.hasImage()) { for (org.hl7.fhir.dstu3.model.DiagnosticReport.DiagnosticReportImageComponent t : src.getImage()) tgt.addMedia(convertDiagnosticReportImageComponent(t)); } - if (src.hasConclusion()) - tgt.setConclusion(src.getConclusion()); + if (src.hasConclusionElement()) + tgt.setConclusionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getConclusionElement())); if (src.hasCodedDiagnosis()) { for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getCodedDiagnosis()) tgt.addConclusionCode(VersionConvertor_30_50.convertCodeableConcept(t)); } @@ -76,8 +77,8 @@ public class DiagnosticReport30_50 { tgt.setContext(VersionConvertor_30_50.convertReference(src.getEncounter())); if (src.hasEffective()) tgt.setEffective(VersionConvertor_30_50.convertType(src.getEffective())); - if (src.hasIssued()) - tgt.setIssued(src.getIssued()); + if (src.hasIssuedElement()) + tgt.setIssuedElement((org.hl7.fhir.dstu3.model.InstantType) VersionConvertor_30_50.convertType(src.getIssuedElement())); if (src.hasSpecimen()) { for (org.hl7.fhir.r5.model.Reference t : src.getSpecimen()) tgt.addSpecimen(VersionConvertor_30_50.convertReference(t)); } @@ -90,8 +91,8 @@ public class DiagnosticReport30_50 { if (src.hasMedia()) { for (org.hl7.fhir.r5.model.DiagnosticReport.DiagnosticReportMediaComponent t : src.getMedia()) tgt.addImage(convertDiagnosticReportImageComponent(t)); } - if (src.hasConclusion()) - tgt.setConclusion(src.getConclusion()); + if (src.hasConclusionElement()) + tgt.setConclusionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getConclusionElement())); if (src.hasConclusionCode()) { for (org.hl7.fhir.r5.model.CodeableConcept t : src.getConclusionCode()) tgt.addCodedDiagnosis(VersionConvertor_30_50.convertCodeableConcept(t)); } @@ -106,8 +107,8 @@ public class DiagnosticReport30_50 { return null; org.hl7.fhir.dstu3.model.DiagnosticReport.DiagnosticReportImageComponent tgt = new org.hl7.fhir.dstu3.model.DiagnosticReport.DiagnosticReportImageComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasComment()) - tgt.setComment(src.getComment()); + if (src.hasCommentElement()) + tgt.setCommentElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getCommentElement())); if (src.hasLink()) tgt.setLink(VersionConvertor_30_50.convertReference(src.getLink())); return tgt; @@ -118,8 +119,8 @@ public class DiagnosticReport30_50 { return null; org.hl7.fhir.r5.model.DiagnosticReport.DiagnosticReportMediaComponent tgt = new org.hl7.fhir.r5.model.DiagnosticReport.DiagnosticReportMediaComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasComment()) - tgt.setComment(src.getComment()); + if (src.hasCommentElement()) + tgt.setCommentElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getCommentElement())); if (src.hasLink()) tgt.setLink(VersionConvertor_30_50.convertReference(src.getLink())); return tgt; diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/DocumentReference30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/DocumentReference30_50.java index b34f94e56..a2e64be2d 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/DocumentReference30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/DocumentReference30_50.java @@ -1,7 +1,11 @@ package org.hl7.fhir.convertors.conv30_50; import org.hl7.fhir.convertors.VersionConvertor_30_50; +import org.hl7.fhir.dstu3.model.DateTimeType; import org.hl7.fhir.exceptions.FHIRException; +import org.hl7.fhir.r5.model.InstantType; + +import java.util.Collections; public class DocumentReference30_50 { @@ -25,8 +29,8 @@ public class DocumentReference30_50 { tgt.addCategory(VersionConvertor_30_50.convertCodeableConcept(src.getClass_())); if (src.hasSubject()) tgt.setSubject(VersionConvertor_30_50.convertReference(src.getSubject())); - if (src.hasCreated()) - tgt.setDate(src.getCreated()); + if (src.hasCreatedElement()) + tgt.setDateElement((InstantType) VersionConvertor_30_50.convertType(src.getCreatedElement())); if (src.hasAuthenticator()) tgt.setAuthenticator(VersionConvertor_30_50.convertReference(src.getAuthenticator())); if (src.hasCustodian()) @@ -34,8 +38,8 @@ public class DocumentReference30_50 { if (src.hasRelatesTo()) { for (org.hl7.fhir.dstu3.model.DocumentReference.DocumentReferenceRelatesToComponent t : src.getRelatesTo()) tgt.addRelatesTo(convertDocumentReferenceRelatesToComponent(t)); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); if (src.hasSecurityLabel()) { for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getSecurityLabel()) tgt.addSecurityLabel(VersionConvertor_30_50.convertCodeableConcept(t)); } @@ -67,8 +71,8 @@ public class DocumentReference30_50 { tgt.setClass_(VersionConvertor_30_50.convertCodeableConcept(src.getCategoryFirstRep())); if (src.hasSubject()) tgt.setSubject(VersionConvertor_30_50.convertReference(src.getSubject())); - if (src.hasDate()) - tgt.setCreated(src.getDate()); + if (src.hasDateElement()) + tgt.setCreatedElement((DateTimeType) VersionConvertor_30_50.convertType(src.getDateElement())); if (src.hasAuthenticator()) tgt.setAuthenticator(VersionConvertor_30_50.convertReference(src.getAuthenticator())); if (src.hasCustodian()) @@ -76,8 +80,8 @@ public class DocumentReference30_50 { if (src.hasRelatesTo()) { for (org.hl7.fhir.r5.model.DocumentReference.DocumentReferenceRelatesToComponent t : src.getRelatesTo()) tgt.addRelatesTo(convertDocumentReferenceRelatesToComponent(t)); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); if (src.hasSecurityLabel()) { for (org.hl7.fhir.r5.model.CodeableConcept t : src.getSecurityLabel()) tgt.addSecurityLabel(VersionConvertor_30_50.convertCodeableConcept(t)); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Encounter30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Encounter30_50.java index 850ef3133..59d8c64b0 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Encounter30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Encounter30_50.java @@ -3,6 +3,7 @@ package org.hl7.fhir.convertors.conv30_50; import org.hl7.fhir.convertors.VersionConvertor_30_50; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r5.model.CodeableReference; +import java.util.Collections; public class Encounter30_50 { diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Endpoint30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Endpoint30_50.java index fa4568891..f2c888024 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Endpoint30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Endpoint30_50.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_50; import org.hl7.fhir.convertors.VersionConvertor_30_50; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Endpoint30_50 { @@ -17,8 +18,8 @@ public class Endpoint30_50 { tgt.setStatus(convertEndpointStatus(src.getStatus())); if (src.hasConnectionType()) tgt.setConnectionType(VersionConvertor_30_50.convertCoding(src.getConnectionType())); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getNameElement())); if (src.hasManagingOrganization()) tgt.setManagingOrganization(VersionConvertor_30_50.convertReference(src.getManagingOrganization())); if (src.hasContact()) { @@ -32,8 +33,8 @@ public class Endpoint30_50 { if (src.hasPayloadMimeType()) { for (org.hl7.fhir.r5.model.CodeType t : src.getPayloadMimeType()) tgt.addPayloadMimeType(t.getValue()); } - if (src.hasAddress()) - tgt.setAddress(src.getAddress()); + if (src.hasAddressElement()) + tgt.setAddressElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_50.convertType(src.getAddressElement())); if (src.hasHeader()) { for (org.hl7.fhir.r5.model.StringType t : src.getHeader()) tgt.addHeader(t.getValue()); } @@ -52,8 +53,8 @@ public class Endpoint30_50 { tgt.setStatus(convertEndpointStatus(src.getStatus())); if (src.hasConnectionType()) tgt.setConnectionType(VersionConvertor_30_50.convertCoding(src.getConnectionType())); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getNameElement())); if (src.hasManagingOrganization()) tgt.setManagingOrganization(VersionConvertor_30_50.convertReference(src.getManagingOrganization())); if (src.hasContact()) { @@ -67,8 +68,8 @@ public class Endpoint30_50 { if (src.hasPayloadMimeType()) { for (org.hl7.fhir.dstu3.model.CodeType t : src.getPayloadMimeType()) tgt.addPayloadMimeType(t.getValue()); } - if (src.hasAddress()) - tgt.setAddress(src.getAddress()); + if (src.hasAddressElement()) + tgt.setAddressElement((org.hl7.fhir.r5.model.UrlType) VersionConvertor_30_50.convertType(src.getAddressElement())); if (src.hasHeader()) { for (org.hl7.fhir.dstu3.model.StringType t : src.getHeader()) tgt.addHeader(t.getValue()); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/EpisodeOfCare30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/EpisodeOfCare30_50.java index 2d1f88806..6d9f588b5 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/EpisodeOfCare30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/EpisodeOfCare30_50.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_50; import org.hl7.fhir.convertors.VersionConvertor_30_50; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class EpisodeOfCare30_50 { diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/ExpansionProfile30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/ExpansionProfile30_50.java index 580e76673..485e0466f 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/ExpansionProfile30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/ExpansionProfile30_50.java @@ -5,6 +5,7 @@ import org.hl7.fhir.dstu3.model.ExpansionProfile.DesignationIncludeDesignationCo import org.hl7.fhir.dstu3.model.ExpansionProfile.SystemVersionProcessingMode; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r5.model.DataType; +import java.util.Collections; public class ExpansionProfile30_50 { diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/FamilyMemberHistory30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/FamilyMemberHistory30_50.java index eb1c1b2fa..866d0e0a7 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/FamilyMemberHistory30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/FamilyMemberHistory30_50.java @@ -3,6 +3,7 @@ package org.hl7.fhir.convertors.conv30_50; import org.hl7.fhir.convertors.VersionConvertor_30_50; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r5.model.CodeableReference; +import java.util.Collections; public class FamilyMemberHistory30_50 { @@ -57,18 +58,18 @@ public class FamilyMemberHistory30_50 { tgt.setNotDoneReason(VersionConvertor_30_50.convertCodeableConcept(src.getDataAbsentReason())); if (src.hasPatient()) tgt.setPatient(VersionConvertor_30_50.convertReference(src.getPatient())); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_30_50.convertType(src.getDateElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getNameElement())); if (src.hasRelationship()) tgt.setRelationship(VersionConvertor_30_50.convertCodeableConcept(src.getRelationship())); if (src.hasBorn()) tgt.setBorn(VersionConvertor_30_50.convertType(src.getBorn())); if (src.hasAge()) tgt.setAge(VersionConvertor_30_50.convertType(src.getAge())); - if (src.hasEstimatedAge()) - tgt.setEstimatedAge(src.getEstimatedAge()); + if (src.hasEstimatedAgeElement()) + tgt.setEstimatedAgeElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_50.convertType(src.getEstimatedAgeElement())); if (src.hasDeceased()) tgt.setDeceased(VersionConvertor_30_50.convertType(src.getDeceased())); for (CodeableReference t : src.getReason()) if (t.hasConcept()) @@ -101,18 +102,18 @@ public class FamilyMemberHistory30_50 { tgt.setDataAbsentReason(VersionConvertor_30_50.convertCodeableConcept(src.getNotDoneReason())); if (src.hasPatient()) tgt.setPatient(VersionConvertor_30_50.convertReference(src.getPatient())); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.r5.model.DateTimeType) VersionConvertor_30_50.convertType(src.getDateElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getNameElement())); if (src.hasRelationship()) tgt.setRelationship(VersionConvertor_30_50.convertCodeableConcept(src.getRelationship())); if (src.hasBorn()) tgt.setBorn(VersionConvertor_30_50.convertType(src.getBorn())); if (src.hasAge()) tgt.setAge(VersionConvertor_30_50.convertType(src.getAge())); - if (src.hasEstimatedAge()) - tgt.setEstimatedAge(src.getEstimatedAge()); + if (src.hasEstimatedAgeElement()) + tgt.setEstimatedAgeElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_30_50.convertType(src.getEstimatedAgeElement())); if (src.hasDeceased()) tgt.setDeceased(VersionConvertor_30_50.convertType(src.getDeceased())); if (src.hasReasonCode()) { diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Flag30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Flag30_50.java index 88f0e4e9b..9c589eb96 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Flag30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Flag30_50.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_50; import org.hl7.fhir.convertors.VersionConvertor_30_50; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Flag30_50 { diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Goal30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Goal30_50.java index c42b79d52..db2373ac1 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Goal30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Goal30_50.java @@ -3,6 +3,7 @@ package org.hl7.fhir.convertors.conv30_50; import org.hl7.fhir.convertors.VersionConvertor_30_50; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r5.model.CodeableReference; +import java.util.Collections; public class Goal30_50 { @@ -29,10 +30,10 @@ public class Goal30_50 { tgt.setStart(VersionConvertor_30_50.convertType(src.getStart())); if (src.hasTarget()) tgt.setTarget(convertGoalTargetComponent(src.getTargetFirstRep())); - if (src.hasStatusDate()) - tgt.setStatusDate(src.getStatusDate()); - if (src.hasStatusReason()) - tgt.setStatusReason(src.getStatusReason()); + if (src.hasStatusDateElement()) + tgt.setStatusDateElement((org.hl7.fhir.dstu3.model.DateType) VersionConvertor_30_50.convertType(src.getStatusDateElement())); + if (src.hasStatusReasonElement()) + tgt.setStatusReasonElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getStatusReasonElement())); if (src.hasExpressedBy()) tgt.setExpressedBy(VersionConvertor_30_50.convertReference(src.getExpressedBy())); if (src.hasAddresses()) { @@ -71,10 +72,10 @@ public class Goal30_50 { tgt.setStart(VersionConvertor_30_50.convertType(src.getStart())); if (src.hasTarget()) tgt.addTarget(convertGoalTargetComponent(src.getTarget())); - if (src.hasStatusDate()) - tgt.setStatusDate(src.getStatusDate()); - if (src.hasStatusReason()) - tgt.setStatusReason(src.getStatusReason()); + if (src.hasStatusDateElement()) + tgt.setStatusDateElement((org.hl7.fhir.r5.model.DateType) VersionConvertor_30_50.convertType(src.getStatusDateElement())); + if (src.hasStatusReasonElement()) + tgt.setStatusReasonElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getStatusReasonElement())); if (src.hasExpressedBy()) tgt.setExpressedBy(VersionConvertor_30_50.convertReference(src.getExpressedBy())); if (src.hasAddresses()) { diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/GraphDefinition30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/GraphDefinition30_50.java index 156b3b886..bca0fad9b 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/GraphDefinition30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/GraphDefinition30_50.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_50; import org.hl7.fhir.convertors.VersionConvertor_30_50; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class GraphDefinition30_50 { @@ -82,37 +83,37 @@ public class GraphDefinition30_50 { return null; org.hl7.fhir.r5.model.GraphDefinition tgt = new org.hl7.fhir.r5.model.GraphDefinition(); VersionConvertor_30_50.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r5.model.UriType) VersionConvertor_30_50.convertType(src.getUrlElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getNameElement())); if (src.hasStatus()) tgt.setStatus(VersionConvertor_30_50.convertPublicationStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_30_50.convertType(src.getExperimentalElement())); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.r5.model.DateTimeType) VersionConvertor_30_50.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) tgt.addContact(VersionConvertor_30_50.convertContactDetail(t)); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r5.model.MarkdownType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); if (src.hasUseContext()) { for (org.hl7.fhir.dstu3.model.UsageContext t : src.getUseContext()) tgt.addUseContext(VersionConvertor_30_50.convertUsageContext(t)); } if (src.hasJurisdiction()) { for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getJurisdiction()) tgt.addJurisdiction(VersionConvertor_30_50.convertCodeableConcept(t)); } - if (src.hasPurpose()) - tgt.setPurpose(src.getPurpose()); - if (src.hasStart()) - tgt.setStart(src.getStart()); - if (src.hasProfile()) - tgt.setProfile(src.getProfile()); + if (src.hasPurposeElement()) + tgt.setPurposeElement((org.hl7.fhir.r5.model.MarkdownType) VersionConvertor_30_50.convertType(src.getPurposeElement())); + if (src.hasStartElement()) + tgt.setStartElement((org.hl7.fhir.r5.model.CodeType) VersionConvertor_30_50.convertType(src.getStartElement())); + if (src.hasProfileElement()) + tgt.setProfileElement((org.hl7.fhir.r5.model.CanonicalType) VersionConvertor_30_50.convertType(src.getProfileElement())); if (src.hasLink()) { for (org.hl7.fhir.dstu3.model.GraphDefinition.GraphDefinitionLinkComponent t : src.getLink()) tgt.addLink(convertGraphDefinitionLinkComponent(t)); } @@ -124,37 +125,37 @@ public class GraphDefinition30_50 { return null; org.hl7.fhir.dstu3.model.GraphDefinition tgt = new org.hl7.fhir.dstu3.model.GraphDefinition(); VersionConvertor_30_50.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_50.convertType(src.getUrlElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getNameElement())); if (src.hasStatus()) tgt.setStatus(VersionConvertor_30_50.convertPublicationStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_50.convertType(src.getExperimentalElement())); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_30_50.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.r5.model.ContactDetail t : src.getContact()) tgt.addContact(VersionConvertor_30_50.convertContactDetail(t)); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); if (src.hasUseContext()) { for (org.hl7.fhir.r5.model.UsageContext t : src.getUseContext()) tgt.addUseContext(VersionConvertor_30_50.convertUsageContext(t)); } if (src.hasJurisdiction()) { for (org.hl7.fhir.r5.model.CodeableConcept t : src.getJurisdiction()) tgt.addJurisdiction(VersionConvertor_30_50.convertCodeableConcept(t)); } - if (src.hasPurpose()) - tgt.setPurpose(src.getPurpose()); - if (src.hasStart()) - tgt.setStart(src.getStart()); - if (src.hasProfile()) - tgt.setProfile(src.getProfile()); + if (src.hasPurposeElement()) + tgt.setPurposeElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_50.convertType(src.getPurposeElement())); + if (src.hasStartElement()) + tgt.setStartElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_30_50.convertType(src.getStartElement())); + if (src.hasProfileElement()) + tgt.setProfileElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_50.convertType(src.getProfileElement())); if (src.hasLink()) { for (org.hl7.fhir.r5.model.GraphDefinition.GraphDefinitionLinkComponent t : src.getLink()) tgt.addLink(convertGraphDefinitionLinkComponent(t)); } @@ -166,16 +167,16 @@ public class GraphDefinition30_50 { return null; org.hl7.fhir.r5.model.GraphDefinition.GraphDefinitionLinkComponent tgt = new org.hl7.fhir.r5.model.GraphDefinition.GraphDefinitionLinkComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasPath()) - tgt.setPath(src.getPath()); - if (src.hasSliceName()) - tgt.setSliceName(src.getSliceName()); - if (src.hasMin()) - tgt.setMin(src.getMin()); - if (src.hasMax()) - tgt.setMax(src.getMax()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasPathElement()) + tgt.setPathElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getPathElement())); + if (src.hasSliceNameElement()) + tgt.setSliceNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getSliceNameElement())); + if (src.hasMinElement()) + tgt.setMinElement((org.hl7.fhir.r5.model.IntegerType) VersionConvertor_30_50.convertType(src.getMinElement())); + if (src.hasMaxElement()) + tgt.setMaxElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getMaxElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); if (src.hasTarget()) { for (org.hl7.fhir.dstu3.model.GraphDefinition.GraphDefinitionLinkTargetComponent t : src.getTarget()) tgt.addTarget(convertGraphDefinitionLinkTargetComponent(t)); } @@ -187,16 +188,16 @@ public class GraphDefinition30_50 { return null; org.hl7.fhir.dstu3.model.GraphDefinition.GraphDefinitionLinkComponent tgt = new org.hl7.fhir.dstu3.model.GraphDefinition.GraphDefinitionLinkComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasPath()) - tgt.setPath(src.getPath()); - if (src.hasSliceName()) - tgt.setSliceName(src.getSliceName()); - if (src.hasMin()) - tgt.setMin(src.getMin()); - if (src.hasMax()) - tgt.setMax(src.getMax()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasPathElement()) + tgt.setPathElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getPathElement())); + if (src.hasSliceNameElement()) + tgt.setSliceNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getSliceNameElement())); + if (src.hasMinElement()) + tgt.setMinElement((org.hl7.fhir.dstu3.model.IntegerType) VersionConvertor_30_50.convertType(src.getMinElement())); + if (src.hasMaxElement()) + tgt.setMaxElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getMaxElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); if (src.hasTarget()) { for (org.hl7.fhir.r5.model.GraphDefinition.GraphDefinitionLinkTargetComponent t : src.getTarget()) tgt.addTarget(convertGraphDefinitionLinkTargetComponent(t)); } @@ -212,10 +213,10 @@ public class GraphDefinition30_50 { tgt.setCode(convertCompartmentCode(src.getCode())); if (src.hasRule()) tgt.setRule(convertGraphCompartmentRule(src.getRule())); - if (src.hasExpression()) - tgt.setExpression(src.getExpression()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasExpressionElement()) + tgt.setExpressionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getExpressionElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); return tgt; } @@ -228,10 +229,10 @@ public class GraphDefinition30_50 { tgt.setCode(convertCompartmentCode(src.getCode())); if (src.hasRule()) tgt.setRule(convertGraphCompartmentRule(src.getRule())); - if (src.hasExpression()) - tgt.setExpression(src.getExpression()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasExpressionElement()) + tgt.setExpressionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getExpressionElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); return tgt; } @@ -240,10 +241,10 @@ public class GraphDefinition30_50 { return null; org.hl7.fhir.dstu3.model.GraphDefinition.GraphDefinitionLinkTargetComponent tgt = new org.hl7.fhir.dstu3.model.GraphDefinition.GraphDefinitionLinkTargetComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasType()) - tgt.setType(src.getType()); - if (src.hasProfile()) - tgt.setProfile(src.getProfile()); + if (src.hasTypeElement()) + tgt.setTypeElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_30_50.convertType(src.getTypeElement())); + if (src.hasProfileElement()) + tgt.setProfileElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_50.convertType(src.getProfileElement())); if (src.hasCompartment()) { for (org.hl7.fhir.r5.model.GraphDefinition.GraphDefinitionLinkTargetCompartmentComponent t : src.getCompartment()) tgt.addCompartment(convertGraphDefinitionLinkTargetCompartmentComponent(t)); } @@ -258,10 +259,10 @@ public class GraphDefinition30_50 { return null; org.hl7.fhir.r5.model.GraphDefinition.GraphDefinitionLinkTargetComponent tgt = new org.hl7.fhir.r5.model.GraphDefinition.GraphDefinitionLinkTargetComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasType()) - tgt.setType(src.getType()); - if (src.hasProfile()) - tgt.setProfile(src.getProfile()); + if (src.hasTypeElement()) + tgt.setTypeElement((org.hl7.fhir.r5.model.CodeType) VersionConvertor_30_50.convertType(src.getTypeElement())); + if (src.hasProfileElement()) + tgt.setProfileElement((org.hl7.fhir.r5.model.CanonicalType) VersionConvertor_30_50.convertType(src.getProfileElement())); if (src.hasCompartment()) { for (org.hl7.fhir.dstu3.model.GraphDefinition.GraphDefinitionLinkTargetCompartmentComponent t : src.getCompartment()) tgt.addCompartment(convertGraphDefinitionLinkTargetCompartmentComponent(t)); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Group30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Group30_50.java index 2cbc96fbf..74c190efc 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Group30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Group30_50.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_50; import org.hl7.fhir.convertors.VersionConvertor_30_50; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Group30_50 { @@ -13,18 +14,18 @@ public class Group30_50 { if (src.hasIdentifier()) { for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_30_50.convertIdentifier(t)); } - if (src.hasActive()) - tgt.setActive(src.getActive()); + if (src.hasActiveElement()) + tgt.setActiveElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_30_50.convertType(src.getActiveElement())); if (src.hasType()) tgt.setType(convertGroupType(src.getType())); - if (src.hasActual()) - tgt.setActual(src.getActual()); + if (src.hasActualElement()) + tgt.setActualElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_30_50.convertType(src.getActualElement())); if (src.hasCode()) tgt.setCode(VersionConvertor_30_50.convertCodeableConcept(src.getCode())); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasQuantity()) - tgt.setQuantity(src.getQuantity()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getNameElement())); + if (src.hasQuantityElement()) + tgt.setQuantityElement((org.hl7.fhir.r5.model.UnsignedIntType) VersionConvertor_30_50.convertType(src.getQuantityElement())); if (src.hasCharacteristic()) { for (org.hl7.fhir.dstu3.model.Group.GroupCharacteristicComponent t : src.getCharacteristic()) tgt.addCharacteristic(convertGroupCharacteristicComponent(t)); } @@ -42,18 +43,18 @@ public class Group30_50 { if (src.hasIdentifier()) { for (org.hl7.fhir.r5.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_30_50.convertIdentifier(t)); } - if (src.hasActive()) - tgt.setActive(src.getActive()); + if (src.hasActiveElement()) + tgt.setActiveElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_50.convertType(src.getActiveElement())); if (src.hasType()) tgt.setType(convertGroupType(src.getType())); - if (src.hasActual()) - tgt.setActual(src.getActual()); + if (src.hasActualElement()) + tgt.setActualElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_50.convertType(src.getActualElement())); if (src.hasCode()) tgt.setCode(VersionConvertor_30_50.convertCodeableConcept(src.getCode())); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasQuantity()) - tgt.setQuantity(src.getQuantity()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getNameElement())); + if (src.hasQuantityElement()) + tgt.setQuantityElement((org.hl7.fhir.dstu3.model.UnsignedIntType) VersionConvertor_30_50.convertType(src.getQuantityElement())); if (src.hasCharacteristic()) { for (org.hl7.fhir.r5.model.Group.GroupCharacteristicComponent t : src.getCharacteristic()) tgt.addCharacteristic(convertGroupCharacteristicComponent(t)); } @@ -72,8 +73,8 @@ public class Group30_50 { tgt.setCode(VersionConvertor_30_50.convertCodeableConcept(src.getCode())); if (src.hasValue()) tgt.setValue(VersionConvertor_30_50.convertType(src.getValue())); - if (src.hasExclude()) - tgt.setExclude(src.getExclude()); + if (src.hasExcludeElement()) + tgt.setExcludeElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_30_50.convertType(src.getExcludeElement())); if (src.hasPeriod()) tgt.setPeriod(VersionConvertor_30_50.convertPeriod(src.getPeriod())); return tgt; @@ -88,8 +89,8 @@ public class Group30_50 { tgt.setCode(VersionConvertor_30_50.convertCodeableConcept(src.getCode())); if (src.hasValue()) tgt.setValue(VersionConvertor_30_50.convertType(src.getValue())); - if (src.hasExclude()) - tgt.setExclude(src.getExclude()); + if (src.hasExcludeElement()) + tgt.setExcludeElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_50.convertType(src.getExcludeElement())); if (src.hasPeriod()) tgt.setPeriod(VersionConvertor_30_50.convertPeriod(src.getPeriod())); return tgt; @@ -104,8 +105,8 @@ public class Group30_50 { tgt.setEntity(VersionConvertor_30_50.convertReference(src.getEntity())); if (src.hasPeriod()) tgt.setPeriod(VersionConvertor_30_50.convertPeriod(src.getPeriod())); - if (src.hasInactive()) - tgt.setInactive(src.getInactive()); + if (src.hasInactiveElement()) + tgt.setInactiveElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_50.convertType(src.getInactiveElement())); return tgt; } @@ -118,8 +119,8 @@ public class Group30_50 { tgt.setEntity(VersionConvertor_30_50.convertReference(src.getEntity())); if (src.hasPeriod()) tgt.setPeriod(VersionConvertor_30_50.convertPeriod(src.getPeriod())); - if (src.hasInactive()) - tgt.setInactive(src.getInactive()); + if (src.hasInactiveElement()) + tgt.setInactiveElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_30_50.convertType(src.getInactiveElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/HealthcareService30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/HealthcareService30_50.java index 9f80cfde3..4f0d46dfb 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/HealthcareService30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/HealthcareService30_50.java @@ -4,6 +4,7 @@ import org.hl7.fhir.convertors.VersionConvertor_30_50; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r5.model.CodeableConcept; import org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceEligibilityComponent; +import java.util.Collections; public class HealthcareService30_50 { @@ -15,8 +16,8 @@ public class HealthcareService30_50 { if (src.hasIdentifier()) { for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_30_50.convertIdentifier(t)); } - if (src.hasActive()) - tgt.setActive(src.getActive()); + if (src.hasActiveElement()) + tgt.setActiveElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_30_50.convertType(src.getActiveElement())); if (src.hasProvidedBy()) tgt.setProvidedBy(VersionConvertor_30_50.convertReference(src.getProvidedBy())); if (src.hasCategory()) @@ -30,12 +31,12 @@ public class HealthcareService30_50 { if (src.hasLocation()) { for (org.hl7.fhir.dstu3.model.Reference t : src.getLocation()) tgt.addLocation(VersionConvertor_30_50.convertReference(t)); } - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasComment()) - tgt.setComment(src.getComment()); - if (src.hasExtraDetails()) - tgt.setExtraDetails(src.getExtraDetails()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getNameElement())); + if (src.hasCommentElement()) + tgt.setCommentElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getCommentElement())); + if (src.hasExtraDetailsElement()) + tgt.setExtraDetailsElement((org.hl7.fhir.r5.model.MarkdownType) VersionConvertor_30_50.convertType(src.getExtraDetailsElement())); if (src.hasPhoto()) tgt.setPhoto(VersionConvertor_30_50.convertAttachment(src.getPhoto())); if (src.hasTelecom()) { @@ -64,16 +65,16 @@ public class HealthcareService30_50 { if (src.hasReferralMethod()) { for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getReferralMethod()) tgt.addReferralMethod(VersionConvertor_30_50.convertCodeableConcept(t)); } - if (src.hasAppointmentRequired()) - tgt.setAppointmentRequired(src.getAppointmentRequired()); + if (src.hasAppointmentRequiredElement()) + tgt.setAppointmentRequiredElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_30_50.convertType(src.getAppointmentRequiredElement())); if (src.hasAvailableTime()) { for (org.hl7.fhir.dstu3.model.HealthcareService.HealthcareServiceAvailableTimeComponent t : src.getAvailableTime()) tgt.addAvailableTime(convertHealthcareServiceAvailableTimeComponent(t)); } if (src.hasNotAvailable()) { for (org.hl7.fhir.dstu3.model.HealthcareService.HealthcareServiceNotAvailableComponent t : src.getNotAvailable()) tgt.addNotAvailable(convertHealthcareServiceNotAvailableComponent(t)); } - if (src.hasAvailabilityExceptions()) - tgt.setAvailabilityExceptions(src.getAvailabilityExceptions()); + if (src.hasAvailabilityExceptionsElement()) + tgt.setAvailabilityExceptionsElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getAvailabilityExceptionsElement())); if (src.hasEndpoint()) { for (org.hl7.fhir.dstu3.model.Reference t : src.getEndpoint()) tgt.addEndpoint(VersionConvertor_30_50.convertReference(t)); } @@ -88,8 +89,8 @@ public class HealthcareService30_50 { if (src.hasIdentifier()) { for (org.hl7.fhir.r5.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_30_50.convertIdentifier(t)); } - if (src.hasActive()) - tgt.setActive(src.getActive()); + if (src.hasActiveElement()) + tgt.setActiveElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_50.convertType(src.getActiveElement())); if (src.hasProvidedBy()) tgt.setProvidedBy(VersionConvertor_30_50.convertReference(src.getProvidedBy())); if (src.hasCategory()) @@ -103,12 +104,12 @@ public class HealthcareService30_50 { if (src.hasLocation()) { for (org.hl7.fhir.r5.model.Reference t : src.getLocation()) tgt.addLocation(VersionConvertor_30_50.convertReference(t)); } - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasComment()) - tgt.setComment(src.getComment()); - if (src.hasExtraDetails()) - tgt.setExtraDetails(src.getExtraDetails()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getNameElement())); + if (src.hasCommentElement()) + tgt.setCommentElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getCommentElement())); + if (src.hasExtraDetailsElement()) + tgt.setExtraDetailsElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getExtraDetailsElement())); if (src.hasPhoto()) tgt.setPhoto(VersionConvertor_30_50.convertAttachment(src.getPhoto())); if (src.hasTelecom()) { @@ -136,16 +137,16 @@ public class HealthcareService30_50 { if (src.hasReferralMethod()) { for (org.hl7.fhir.r5.model.CodeableConcept t : src.getReferralMethod()) tgt.addReferralMethod(VersionConvertor_30_50.convertCodeableConcept(t)); } - if (src.hasAppointmentRequired()) - tgt.setAppointmentRequired(src.getAppointmentRequired()); + if (src.hasAppointmentRequiredElement()) + tgt.setAppointmentRequiredElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_50.convertType(src.getAppointmentRequiredElement())); if (src.hasAvailableTime()) { for (org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceAvailableTimeComponent t : src.getAvailableTime()) tgt.addAvailableTime(convertHealthcareServiceAvailableTimeComponent(t)); } if (src.hasNotAvailable()) { for (org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceNotAvailableComponent t : src.getNotAvailable()) tgt.addNotAvailable(convertHealthcareServiceNotAvailableComponent(t)); } - if (src.hasAvailabilityExceptions()) - tgt.setAvailabilityExceptions(src.getAvailabilityExceptions()); + if (src.hasAvailabilityExceptionsElement()) + tgt.setAvailabilityExceptionsElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getAvailabilityExceptionsElement())); if (src.hasEndpoint()) { for (org.hl7.fhir.r5.model.Reference t : src.getEndpoint()) tgt.addEndpoint(VersionConvertor_30_50.convertReference(t)); } @@ -160,12 +161,12 @@ public class HealthcareService30_50 { if (src.hasDaysOfWeek()) { for (org.hl7.fhir.dstu3.model.Enumeration t : src.getDaysOfWeek()) VersionConvertor_30_50.copyElement(t, tgt.addDaysOfWeekElement().setValue(VersionConvertor_30_50.convertDaysOfWeek(t.getValue()))); } - if (src.hasAllDay()) - tgt.setAllDay(src.getAllDay()); - if (src.hasAvailableStartTime()) - tgt.setAvailableStartTime(src.getAvailableStartTime()); - if (src.hasAvailableEndTime()) - tgt.setAvailableEndTime(src.getAvailableEndTime()); + if (src.hasAllDayElement()) + tgt.setAllDayElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_30_50.convertType(src.getAllDayElement())); + if (src.hasAvailableStartTimeElement()) + tgt.setAvailableStartTimeElement((org.hl7.fhir.r5.model.TimeType) VersionConvertor_30_50.convertType(src.getAvailableStartTimeElement())); + if (src.hasAvailableEndTimeElement()) + tgt.setAvailableEndTimeElement((org.hl7.fhir.r5.model.TimeType) VersionConvertor_30_50.convertType(src.getAvailableEndTimeElement())); return tgt; } @@ -177,12 +178,12 @@ public class HealthcareService30_50 { if (src.hasDaysOfWeek()) { for (org.hl7.fhir.r5.model.Enumeration t : src.getDaysOfWeek()) VersionConvertor_30_50.copyElement(t, tgt.addDaysOfWeekElement().setValue(VersionConvertor_30_50.convertDaysOfWeek(t.getValue()))); } - if (src.hasAllDay()) - tgt.setAllDay(src.getAllDay()); - if (src.hasAvailableStartTime()) - tgt.setAvailableStartTime(src.getAvailableStartTime()); - if (src.hasAvailableEndTime()) - tgt.setAvailableEndTime(src.getAvailableEndTime()); + if (src.hasAllDayElement()) + tgt.setAllDayElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_50.convertType(src.getAllDayElement())); + if (src.hasAvailableStartTimeElement()) + tgt.setAvailableStartTimeElement((org.hl7.fhir.dstu3.model.TimeType) VersionConvertor_30_50.convertType(src.getAvailableStartTimeElement())); + if (src.hasAvailableEndTimeElement()) + tgt.setAvailableEndTimeElement((org.hl7.fhir.dstu3.model.TimeType) VersionConvertor_30_50.convertType(src.getAvailableEndTimeElement())); return tgt; } @@ -191,8 +192,8 @@ public class HealthcareService30_50 { return null; org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceNotAvailableComponent tgt = new org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceNotAvailableComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); if (src.hasDuring()) tgt.setDuring(VersionConvertor_30_50.convertPeriod(src.getDuring())); return tgt; @@ -203,8 +204,8 @@ public class HealthcareService30_50 { return null; org.hl7.fhir.dstu3.model.HealthcareService.HealthcareServiceNotAvailableComponent tgt = new org.hl7.fhir.dstu3.model.HealthcareService.HealthcareServiceNotAvailableComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); if (src.hasDuring()) tgt.setDuring(VersionConvertor_30_50.convertPeriod(src.getDuring())); return tgt; diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/ImagingStudy30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/ImagingStudy30_50.java index 488aff312..d97e3bc3b 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/ImagingStudy30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/ImagingStudy30_50.java @@ -2,8 +2,10 @@ package org.hl7.fhir.convertors.conv30_50; import org.hl7.fhir.convertors.VersionConvertor_30_50; import org.hl7.fhir.exceptions.FHIRException; +import org.hl7.fhir.r5.model.CodeType; import org.hl7.fhir.r5.model.ImagingStudy.ImagingStudyProcedureComponent; import java.util.List; +import java.util.Collections; public class ImagingStudy30_50 { @@ -63,12 +65,10 @@ public class ImagingStudy30_50 { for (org.hl7.fhir.r5.model.Reference t : src.getEndpoint()) { tgt.addEndpoint(VersionConvertor_30_50.convertReference(t)); } - if (src.hasNumberOfSeries()) { - tgt.setNumberOfSeries(src.getNumberOfSeries()); - } - if (src.hasNumberOfInstances()) { - tgt.setNumberOfInstances(src.getNumberOfInstances()); - } + if (src.hasNumberOfSeriesElement()) + tgt.setNumberOfSeriesElement((org.hl7.fhir.dstu3.model.UnsignedIntType) VersionConvertor_30_50.convertType(src.getNumberOfSeriesElement())); + if (src.hasNumberOfInstancesElement()) + tgt.setNumberOfInstancesElement((org.hl7.fhir.dstu3.model.UnsignedIntType) VersionConvertor_30_50.convertType(src.getNumberOfInstancesElement())); for (ImagingStudyProcedureComponent t : src.getProcedure()) { if (t.hasValueReference()) { tgt.addProcedureReference(VersionConvertor_30_50.convertReference(t.getValueReference())); @@ -82,9 +82,8 @@ public class ImagingStudy30_50 { if (reasonCodes.size() > 1) { } } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); for (org.hl7.fhir.r5.model.ImagingStudy.ImagingStudySeriesComponent t : src.getSeries()) { tgt.addSeries(convertImagingStudySeriesComponent(t)); } @@ -149,12 +148,10 @@ public class ImagingStudy30_50 { for (org.hl7.fhir.dstu3.model.Reference t : src.getEndpoint()) { tgt.addEndpoint(VersionConvertor_30_50.convertReference(t)); } - if (src.hasNumberOfSeries()) { - tgt.setNumberOfSeries(src.getNumberOfSeries()); - } - if (src.hasNumberOfInstances()) { - tgt.setNumberOfInstances(src.getNumberOfInstances()); - } + if (src.hasNumberOfSeriesElement()) + tgt.setNumberOfSeriesElement((org.hl7.fhir.r5.model.UnsignedIntType) VersionConvertor_30_50.convertType(src.getNumberOfSeriesElement())); + if (src.hasNumberOfInstancesElement()) + tgt.setNumberOfInstancesElement((org.hl7.fhir.r5.model.UnsignedIntType) VersionConvertor_30_50.convertType(src.getNumberOfInstancesElement())); List procedureReferences = src.getProcedureReference(); if (procedureReferences.size() > 0) { tgt.addProcedure().setValue(VersionConvertor_30_50.convertReference(procedureReferences.get(0))); @@ -165,9 +162,8 @@ public class ImagingStudy30_50 { if (src.hasReason()) { tgt.addReason(VersionConvertor_30_50.convertCodeableConceptToCodableReference(src.getReason())); } - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); for (org.hl7.fhir.dstu3.model.ImagingStudy.ImagingStudySeriesComponent t : src.getSeries()) { tgt.addSeries(convertImagingStudySeriesComponent(t)); } @@ -179,48 +175,28 @@ public class ImagingStudy30_50 { return null; org.hl7.fhir.dstu3.model.ImagingStudy.ImagingStudySeriesComponent tgt = new org.hl7.fhir.dstu3.model.ImagingStudy.ImagingStudySeriesComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasUid()) { - if (src.hasUid()) { - tgt.setUid(src.getUid()); - } - } - if (src.hasNumber()) { - if (src.hasNumber()) { - tgt.setNumber(src.getNumber()); - } - } + if (src.hasUidElement()) + tgt.setUidElement((org.hl7.fhir.dstu3.model.OidType) VersionConvertor_30_50.convertType(src.getUidElement())); + if (src.hasNumberElement()) + tgt.setNumberElement((org.hl7.fhir.dstu3.model.UnsignedIntType) VersionConvertor_30_50.convertType(src.getNumberElement())); if (src.hasModality()) { - if (src.hasModality()) { - tgt.setModality(VersionConvertor_30_50.convertCoding(src.getModality())); - } - } - if (src.hasDescription()) { - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } - } - if (src.hasNumberOfInstances()) { - if (src.hasNumberOfInstances()) { - tgt.setNumberOfInstances(src.getNumberOfInstances()); - } + tgt.setModality(VersionConvertor_30_50.convertCoding(src.getModality())); } + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); + if (src.hasNumberOfInstancesElement()) + tgt.setNumberOfInstancesElement((org.hl7.fhir.dstu3.model.UnsignedIntType) VersionConvertor_30_50.convertType(src.getNumberOfInstancesElement())); for (org.hl7.fhir.r5.model.Reference t : src.getEndpoint()) { tgt.addEndpoint(VersionConvertor_30_50.convertReference(t)); } if (src.hasBodySite()) { - if (src.hasBodySite()) { - tgt.setBodySite(VersionConvertor_30_50.convertCoding(src.getBodySite())); - } + tgt.setBodySite(VersionConvertor_30_50.convertCoding(src.getBodySite())); } if (src.hasLaterality()) { - if (src.hasLaterality()) { - tgt.setLaterality(VersionConvertor_30_50.convertCoding(src.getLaterality())); - } + tgt.setLaterality(VersionConvertor_30_50.convertCoding(src.getLaterality())); } - if (src.hasStarted()) { - if (src.hasStartedElement()) { - tgt.setStartedElement(VersionConvertor_30_50.convertDateTime(src.getStartedElement())); - } + if (src.hasStartedElement()) { + tgt.setStartedElement(VersionConvertor_30_50.convertDateTime(src.getStartedElement())); } for (org.hl7.fhir.r5.model.ImagingStudy.ImagingStudySeriesInstanceComponent t : src.getInstance()) { tgt.addInstance(convertImagingStudySeriesInstanceComponent(t)); @@ -233,48 +209,28 @@ public class ImagingStudy30_50 { return null; org.hl7.fhir.r5.model.ImagingStudy.ImagingStudySeriesComponent tgt = new org.hl7.fhir.r5.model.ImagingStudy.ImagingStudySeriesComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasUid()) { - if (src.hasUid()) { - tgt.setUid(src.getUid()); - } - } - if (src.hasNumber()) { - if (src.hasNumber()) { - tgt.setNumber(src.getNumber()); - } - } + if (src.hasUidElement()) + tgt.setUidElement((org.hl7.fhir.r5.model.IdType) VersionConvertor_30_50.convertType(src.getUidElement())); + if (src.hasNumberElement()) + tgt.setNumberElement((org.hl7.fhir.r5.model.UnsignedIntType) VersionConvertor_30_50.convertType(src.getNumberElement())); if (src.hasModality()) { - if (src.hasModality()) { - tgt.setModality(VersionConvertor_30_50.convertCoding(src.getModality())); - } - } - if (src.hasDescription()) { - if (src.hasDescription()) { - tgt.setDescription(src.getDescription()); - } - } - if (src.hasNumberOfInstances()) { - if (src.hasNumberOfInstances()) { - tgt.setNumberOfInstances(src.getNumberOfInstances()); - } + tgt.setModality(VersionConvertor_30_50.convertCoding(src.getModality())); } + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); + if (src.hasNumberOfInstancesElement()) + tgt.setNumberOfInstancesElement((org.hl7.fhir.r5.model.UnsignedIntType) VersionConvertor_30_50.convertType(src.getNumberOfInstancesElement())); for (org.hl7.fhir.dstu3.model.Reference t : src.getEndpoint()) { tgt.addEndpoint(VersionConvertor_30_50.convertReference(t)); } if (src.hasBodySite()) { - if (src.hasBodySite()) { - tgt.setBodySite(VersionConvertor_30_50.convertCoding(src.getBodySite())); - } + tgt.setBodySite(VersionConvertor_30_50.convertCoding(src.getBodySite())); } if (src.hasLaterality()) { - if (src.hasLaterality()) { - tgt.setLaterality(VersionConvertor_30_50.convertCoding(src.getLaterality())); - } + tgt.setLaterality(VersionConvertor_30_50.convertCoding(src.getLaterality())); } - if (src.hasStarted()) { - if (src.hasStartedElement()) { - tgt.setStartedElement(VersionConvertor_30_50.convertDateTime(src.getStartedElement())); - } + if (src.hasStartedElement()) { + tgt.setStartedElement(VersionConvertor_30_50.convertDateTime(src.getStartedElement())); } for (org.hl7.fhir.dstu3.model.ImagingStudy.ImagingStudySeriesInstanceComponent t : src.getInstance()) { tgt.addInstance(convertImagingStudySeriesInstanceComponent(t)); @@ -287,19 +243,16 @@ public class ImagingStudy30_50 { return null; org.hl7.fhir.dstu3.model.ImagingStudy.ImagingStudySeriesInstanceComponent tgt = new org.hl7.fhir.dstu3.model.ImagingStudy.ImagingStudySeriesInstanceComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasUid()) { - tgt.setUid(src.getUid()); - } + if (src.hasUidElement()) + tgt.setUidElement((org.hl7.fhir.dstu3.model.OidType) VersionConvertor_30_50.convertType(src.getUidElement())); org.hl7.fhir.r5.model.Coding sop = src.getSopClass(); if (URN_IETF_RFC_3986.equals(sop.getSystem())) { tgt.setSopClass(sop.getCode()); } - if (src.hasNumber()) { - tgt.setNumber(src.getNumber()); - } - if (src.hasTitle()) { - tgt.setTitle(src.getTitle()); - } + if (src.hasNumberElement()) + tgt.setNumberElement((org.hl7.fhir.dstu3.model.UnsignedIntType) VersionConvertor_30_50.convertType(src.getNumberElement())); + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getTitleElement())); return tgt; } @@ -308,29 +261,20 @@ public class ImagingStudy30_50 { return null; org.hl7.fhir.r5.model.ImagingStudy.ImagingStudySeriesInstanceComponent tgt = new org.hl7.fhir.r5.model.ImagingStudy.ImagingStudySeriesInstanceComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasUid()) { - if (src.hasUid()) { - tgt.setUid(src.getUid()); - } - } + if (src.hasUidElement()) + tgt.setUidElement((org.hl7.fhir.r5.model.IdType) VersionConvertor_30_50.convertType(src.getUidElement())); if (src.hasSopClass()) { org.hl7.fhir.r5.model.Coding c = new org.hl7.fhir.r5.model.Coding(); c.setSystem(URN_IETF_RFC_3986); - if (src.hasSopClass()) { - c.setCode(src.getSopClass()); + if (src.hasSopClassElement()) { + c.setCodeElement((CodeType) VersionConvertor_30_50.convertType(src.getSopClassElement())); } tgt.setSopClass(c); } - if (src.hasNumber()) { - if (src.hasNumber()) { - tgt.setNumber(src.getNumber()); - } - } - if (src.hasTitle()) { - if (src.hasTitle()) { - tgt.setTitle(src.getTitle()); - } - } + if (src.hasNumberElement()) + tgt.setNumberElement((org.hl7.fhir.r5.model.UnsignedIntType) VersionConvertor_30_50.convertType(src.getNumberElement())); + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getTitleElement())); return tgt; } } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Immunization30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Immunization30_50.java index 410248d17..2a068090f 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Immunization30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Immunization30_50.java @@ -3,6 +3,7 @@ package org.hl7.fhir.convertors.conv30_50; import org.hl7.fhir.convertors.VersionConvertor_30_50; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r5.model.CodeableReference; +import java.util.Collections; public class Immunization30_50 { @@ -24,18 +25,18 @@ public class Immunization30_50 { tgt.setEncounter(VersionConvertor_30_50.convertReference(src.getEncounter())); if (src.hasDate()) tgt.setOccurrence(VersionConvertor_30_50.convertDateTime(src.getDateElement())); - if (src.hasPrimarySource()) - tgt.setPrimarySource(src.getPrimarySource()); + if (src.hasPrimarySourceElement()) + tgt.setPrimarySourceElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_30_50.convertType(src.getPrimarySourceElement())); if (src.hasReportOrigin()) tgt.setInformationSource(VersionConvertor_30_50.convertCodeableConcept(src.getReportOrigin())); if (src.hasLocation()) tgt.setLocation(VersionConvertor_30_50.convertReference(src.getLocation())); if (src.hasManufacturer()) tgt.setManufacturer(VersionConvertor_30_50.convertReference(src.getManufacturer())); - if (src.hasLotNumber()) - tgt.setLotNumber(src.getLotNumber()); - if (src.hasExpirationDate()) - tgt.setExpirationDate(src.getExpirationDate()); + if (src.hasLotNumberElement()) + tgt.setLotNumberElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getLotNumberElement())); + if (src.hasExpirationDateElement()) + tgt.setExpirationDateElement((org.hl7.fhir.r5.model.DateType) VersionConvertor_30_50.convertType(src.getExpirationDateElement())); if (src.hasSite()) tgt.setSite(VersionConvertor_30_50.convertCodeableConcept(src.getSite())); if (src.hasRoute()) @@ -72,18 +73,18 @@ public class Immunization30_50 { tgt.setEncounter(VersionConvertor_30_50.convertReference(src.getEncounter())); if (src.hasOccurrenceDateTimeType()) tgt.setDateElement(VersionConvertor_30_50.convertDateTime(src.getOccurrenceDateTimeType())); - if (src.hasPrimarySource()) - tgt.setPrimarySource(src.getPrimarySource()); + if (src.hasPrimarySourceElement()) + tgt.setPrimarySourceElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_50.convertType(src.getPrimarySourceElement())); if (src.hasInformationSourceCodeableConcept()) tgt.setReportOrigin(VersionConvertor_30_50.convertCodeableConcept(src.getInformationSourceCodeableConcept())); if (src.hasLocation()) tgt.setLocation(VersionConvertor_30_50.convertReference(src.getLocation())); if (src.hasManufacturer()) tgt.setManufacturer(VersionConvertor_30_50.convertReference(src.getManufacturer())); - if (src.hasLotNumber()) - tgt.setLotNumber(src.getLotNumber()); - if (src.hasExpirationDate()) - tgt.setExpirationDate(src.getExpirationDate()); + if (src.hasLotNumberElement()) + tgt.setLotNumberElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getLotNumberElement())); + if (src.hasExpirationDateElement()) + tgt.setExpirationDateElement((org.hl7.fhir.dstu3.model.DateType) VersionConvertor_30_50.convertType(src.getExpirationDateElement())); if (src.hasSite()) tgt.setSite(VersionConvertor_30_50.convertCodeableConcept(src.getSite())); if (src.hasRoute()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/ImplementationGuide30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/ImplementationGuide30_50.java index 175edaa8d..60c93a9bf 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/ImplementationGuide30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/ImplementationGuide30_50.java @@ -4,7 +4,10 @@ import org.hl7.fhir.convertors.VersionConvertorConstants; import org.hl7.fhir.convertors.VersionConvertor_30_50; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r5.model.Enumeration; +import org.hl7.fhir.r5.model.StringType; + import java.util.List; +import java.util.Collections; public class ImplementationGuide30_50 { @@ -13,33 +16,33 @@ public class ImplementationGuide30_50 { return null; org.hl7.fhir.dstu3.model.ImplementationGuide tgt = new org.hl7.fhir.dstu3.model.ImplementationGuide(); VersionConvertor_30_50.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_50.convertType(src.getUrlElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getNameElement())); if (src.hasStatus()) tgt.setStatus(VersionConvertor_30_50.convertPublicationStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_50.convertType(src.getExperimentalElement())); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_30_50.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.r5.model.ContactDetail t : src.getContact()) tgt.addContact(VersionConvertor_30_50.convertContactDetail(t)); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); if (src.hasUseContext()) { for (org.hl7.fhir.r5.model.UsageContext t : src.getUseContext()) tgt.addUseContext(VersionConvertor_30_50.convertUsageContext(t)); } if (src.hasJurisdiction()) { for (org.hl7.fhir.r5.model.CodeableConcept t : src.getJurisdiction()) tgt.addJurisdiction(VersionConvertor_30_50.convertCodeableConcept(t)); } - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_50.convertType(src.getCopyrightElement())); if (src.hasFhirVersion()) for (Enumeration v : src.getFhirVersion()) { tgt.setFhirVersion(v.asStringValue()); @@ -67,33 +70,33 @@ public class ImplementationGuide30_50 { return null; org.hl7.fhir.r5.model.ImplementationGuide tgt = new org.hl7.fhir.r5.model.ImplementationGuide(); VersionConvertor_30_50.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r5.model.UriType) VersionConvertor_30_50.convertType(src.getUrlElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getNameElement())); if (src.hasStatus()) tgt.setStatus(VersionConvertor_30_50.convertPublicationStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_30_50.convertType(src.getExperimentalElement())); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.r5.model.DateTimeType) VersionConvertor_30_50.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) tgt.addContact(VersionConvertor_30_50.convertContactDetail(t)); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r5.model.MarkdownType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); if (src.hasUseContext()) { for (org.hl7.fhir.dstu3.model.UsageContext t : src.getUseContext()) tgt.addUseContext(VersionConvertor_30_50.convertUsageContext(t)); } if (src.hasJurisdiction()) { for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getJurisdiction()) tgt.addJurisdiction(VersionConvertor_30_50.convertCodeableConcept(t)); } - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.r5.model.MarkdownType) VersionConvertor_30_50.convertType(src.getCopyrightElement())); if (src.hasFhirVersion()) tgt.addFhirVersion(org.hl7.fhir.r5.model.Enumerations.FHIRVersion.fromCode(src.getFhirVersion())); if (src.hasDependency()) { @@ -116,8 +119,8 @@ public class ImplementationGuide30_50 { org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuideDependencyComponent tgt = new org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuideDependencyComponent(); VersionConvertor_30_50.copyElement(src, tgt); tgt.setType(org.hl7.fhir.dstu3.model.ImplementationGuide.GuideDependencyType.REFERENCE); - if (src.hasUri()) - tgt.setUri(src.getUri()); + if (src.hasUriElement()) + tgt.setUriElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_50.convertType(src.getUriElement())); if (src.hasPackageId()) tgt.addExtension(new org.hl7.fhir.dstu3.model.Extension(VersionConvertorConstants.IG_DEPENDSON_PACKAGE_EXTENSION, new org.hl7.fhir.dstu3.model.IdType(src.getPackageId()))); if (src.hasVersion()) @@ -130,8 +133,8 @@ public class ImplementationGuide30_50 { return null; org.hl7.fhir.r5.model.ImplementationGuide.ImplementationGuideDependsOnComponent tgt = new org.hl7.fhir.r5.model.ImplementationGuide.ImplementationGuideDependsOnComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasUri()) - tgt.setUri(src.getUri()); + if (src.hasUriElement()) + tgt.setUriElement((org.hl7.fhir.r5.model.CanonicalType) VersionConvertor_30_50.convertType(src.getUriElement())); if (org.hl7.fhir.dstu3.utils.ToolingExtensions.hasExtension(src, VersionConvertorConstants.IG_DEPENDSON_PACKAGE_EXTENSION)) { tgt.setPackageId(org.hl7.fhir.dstu3.utils.ToolingExtensions.readStringExtension(src, VersionConvertorConstants.IG_DEPENDSON_PACKAGE_EXTENSION)); } @@ -146,8 +149,8 @@ public class ImplementationGuide30_50 { return null; org.hl7.fhir.r5.model.ImplementationGuide.ImplementationGuideGlobalComponent tgt = new org.hl7.fhir.r5.model.ImplementationGuide.ImplementationGuideGlobalComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasType()) - tgt.setType(src.getType()); + if (src.hasTypeElement()) + tgt.setTypeElement((org.hl7.fhir.r5.model.CodeType) VersionConvertor_30_50.convertType(src.getTypeElement())); if (src.hasProfile()) tgt.setProfileElement(VersionConvertor_30_50.convertReferenceToCanonical(src.getProfile())); return tgt; @@ -158,8 +161,8 @@ public class ImplementationGuide30_50 { return null; org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuideGlobalComponent tgt = new org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuideGlobalComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasType()) - tgt.setType(src.getType()); + if (src.hasTypeElement()) + tgt.setTypeElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_30_50.convertType(src.getTypeElement())); if (src.hasProfile()) tgt.setProfile(VersionConvertor_30_50.convertCanonicalToReference(src.getProfileElement())); return tgt; @@ -173,10 +176,10 @@ public class ImplementationGuide30_50 { if (src.hasId()) { tgt.setId(src.getId()); } - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getNameElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); return tgt; } @@ -186,10 +189,10 @@ public class ImplementationGuide30_50 { org.hl7.fhir.r5.model.ImplementationGuide.ImplementationGuideDefinitionGroupingComponent tgt = new org.hl7.fhir.r5.model.ImplementationGuide.ImplementationGuideDefinitionGroupingComponent(); tgt.setId("p" + (context.getGrouping().size() + 1)); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasNameElement()) + tgt.setNameElement((StringType) VersionConvertor_30_50.convertType(src.getNameElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((StringType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); for (org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuidePackageResourceComponent t : src.getResource()) { org.hl7.fhir.r5.model.ImplementationGuide.ImplementationGuideDefinitionResourceComponent tn = convertImplementationGuidePackageResourceComponent(t); tn.setGroupingId(tgt.getId()); @@ -212,10 +215,10 @@ public class ImplementationGuide30_50 { tgt.setExample(src.getExampleBooleanType().getValue()); else tgt.setExample(false); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getNameElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); if (src.hasReference()) tgt.setSource(VersionConvertor_30_50.convertReference(src.getReference())); return tgt; @@ -231,10 +234,10 @@ public class ImplementationGuide30_50 { tgt.setExample(t instanceof org.hl7.fhir.r5.model.Reference ? new org.hl7.fhir.r5.model.CanonicalType(((org.hl7.fhir.r5.model.Reference) t).getReference()) : t); } else if (src.hasExample()) tgt.setExample(new org.hl7.fhir.r5.model.BooleanType(src.getExample())); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getNameElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); if (src.hasSourceReference()) tgt.setReference(VersionConvertor_30_50.convertReference(src.getSourceReference())); else if (src.hasSourceUriType()) @@ -249,8 +252,8 @@ public class ImplementationGuide30_50 { VersionConvertor_30_50.copyElement(src, tgt); if (src.hasNameUrlType()) tgt.setSource(src.getNameUrlType().getValue()); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getTitleElement())); if (src.hasGeneration()) tgt.setKind(convertPageGeneration(src.getGeneration())); if (src.hasPage()) { @@ -266,8 +269,8 @@ public class ImplementationGuide30_50 { VersionConvertor_30_50.copyElement(src, tgt); if (src.hasSource()) tgt.setName(convertUriToUrl(src.getSourceElement())); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getTitleElement())); if (src.hasKind()) tgt.setGeneration(convertPageGeneration(src.getKind())); if (src.hasPage()) { diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Library30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Library30_50.java index 24bd8c272..72d76c90a 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Library30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Library30_50.java @@ -4,6 +4,7 @@ import org.hl7.fhir.convertors.VersionConvertor_30_50; import org.hl7.fhir.dstu3.model.ContactDetail; import org.hl7.fhir.dstu3.model.Contributor.ContributorType; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Library30_50 { @@ -12,48 +13,48 @@ public class Library30_50 { return null; org.hl7.fhir.dstu3.model.Library tgt = new org.hl7.fhir.dstu3.model.Library(); VersionConvertor_30_50.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_50.convertType(src.getUrlElement())); if (src.hasIdentifier()) { for (org.hl7.fhir.r5.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_30_50.convertIdentifier(t)); } - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getNameElement())); + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getTitleElement())); if (src.hasStatus()) tgt.setStatus(VersionConvertor_30_50.convertPublicationStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_50.convertType(src.getExperimentalElement())); if (src.hasType()) tgt.setType(VersionConvertor_30_50.convertCodeableConcept(src.getType())); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_30_50.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.r5.model.ContactDetail t : src.getContact()) tgt.addContact(VersionConvertor_30_50.convertContactDetail(t)); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); if (src.hasUseContext()) { for (org.hl7.fhir.r5.model.UsageContext t : src.getUseContext()) tgt.addUseContext(VersionConvertor_30_50.convertUsageContext(t)); } if (src.hasJurisdiction()) { for (org.hl7.fhir.r5.model.CodeableConcept t : src.getJurisdiction()) tgt.addJurisdiction(VersionConvertor_30_50.convertCodeableConcept(t)); } - if (src.hasPurpose()) - tgt.setPurpose(src.getPurpose()); - if (src.hasUsage()) - tgt.setUsage(src.getUsage()); - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); - if (src.hasApprovalDate()) - tgt.setApprovalDate(src.getApprovalDate()); - if (src.hasLastReviewDate()) - tgt.setLastReviewDate(src.getLastReviewDate()); + if (src.hasPurposeElement()) + tgt.setPurposeElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_50.convertType(src.getPurposeElement())); + if (src.hasUsageElement()) + tgt.setUsageElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getUsageElement())); + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_50.convertType(src.getCopyrightElement())); + if (src.hasApprovalDateElement()) + tgt.setApprovalDateElement((org.hl7.fhir.dstu3.model.DateType) VersionConvertor_30_50.convertType(src.getApprovalDateElement())); + if (src.hasLastReviewDateElement()) + tgt.setLastReviewDateElement((org.hl7.fhir.dstu3.model.DateType) VersionConvertor_30_50.convertType(src.getLastReviewDateElement())); if (src.hasEffectivePeriod()) tgt.setEffectivePeriod(VersionConvertor_30_50.convertPeriod(src.getEffectivePeriod())); if (src.hasTopic()) { @@ -103,48 +104,48 @@ public class Library30_50 { return null; org.hl7.fhir.r5.model.Library tgt = new org.hl7.fhir.r5.model.Library(); VersionConvertor_30_50.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r5.model.UriType) VersionConvertor_30_50.convertType(src.getUrlElement())); if (src.hasIdentifier()) { for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_30_50.convertIdentifier(t)); } - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getNameElement())); + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getTitleElement())); if (src.hasStatus()) tgt.setStatus(VersionConvertor_30_50.convertPublicationStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_30_50.convertType(src.getExperimentalElement())); if (src.hasType()) tgt.setType(VersionConvertor_30_50.convertCodeableConcept(src.getType())); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.r5.model.DateTimeType) VersionConvertor_30_50.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) tgt.addContact(VersionConvertor_30_50.convertContactDetail(t)); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r5.model.MarkdownType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); if (src.hasUseContext()) { for (org.hl7.fhir.dstu3.model.UsageContext t : src.getUseContext()) tgt.addUseContext(VersionConvertor_30_50.convertUsageContext(t)); } if (src.hasJurisdiction()) { for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getJurisdiction()) tgt.addJurisdiction(VersionConvertor_30_50.convertCodeableConcept(t)); } - if (src.hasPurpose()) - tgt.setPurpose(src.getPurpose()); - if (src.hasUsage()) - tgt.setUsage(src.getUsage()); - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); - if (src.hasApprovalDate()) - tgt.setApprovalDate(src.getApprovalDate()); - if (src.hasLastReviewDate()) - tgt.setLastReviewDate(src.getLastReviewDate()); + if (src.hasPurposeElement()) + tgt.setPurposeElement((org.hl7.fhir.r5.model.MarkdownType) VersionConvertor_30_50.convertType(src.getPurposeElement())); + if (src.hasUsageElement()) + tgt.setUsageElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getUsageElement())); + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.r5.model.MarkdownType) VersionConvertor_30_50.convertType(src.getCopyrightElement())); + if (src.hasApprovalDateElement()) + tgt.setApprovalDateElement((org.hl7.fhir.r5.model.DateType) VersionConvertor_30_50.convertType(src.getApprovalDateElement())); + if (src.hasLastReviewDateElement()) + tgt.setLastReviewDateElement((org.hl7.fhir.r5.model.DateType) VersionConvertor_30_50.convertType(src.getLastReviewDateElement())); if (src.hasEffectivePeriod()) tgt.setEffectivePeriod(VersionConvertor_30_50.convertPeriod(src.getEffectivePeriod())); for (org.hl7.fhir.dstu3.model.Contributor t : src.getContributor()) { diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Linkage30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Linkage30_50.java index dfc6fb9f6..ad54cb2e0 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Linkage30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Linkage30_50.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_50; import org.hl7.fhir.convertors.VersionConvertor_30_50; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Linkage30_50 { @@ -10,8 +11,8 @@ public class Linkage30_50 { return null; org.hl7.fhir.r5.model.Linkage tgt = new org.hl7.fhir.r5.model.Linkage(); VersionConvertor_30_50.copyDomainResource(src, tgt); - if (src.hasActive()) - tgt.setActive(src.getActive()); + if (src.hasActiveElement()) + tgt.setActiveElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_30_50.convertType(src.getActiveElement())); if (src.hasAuthor()) tgt.setAuthor(VersionConvertor_30_50.convertReference(src.getAuthor())); if (src.hasItem()) { @@ -25,8 +26,8 @@ public class Linkage30_50 { return null; org.hl7.fhir.dstu3.model.Linkage tgt = new org.hl7.fhir.dstu3.model.Linkage(); VersionConvertor_30_50.copyDomainResource(src, tgt); - if (src.hasActive()) - tgt.setActive(src.getActive()); + if (src.hasActiveElement()) + tgt.setActiveElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_50.convertType(src.getActiveElement())); if (src.hasAuthor()) tgt.setAuthor(VersionConvertor_30_50.convertReference(src.getAuthor())); if (src.hasItem()) { diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/List30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/List30_50.java index f3eb43754..d42857b5e 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/List30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/List30_50.java @@ -2,6 +2,11 @@ package org.hl7.fhir.convertors.conv30_50; import org.hl7.fhir.convertors.VersionConvertor_30_50; import org.hl7.fhir.exceptions.FHIRException; +import org.hl7.fhir.r5.model.BooleanType; +import org.hl7.fhir.r5.model.DateTimeType; +import org.hl7.fhir.r5.model.StringType; + +import java.util.Collections; public class List30_50 { @@ -17,16 +22,16 @@ public class List30_50 { tgt.setStatus(convertListStatus(src.getStatus())); if (src.hasMode()) tgt.setMode(convertListMode(src.getMode())); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); + if (src.hasTitleElement()) + tgt.setTitleElement((StringType) VersionConvertor_30_50.convertType(src.getTitleElement())); if (src.hasCode()) tgt.setCode(VersionConvertor_30_50.convertCodeableConcept(src.getCode())); if (src.hasSubject()) tgt.setSubject(VersionConvertor_30_50.convertReference(src.getSubject())); if (src.hasEncounter()) tgt.setEncounter(VersionConvertor_30_50.convertReference(src.getEncounter())); - if (src.hasDate()) - tgt.setDate(src.getDate()); + if (src.hasDateElement()) + tgt.setDateElement((DateTimeType) VersionConvertor_30_50.convertType(src.getDateElement())); if (src.hasSource()) tgt.setSource(VersionConvertor_30_50.convertReference(src.getSource())); if (src.hasOrderedBy()) @@ -54,16 +59,16 @@ public class List30_50 { tgt.setStatus(convertListStatus(src.getStatus())); if (src.hasMode()) tgt.setMode(convertListMode(src.getMode())); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getTitleElement())); if (src.hasCode()) tgt.setCode(VersionConvertor_30_50.convertCodeableConcept(src.getCode())); if (src.hasSubject()) tgt.setSubject(VersionConvertor_30_50.convertReference(src.getSubject())); if (src.hasEncounter()) tgt.setEncounter(VersionConvertor_30_50.convertReference(src.getEncounter())); - if (src.hasDate()) - tgt.setDate(src.getDate()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_30_50.convertType(src.getDateElement())); if (src.hasSource()) tgt.setSource(VersionConvertor_30_50.convertReference(src.getSource())); if (src.hasOrderedBy()) @@ -86,10 +91,10 @@ public class List30_50 { VersionConvertor_30_50.copyElement(src, tgt); if (src.hasFlag()) tgt.setFlag(VersionConvertor_30_50.convertCodeableConcept(src.getFlag())); - if (src.hasDeleted()) - tgt.setDeleted(src.getDeleted()); - if (src.hasDate()) - tgt.setDate(src.getDate()); + if (src.hasDeletedElement()) + tgt.setDeletedElement((BooleanType) VersionConvertor_30_50.convertType(src.getDeletedElement())); + if (src.hasDateElement()) + tgt.setDateElement((DateTimeType) VersionConvertor_30_50.convertType(src.getDateElement())); if (src.hasItem()) tgt.setItem(VersionConvertor_30_50.convertReference(src.getItem())); return tgt; @@ -102,10 +107,10 @@ public class List30_50 { VersionConvertor_30_50.copyElement(src, tgt); if (src.hasFlag()) tgt.setFlag(VersionConvertor_30_50.convertCodeableConcept(src.getFlag())); - if (src.hasDeleted()) - tgt.setDeleted(src.getDeleted()); - if (src.hasDate()) - tgt.setDate(src.getDate()); + if (src.hasDeletedElement()) + tgt.setDeletedElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_50.convertType(src.getDeletedElement())); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_30_50.convertType(src.getDateElement())); if (src.hasItem()) tgt.setItem(VersionConvertor_30_50.convertReference(src.getItem())); return tgt; diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Location30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Location30_50.java index f92e526e9..e4491e245 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Location30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Location30_50.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_50; import org.hl7.fhir.convertors.VersionConvertor_30_50; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Location30_50 { @@ -17,13 +18,13 @@ public class Location30_50 { tgt.setStatus(convertLocationStatus(src.getStatus())); if (src.hasOperationalStatus()) tgt.setOperationalStatus(VersionConvertor_30_50.convertCoding(src.getOperationalStatus())); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getNameElement())); if (src.hasAlias()) { for (org.hl7.fhir.dstu3.model.StringType t : src.getAlias()) tgt.addAlias(t.getValue()); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); if (src.hasMode()) tgt.setMode(convertLocationMode(src.getMode())); if (src.hasType()) @@ -59,13 +60,13 @@ public class Location30_50 { tgt.setStatus(convertLocationStatus(src.getStatus())); if (src.hasOperationalStatus()) tgt.setOperationalStatus(VersionConvertor_30_50.convertCoding(src.getOperationalStatus())); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getNameElement())); if (src.hasAlias()) { for (org.hl7.fhir.r5.model.StringType t : src.getAlias()) tgt.addAlias(t.getValue()); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); if (src.hasMode()) tgt.setMode(convertLocationMode(src.getMode())); if (src.hasType()) @@ -120,12 +121,12 @@ public class Location30_50 { return null; org.hl7.fhir.dstu3.model.Location.LocationPositionComponent tgt = new org.hl7.fhir.dstu3.model.Location.LocationPositionComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasLongitude()) - tgt.setLongitude(src.getLongitude()); - if (src.hasLatitude()) - tgt.setLatitude(src.getLatitude()); - if (src.hasAltitude()) - tgt.setAltitude(src.getAltitude()); + if (src.hasLongitudeElement()) + tgt.setLongitudeElement((org.hl7.fhir.dstu3.model.DecimalType) VersionConvertor_30_50.convertType(src.getLongitudeElement())); + if (src.hasLatitudeElement()) + tgt.setLatitudeElement((org.hl7.fhir.dstu3.model.DecimalType) VersionConvertor_30_50.convertType(src.getLatitudeElement())); + if (src.hasAltitudeElement()) + tgt.setAltitudeElement((org.hl7.fhir.dstu3.model.DecimalType) VersionConvertor_30_50.convertType(src.getAltitudeElement())); return tgt; } @@ -134,12 +135,12 @@ public class Location30_50 { return null; org.hl7.fhir.r5.model.Location.LocationPositionComponent tgt = new org.hl7.fhir.r5.model.Location.LocationPositionComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasLongitude()) - tgt.setLongitude(src.getLongitude()); - if (src.hasLatitude()) - tgt.setLatitude(src.getLatitude()); - if (src.hasAltitude()) - tgt.setAltitude(src.getAltitude()); + if (src.hasLongitudeElement()) + tgt.setLongitudeElement((org.hl7.fhir.r5.model.DecimalType) VersionConvertor_30_50.convertType(src.getLongitudeElement())); + if (src.hasLatitudeElement()) + tgt.setLatitudeElement((org.hl7.fhir.r5.model.DecimalType) VersionConvertor_30_50.convertType(src.getLatitudeElement())); + if (src.hasAltitudeElement()) + tgt.setAltitudeElement((org.hl7.fhir.r5.model.DecimalType) VersionConvertor_30_50.convertType(src.getAltitudeElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Measure30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Measure30_50.java index b698d9620..913d13740 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Measure30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Measure30_50.java @@ -5,6 +5,7 @@ import org.hl7.fhir.dstu3.model.ContactDetail; import org.hl7.fhir.dstu3.model.Contributor; import org.hl7.fhir.dstu3.model.Contributor.ContributorType; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Measure30_50 { @@ -13,50 +14,49 @@ public class Measure30_50 { return null; org.hl7.fhir.r5.model.Measure tgt = new org.hl7.fhir.r5.model.Measure(); VersionConvertor_30_50.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r5.model.UriType) VersionConvertor_30_50.convertType(src.getUrlElement())); if (src.hasIdentifier()) { for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_30_50.convertIdentifier(t)); } - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getNameElement())); + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getTitleElement())); if (src.hasStatus()) tgt.setStatus(VersionConvertor_30_50.convertPublicationStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasType()) - if (src.hasType()) { - for (org.hl7.fhir.dstu3.model.CodeableConcept concept : src.getType()) tgt.addType(VersionConvertor_30_50.convertCodeableConcept(concept)); - } - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_30_50.convertType(src.getExperimentalElement())); + if (src.hasType()) { + for (org.hl7.fhir.dstu3.model.CodeableConcept concept : src.getType()) tgt.addType(VersionConvertor_30_50.convertCodeableConcept(concept)); + } + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.r5.model.DateTimeType) VersionConvertor_30_50.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) tgt.addContact(VersionConvertor_30_50.convertContactDetail(t)); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r5.model.MarkdownType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); if (src.hasUseContext()) { for (org.hl7.fhir.dstu3.model.UsageContext t : src.getUseContext()) tgt.addUseContext(VersionConvertor_30_50.convertUsageContext(t)); } if (src.hasJurisdiction()) { for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getJurisdiction()) tgt.addJurisdiction(VersionConvertor_30_50.convertCodeableConcept(t)); } - if (src.hasPurpose()) - tgt.setPurpose(src.getPurpose()); - if (src.hasUsage()) - tgt.setUsage(src.getUsage()); - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); - if (src.hasApprovalDate()) - tgt.setApprovalDate(src.getApprovalDate()); - if (src.hasLastReviewDate()) - tgt.setLastReviewDate(src.getLastReviewDate()); + if (src.hasPurposeElement()) + tgt.setPurposeElement((org.hl7.fhir.r5.model.MarkdownType) VersionConvertor_30_50.convertType(src.getPurposeElement())); + if (src.hasUsageElement()) + tgt.setUsageElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getUsageElement())); + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.r5.model.MarkdownType) VersionConvertor_30_50.convertType(src.getCopyrightElement())); + if (src.hasApprovalDateElement()) + tgt.setApprovalDateElement((org.hl7.fhir.r5.model.DateType) VersionConvertor_30_50.convertType(src.getApprovalDateElement())); + if (src.hasLastReviewDateElement()) + tgt.setLastReviewDateElement((org.hl7.fhir.r5.model.DateType) VersionConvertor_30_50.convertType(src.getLastReviewDateElement())); if (src.hasEffectivePeriod()) tgt.setEffectivePeriod(VersionConvertor_30_50.convertPeriod(src.getEffectivePeriod())); for (org.hl7.fhir.dstu3.model.Contributor t : src.getContributor()) { @@ -87,20 +87,20 @@ public class Measure30_50 { if (src.hasLibrary()) { for (org.hl7.fhir.dstu3.model.Reference r : src.getLibrary()) tgt.addLibrary(r.getReference()); } - if (src.hasDisclaimer()) - tgt.setDisclaimer(src.getDisclaimer()); + if (src.hasDisclaimerElement()) + tgt.setDisclaimerElement((org.hl7.fhir.r5.model.MarkdownType) VersionConvertor_30_50.convertType(src.getDisclaimerElement())); if (src.hasScoring()) tgt.setScoring(VersionConvertor_30_50.convertCodeableConcept(src.getScoring())); if (src.hasCompositeScoring()) tgt.setCompositeScoring(VersionConvertor_30_50.convertCodeableConcept(src.getCompositeScoring())); - if (src.hasRiskAdjustment()) - tgt.setRiskAdjustment(src.getRiskAdjustment()); - if (src.hasRateAggregation()) - tgt.setRateAggregation(src.getRateAggregation()); - if (src.hasRationale()) - tgt.setRationale(src.getRationale()); - if (src.hasClinicalRecommendationStatement()) - tgt.setClinicalRecommendationStatement(src.getClinicalRecommendationStatement()); + if (src.hasRiskAdjustmentElement()) + tgt.setRiskAdjustmentElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getRiskAdjustmentElement())); + if (src.hasRateAggregationElement()) + tgt.setRateAggregationElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getRateAggregationElement())); + if (src.hasRationaleElement()) + tgt.setRationaleElement((org.hl7.fhir.r5.model.MarkdownType) VersionConvertor_30_50.convertType(src.getRationaleElement())); + if (src.hasClinicalRecommendationStatementElement()) + tgt.setClinicalRecommendationStatementElement((org.hl7.fhir.r5.model.MarkdownType) VersionConvertor_30_50.convertType(src.getClinicalRecommendationStatementElement())); if (src.hasImprovementNotation()) { if (src.getImprovementNotation().toLowerCase().contains("increase") || src.getImprovementNotation().toLowerCase().contains("higher")) tgt.setImprovementNotation(new org.hl7.fhir.r5.model.CodeableConcept().addCoding(new org.hl7.fhir.r5.model.Coding().setCode("increase").setSystem("http://terminology.hl7.org/CodeSystem/measure-improvement-notation")).setText(src.getImprovementNotation())); @@ -112,8 +112,8 @@ public class Measure30_50 { if (src.hasDefinition()) { for (org.hl7.fhir.dstu3.model.MarkdownType m : src.getDefinition()) tgt.addDefinition(m.getValue()); } - if (src.hasGuidance()) - tgt.setGuidance(src.getGuidance()); + if (src.hasGuidanceElement()) + tgt.setGuidanceElement((org.hl7.fhir.r5.model.MarkdownType) VersionConvertor_30_50.convertType(src.getGuidanceElement())); if (src.hasGroup()) { for (org.hl7.fhir.dstu3.model.Measure.MeasureGroupComponent g : src.getGroup()) tgt.addGroup(convertMeasureGroup(g)); } @@ -125,50 +125,49 @@ public class Measure30_50 { return null; org.hl7.fhir.dstu3.model.Measure tgt = new org.hl7.fhir.dstu3.model.Measure(); VersionConvertor_30_50.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_50.convertType(src.getUrlElement())); if (src.hasIdentifier()) { for (org.hl7.fhir.r5.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_30_50.convertIdentifier(t)); } - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getNameElement())); + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getTitleElement())); if (src.hasStatus()) tgt.setStatus(VersionConvertor_30_50.convertPublicationStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasType()) - if (src.hasType()) { - for (org.hl7.fhir.r5.model.CodeableConcept concept : src.getType()) tgt.addType(VersionConvertor_30_50.convertCodeableConcept(concept)); - } - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_50.convertType(src.getExperimentalElement())); + if (src.hasType()) { + for (org.hl7.fhir.r5.model.CodeableConcept concept : src.getType()) tgt.addType(VersionConvertor_30_50.convertCodeableConcept(concept)); + } + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_30_50.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.r5.model.ContactDetail t : src.getContact()) tgt.addContact(VersionConvertor_30_50.convertContactDetail(t)); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); if (src.hasUseContext()) { for (org.hl7.fhir.r5.model.UsageContext t : src.getUseContext()) tgt.addUseContext(VersionConvertor_30_50.convertUsageContext(t)); } if (src.hasJurisdiction()) { for (org.hl7.fhir.r5.model.CodeableConcept t : src.getJurisdiction()) tgt.addJurisdiction(VersionConvertor_30_50.convertCodeableConcept(t)); } - if (src.hasPurpose()) - tgt.setPurpose(src.getPurpose()); - if (src.hasUsage()) - tgt.setUsage(src.getUsage()); - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); - if (src.hasApprovalDate()) - tgt.setApprovalDate(src.getApprovalDate()); - if (src.hasLastReviewDate()) - tgt.setLastReviewDate(src.getLastReviewDate()); + if (src.hasPurposeElement()) + tgt.setPurposeElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_50.convertType(src.getPurposeElement())); + if (src.hasUsageElement()) + tgt.setUsageElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getUsageElement())); + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_50.convertType(src.getCopyrightElement())); + if (src.hasApprovalDateElement()) + tgt.setApprovalDateElement((org.hl7.fhir.dstu3.model.DateType) VersionConvertor_30_50.convertType(src.getApprovalDateElement())); + if (src.hasLastReviewDateElement()) + tgt.setLastReviewDateElement((org.hl7.fhir.dstu3.model.DateType) VersionConvertor_30_50.convertType(src.getLastReviewDateElement())); if (src.hasEffectivePeriod()) tgt.setEffectivePeriod(VersionConvertor_30_50.convertPeriod(src.getEffectivePeriod())); if (src.hasAuthor()) @@ -209,20 +208,20 @@ public class Measure30_50 { if (src.hasLibrary()) { for (org.hl7.fhir.r5.model.CanonicalType r : src.getLibrary()) tgt.addLibrary(VersionConvertor_30_50.convertCanonicalToReference(r)); } - if (src.hasDisclaimer()) - tgt.setDisclaimer(src.getDisclaimer()); + if (src.hasDisclaimerElement()) + tgt.setDisclaimerElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_50.convertType(src.getDisclaimerElement())); if (src.hasScoring()) tgt.setScoring(VersionConvertor_30_50.convertCodeableConcept(src.getScoring())); if (src.hasCompositeScoring()) tgt.setCompositeScoring(VersionConvertor_30_50.convertCodeableConcept(src.getCompositeScoring())); - if (src.hasRiskAdjustment()) - tgt.setRiskAdjustment(src.getRiskAdjustment()); - if (src.hasRateAggregation()) - tgt.setRateAggregation(src.getRateAggregation()); - if (src.hasRationale()) - tgt.setRationale(src.getRationale()); - if (src.hasClinicalRecommendationStatement()) - tgt.setClinicalRecommendationStatement(src.getClinicalRecommendationStatement()); + if (src.hasRiskAdjustmentElement()) + tgt.setRiskAdjustmentElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getRiskAdjustmentElement())); + if (src.hasRateAggregationElement()) + tgt.setRateAggregationElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getRateAggregationElement())); + if (src.hasRationaleElement()) + tgt.setRationaleElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_50.convertType(src.getRationaleElement())); + if (src.hasClinicalRecommendationStatementElement()) + tgt.setClinicalRecommendationStatementElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_50.convertType(src.getClinicalRecommendationStatementElement())); if (src.hasImprovementNotation()) for (org.hl7.fhir.r5.model.Coding cc : src.getImprovementNotation().getCoding()) { if (cc.hasCode() && cc.getCode().equals("increase")) @@ -233,8 +232,8 @@ public class Measure30_50 { if (src.hasDefinition()) { for (org.hl7.fhir.r5.model.MarkdownType m : src.getDefinition()) tgt.addDefinition(m.getValue()); } - if (src.hasGuidance()) - tgt.setGuidance(src.getGuidance()); + if (src.hasGuidanceElement()) + tgt.setGuidanceElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_50.convertType(src.getGuidanceElement())); if (src.hasGroup()) { for (org.hl7.fhir.r5.model.Measure.MeasureGroupComponent g : src.getGroup()) tgt.addGroup(convertMeasureGroup(g)); } @@ -247,8 +246,8 @@ public class Measure30_50 { org.hl7.fhir.dstu3.model.Measure.MeasureGroupComponent tgt = new org.hl7.fhir.dstu3.model.Measure.MeasureGroupComponent(); if (src.hasCode() && src.getCode().hasCoding()) tgt.setIdentifier(new org.hl7.fhir.dstu3.model.Identifier().setValue(src.getCode().getCodingFirstRep().getCode())); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); if (src.hasPopulation()) { for (org.hl7.fhir.r5.model.Measure.MeasureGroupPopulationComponent p : src.getPopulation()) tgt.addPopulation(convertMeasureGroupPopulation(p)); } @@ -264,8 +263,8 @@ public class Measure30_50 { org.hl7.fhir.r5.model.Measure.MeasureGroupComponent tgt = new org.hl7.fhir.r5.model.Measure.MeasureGroupComponent(); if (src.hasIdentifier()) tgt.setCode(new org.hl7.fhir.r5.model.CodeableConcept().addCoding(new org.hl7.fhir.r5.model.Coding().setCode(src.getIdentifier().getValue()))); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); if (src.hasPopulation()) { for (org.hl7.fhir.dstu3.model.Measure.MeasureGroupPopulationComponent p : src.getPopulation()) tgt.addPopulation(convertMeasureGroupPopulation(p)); } @@ -281,8 +280,8 @@ public class Measure30_50 { org.hl7.fhir.dstu3.model.Measure.MeasureGroupPopulationComponent tgt = new org.hl7.fhir.dstu3.model.Measure.MeasureGroupPopulationComponent(); if (src.hasCode()) tgt.setCode(VersionConvertor_30_50.convertCodeableConcept(src.getCode())); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); if (src.hasCriteria() && src.getCriteria().hasExpression()) tgt.setCriteria(src.getCriteria().getExpression()); if (src.hasCriteria() && src.getCriteria().hasName()) { @@ -299,10 +298,10 @@ public class Measure30_50 { org.hl7.fhir.r5.model.Measure.MeasureGroupPopulationComponent tgt = new org.hl7.fhir.r5.model.Measure.MeasureGroupPopulationComponent(); if (src.hasCode()) tgt.setCode(VersionConvertor_30_50.convertCodeableConcept(src.getCode())); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); if (src.hasCriteria()) - tgt.setCriteria(new org.hl7.fhir.r5.model.Expression().setExpression(src.getCriteria())); + tgt.setCriteria(new org.hl7.fhir.r5.model.Expression().setExpression(src.getCriteria())); if (src.hasName()) { if (tgt.hasCriteria()) tgt.getCriteria().setName(src.getName()); diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Media30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Media30_50.java index b167e5f70..0af4c19cc 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Media30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Media30_50.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_50; import org.hl7.fhir.convertors.VersionConvertor_30_50; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Media30_50 { diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Medication30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Medication30_50.java index a5092c6ba..080ab62c3 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Medication30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Medication30_50.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_50; import org.hl7.fhir.convertors.VersionConvertor_30_50; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Medication30_50 { @@ -54,8 +55,8 @@ public class Medication30_50 { VersionConvertor_30_50.copyElement(src, tgt); if (src.hasItem()) tgt.setItem(VersionConvertor_30_50.convertType(src.getItem())); - if (src.hasIsActive()) - tgt.setIsActive(src.getIsActive()); + if (src.hasIsActiveElement()) + tgt.setIsActiveElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_50.convertType(src.getIsActiveElement())); if (src.hasStrengthRatio()) tgt.setAmount(VersionConvertor_30_50.convertRatio(src.getStrengthRatio())); return tgt; @@ -68,8 +69,8 @@ public class Medication30_50 { VersionConvertor_30_50.copyElement(src, tgt); if (src.hasItem()) tgt.setItem(VersionConvertor_30_50.convertType(src.getItem())); - if (src.hasIsActive()) - tgt.setIsActive(src.getIsActive()); + if (src.hasIsActiveElement()) + tgt.setIsActiveElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_30_50.convertType(src.getIsActiveElement())); if (src.hasAmount()) tgt.setStrength(VersionConvertor_30_50.convertRatio(src.getAmount())); return tgt; @@ -80,10 +81,10 @@ public class Medication30_50 { return null; org.hl7.fhir.dstu3.model.Medication.MedicationPackageBatchComponent tgt = new org.hl7.fhir.dstu3.model.Medication.MedicationPackageBatchComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasLotNumber()) - tgt.setLotNumber(src.getLotNumber()); - if (src.hasExpirationDate()) - tgt.setExpirationDate(src.getExpirationDate()); + if (src.hasLotNumberElement()) + tgt.setLotNumberElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getLotNumberElement())); + if (src.hasExpirationDateElement()) + tgt.setExpirationDateElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_30_50.convertType(src.getExpirationDateElement())); return tgt; } @@ -92,10 +93,10 @@ public class Medication30_50 { return null; org.hl7.fhir.r5.model.Medication.MedicationBatchComponent tgt = new org.hl7.fhir.r5.model.Medication.MedicationBatchComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasLotNumber()) - tgt.setLotNumber(src.getLotNumber()); - if (src.hasExpirationDate()) - tgt.setExpirationDate(src.getExpirationDate()); + if (src.hasLotNumberElement()) + tgt.setLotNumberElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getLotNumberElement())); + if (src.hasExpirationDateElement()) + tgt.setExpirationDateElement((org.hl7.fhir.r5.model.DateTimeType) VersionConvertor_30_50.convertType(src.getExpirationDateElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/MedicationAdministration30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/MedicationAdministration30_50.java index ea24eef0a..e70d9082c 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/MedicationAdministration30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/MedicationAdministration30_50.java @@ -3,6 +3,7 @@ package org.hl7.fhir.convertors.conv30_50; import org.hl7.fhir.convertors.VersionConvertor_30_50; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r5.model.CodeableReference; +import java.util.Collections; public class MedicationAdministration30_50 { @@ -117,8 +118,8 @@ public class MedicationAdministration30_50 { return null; org.hl7.fhir.dstu3.model.MedicationAdministration.MedicationAdministrationDosageComponent tgt = new org.hl7.fhir.dstu3.model.MedicationAdministration.MedicationAdministrationDosageComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasText()) - tgt.setText(src.getText()); + if (src.hasTextElement()) + tgt.setTextElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getTextElement())); if (src.hasSite()) tgt.setSite(VersionConvertor_30_50.convertCodeableConcept(src.getSite())); if (src.hasRoute()) @@ -137,8 +138,8 @@ public class MedicationAdministration30_50 { return null; org.hl7.fhir.r5.model.MedicationAdministration.MedicationAdministrationDosageComponent tgt = new org.hl7.fhir.r5.model.MedicationAdministration.MedicationAdministrationDosageComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasText()) - tgt.setText(src.getText()); + if (src.hasTextElement()) + tgt.setTextElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getTextElement())); if (src.hasSite()) tgt.setSite(VersionConvertor_30_50.convertCodeableConcept(src.getSite())); if (src.hasRoute()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/MedicationDispense30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/MedicationDispense30_50.java index cf8b65118..0b5ec2d49 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/MedicationDispense30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/MedicationDispense30_50.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_50; import org.hl7.fhir.convertors.VersionConvertor_30_50; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class MedicationDispense30_50 { @@ -41,10 +42,10 @@ public class MedicationDispense30_50 { tgt.setQuantity(VersionConvertor_30_50.convertSimpleQuantity(src.getQuantity())); if (src.hasDaysSupply()) tgt.setDaysSupply(VersionConvertor_30_50.convertSimpleQuantity(src.getDaysSupply())); - if (src.hasWhenPrepared()) - tgt.setWhenPrepared(src.getWhenPrepared()); - if (src.hasWhenHandedOver()) - tgt.setWhenHandedOver(src.getWhenHandedOver()); + if (src.hasWhenPreparedElement()) + tgt.setWhenPreparedElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_30_50.convertType(src.getWhenPreparedElement())); + if (src.hasWhenHandedOverElement()) + tgt.setWhenHandedOverElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_30_50.convertType(src.getWhenHandedOverElement())); if (src.hasDestination()) tgt.setDestination(VersionConvertor_30_50.convertReference(src.getDestination())); if (src.hasReceiver()) { @@ -103,10 +104,10 @@ public class MedicationDispense30_50 { tgt.setQuantity(VersionConvertor_30_50.convertSimpleQuantity(src.getQuantity())); if (src.hasDaysSupply()) tgt.setDaysSupply(VersionConvertor_30_50.convertSimpleQuantity(src.getDaysSupply())); - if (src.hasWhenPrepared()) - tgt.setWhenPrepared(src.getWhenPrepared()); - if (src.hasWhenHandedOver()) - tgt.setWhenHandedOver(src.getWhenHandedOver()); + if (src.hasWhenPreparedElement()) + tgt.setWhenPreparedElement((org.hl7.fhir.r5.model.DateTimeType) VersionConvertor_30_50.convertType(src.getWhenPreparedElement())); + if (src.hasWhenHandedOverElement()) + tgt.setWhenHandedOverElement((org.hl7.fhir.r5.model.DateTimeType) VersionConvertor_30_50.convertType(src.getWhenHandedOverElement())); if (src.hasDestination()) tgt.setDestination(VersionConvertor_30_50.convertReference(src.getDestination())); if (src.hasReceiver()) { @@ -219,8 +220,8 @@ public class MedicationDispense30_50 { return null; org.hl7.fhir.r5.model.MedicationDispense.MedicationDispenseSubstitutionComponent tgt = new org.hl7.fhir.r5.model.MedicationDispense.MedicationDispenseSubstitutionComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasWasSubstituted()) - tgt.setWasSubstituted(src.getWasSubstituted()); + if (src.hasWasSubstitutedElement()) + tgt.setWasSubstitutedElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_30_50.convertType(src.getWasSubstitutedElement())); if (src.hasType()) tgt.setType(VersionConvertor_30_50.convertCodeableConcept(src.getType())); if (src.hasReason()) { @@ -237,8 +238,8 @@ public class MedicationDispense30_50 { return null; org.hl7.fhir.dstu3.model.MedicationDispense.MedicationDispenseSubstitutionComponent tgt = new org.hl7.fhir.dstu3.model.MedicationDispense.MedicationDispenseSubstitutionComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasWasSubstituted()) - tgt.setWasSubstituted(src.getWasSubstituted()); + if (src.hasWasSubstitutedElement()) + tgt.setWasSubstitutedElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_50.convertType(src.getWasSubstitutedElement())); if (src.hasType()) tgt.setType(VersionConvertor_30_50.convertCodeableConcept(src.getType())); if (src.hasReason()) { diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/MedicationRequest30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/MedicationRequest30_50.java index 1152166e8..b8d31e764 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/MedicationRequest30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/MedicationRequest30_50.java @@ -3,6 +3,7 @@ package org.hl7.fhir.convertors.conv30_50; import org.hl7.fhir.convertors.VersionConvertor_30_50; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r5.model.CodeableReference; +import java.util.Collections; public class MedicationRequest30_50 { @@ -34,8 +35,8 @@ public class MedicationRequest30_50 { if (src.hasSupportingInformation()) { for (org.hl7.fhir.r5.model.Reference t : src.getSupportingInformation()) tgt.addSupportingInformation(VersionConvertor_30_50.convertReference(t)); } - if (src.hasAuthoredOn()) - tgt.setAuthoredOn(src.getAuthoredOn()); + if (src.hasAuthoredOnElement()) + tgt.setAuthoredOnElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_30_50.convertType(src.getAuthoredOnElement())); if (src.hasRecorder()) tgt.setRecorder(VersionConvertor_30_50.convertReference(src.getRecorder())); for (CodeableReference t : src.getReason()) { @@ -95,8 +96,8 @@ public class MedicationRequest30_50 { if (src.hasSupportingInformation()) { for (org.hl7.fhir.dstu3.model.Reference t : src.getSupportingInformation()) tgt.addSupportingInformation(VersionConvertor_30_50.convertReference(t)); } - if (src.hasAuthoredOn()) - tgt.setAuthoredOn(src.getAuthoredOn()); + if (src.hasAuthoredOnElement()) + tgt.setAuthoredOnElement((org.hl7.fhir.r5.model.DateTimeType) VersionConvertor_30_50.convertType(src.getAuthoredOnElement())); if (src.hasRecorder()) tgt.setRecorder(VersionConvertor_30_50.convertReference(src.getRecorder())); if (src.hasReasonCode()) { @@ -133,8 +134,8 @@ public class MedicationRequest30_50 { VersionConvertor_30_50.copyElement(src, tgt); if (src.hasValidityPeriod()) tgt.setValidityPeriod(VersionConvertor_30_50.convertPeriod(src.getValidityPeriod())); - if (src.hasNumberOfRepeatsAllowed()) - tgt.setNumberOfRepeatsAllowed(src.getNumberOfRepeatsAllowed()); + if (src.hasNumberOfRepeatsAllowedElement()) + tgt.setNumberOfRepeatsAllowedElement((org.hl7.fhir.r5.model.UnsignedIntType) VersionConvertor_30_50.convertType(src.getNumberOfRepeatsAllowedElement())); if (src.hasQuantity()) tgt.setQuantity(VersionConvertor_30_50.convertSimpleQuantity(src.getQuantity())); if (src.hasExpectedSupplyDuration()) @@ -151,8 +152,8 @@ public class MedicationRequest30_50 { VersionConvertor_30_50.copyElement(src, tgt); if (src.hasValidityPeriod()) tgt.setValidityPeriod(VersionConvertor_30_50.convertPeriod(src.getValidityPeriod())); - if (src.hasNumberOfRepeatsAllowed()) - tgt.setNumberOfRepeatsAllowed(src.getNumberOfRepeatsAllowed()); + if (src.hasNumberOfRepeatsAllowedElement()) + tgt.setNumberOfRepeatsAllowedElement((org.hl7.fhir.dstu3.model.PositiveIntType) VersionConvertor_30_50.convertType(src.getNumberOfRepeatsAllowedElement())); if (src.hasQuantity()) tgt.setQuantity(VersionConvertor_30_50.convertSimpleQuantity(src.getQuantity())); if (src.hasExpectedSupplyDuration()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/MedicationStatement30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/MedicationStatement30_50.java index 941f15e0e..5b7a1050c 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/MedicationStatement30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/MedicationStatement30_50.java @@ -3,6 +3,9 @@ package org.hl7.fhir.convertors.conv30_50; import org.hl7.fhir.convertors.VersionConvertor_30_50; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r5.model.CodeableReference; +import org.hl7.fhir.r5.model.DateTimeType; + +import java.util.Collections; public class MedicationStatement30_50 { @@ -30,8 +33,8 @@ public class MedicationStatement30_50 { tgt.setMedication(VersionConvertor_30_50.convertType(src.getMedication())); if (src.hasEffective()) tgt.setEffective(VersionConvertor_30_50.convertType(src.getEffective())); - if (src.hasDateAsserted()) - tgt.setDateAsserted(src.getDateAsserted()); + if (src.hasDateAssertedElement()) + tgt.setDateAssertedElement((DateTimeType) VersionConvertor_30_50.convertType(src.getDateAssertedElement())); if (src.hasInformationSource()) tgt.setInformationSource(VersionConvertor_30_50.convertReference(src.getInformationSource())); if (src.hasSubject()) @@ -78,8 +81,8 @@ public class MedicationStatement30_50 { tgt.setMedication(VersionConvertor_30_50.convertType(src.getMedication())); if (src.hasEffective()) tgt.setEffective(VersionConvertor_30_50.convertType(src.getEffective())); - if (src.hasDateAsserted()) - tgt.setDateAsserted(src.getDateAsserted()); + if (src.hasDateAssertedElement()) + tgt.setDateAssertedElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_30_50.convertType(src.getDateAssertedElement())); if (src.hasInformationSource()) tgt.setInformationSource(VersionConvertor_30_50.convertReference(src.getInformationSource())); if (src.hasSubject()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/MessageDefinition30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/MessageDefinition30_50.java index befeca5c7..77bc33b9f 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/MessageDefinition30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/MessageDefinition30_50.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_50; import org.hl7.fhir.convertors.VersionConvertor_30_50; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class MessageDefinition30_50 { @@ -10,39 +11,39 @@ public class MessageDefinition30_50 { return null; org.hl7.fhir.dstu3.model.MessageDefinition tgt = new org.hl7.fhir.dstu3.model.MessageDefinition(); VersionConvertor_30_50.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_50.convertType(src.getUrlElement())); if (src.hasIdentifier()) tgt.setIdentifier(VersionConvertor_30_50.convertIdentifier(src.getIdentifierFirstRep())); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getNameElement())); + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getTitleElement())); if (src.hasStatus()) tgt.setStatus(VersionConvertor_30_50.convertPublicationStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_50.convertType(src.getExperimentalElement())); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_30_50.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.r5.model.ContactDetail t : src.getContact()) tgt.addContact(VersionConvertor_30_50.convertContactDetail(t)); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); if (src.hasUseContext()) { for (org.hl7.fhir.r5.model.UsageContext t : src.getUseContext()) tgt.addUseContext(VersionConvertor_30_50.convertUsageContext(t)); } if (src.hasJurisdiction()) { for (org.hl7.fhir.r5.model.CodeableConcept t : src.getJurisdiction()) tgt.addJurisdiction(VersionConvertor_30_50.convertCodeableConcept(t)); } - if (src.hasPurpose()) - tgt.setPurpose(src.getPurpose()); - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); + if (src.hasPurposeElement()) + tgt.setPurposeElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_50.convertType(src.getPurposeElement())); + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_50.convertType(src.getCopyrightElement())); if (src.hasBase()) tgt.setBase(VersionConvertor_30_50.convertCanonicalToReference(src.getBaseElement())); if (src.hasParent()) { @@ -71,39 +72,39 @@ public class MessageDefinition30_50 { return null; org.hl7.fhir.r5.model.MessageDefinition tgt = new org.hl7.fhir.r5.model.MessageDefinition(); VersionConvertor_30_50.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r5.model.UriType) VersionConvertor_30_50.convertType(src.getUrlElement())); if (src.hasIdentifier()) tgt.addIdentifier(VersionConvertor_30_50.convertIdentifier(src.getIdentifier())); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getNameElement())); + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getTitleElement())); if (src.hasStatus()) tgt.setStatus(VersionConvertor_30_50.convertPublicationStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_30_50.convertType(src.getExperimentalElement())); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.r5.model.DateTimeType) VersionConvertor_30_50.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) tgt.addContact(VersionConvertor_30_50.convertContactDetail(t)); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r5.model.MarkdownType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); if (src.hasUseContext()) { for (org.hl7.fhir.dstu3.model.UsageContext t : src.getUseContext()) tgt.addUseContext(VersionConvertor_30_50.convertUsageContext(t)); } if (src.hasJurisdiction()) { for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getJurisdiction()) tgt.addJurisdiction(VersionConvertor_30_50.convertCodeableConcept(t)); } - if (src.hasPurpose()) - tgt.setPurpose(src.getPurpose()); - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); + if (src.hasPurposeElement()) + tgt.setPurposeElement((org.hl7.fhir.r5.model.MarkdownType) VersionConvertor_30_50.convertType(src.getPurposeElement())); + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.r5.model.MarkdownType) VersionConvertor_30_50.convertType(src.getCopyrightElement())); if (src.hasBase()) tgt.setBaseElement(VersionConvertor_30_50.convertReferenceToCanonical(src.getBase())); if (src.hasParent()) { @@ -134,8 +135,8 @@ public class MessageDefinition30_50 { VersionConvertor_30_50.copyElement(src, tgt); if (src.hasMessage()) tgt.setMessage(VersionConvertor_30_50.convertCanonicalToReference(src.getMessageElement())); - if (src.hasSituation()) - tgt.setSituation(src.getSituation()); + if (src.hasSituationElement()) + tgt.setSituationElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_50.convertType(src.getSituationElement())); return tgt; } @@ -146,8 +147,8 @@ public class MessageDefinition30_50 { VersionConvertor_30_50.copyElement(src, tgt); if (src.hasMessage()) tgt.setMessageElement(VersionConvertor_30_50.convertReferenceToCanonical(src.getMessage())); - if (src.hasSituation()) - tgt.setSituation(src.getSituation()); + if (src.hasSituationElement()) + tgt.setSituationElement((org.hl7.fhir.r5.model.MarkdownType) VersionConvertor_30_50.convertType(src.getSituationElement())); return tgt; } @@ -156,14 +157,14 @@ public class MessageDefinition30_50 { return null; org.hl7.fhir.dstu3.model.MessageDefinition.MessageDefinitionFocusComponent tgt = new org.hl7.fhir.dstu3.model.MessageDefinition.MessageDefinitionFocusComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasCode()) - tgt.setCode(src.getCode()); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_30_50.convertType(src.getCodeElement())); if (src.hasProfile()) tgt.setProfile(VersionConvertor_30_50.convertCanonicalToReference(src.getProfileElement())); - if (src.hasMin()) - tgt.setMin(src.getMin()); - if (src.hasMax()) - tgt.setMax(src.getMax()); + if (src.hasMinElement()) + tgt.setMinElement((org.hl7.fhir.dstu3.model.UnsignedIntType) VersionConvertor_30_50.convertType(src.getMinElement())); + if (src.hasMaxElement()) + tgt.setMaxElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getMaxElement())); return tgt; } @@ -172,14 +173,14 @@ public class MessageDefinition30_50 { return null; org.hl7.fhir.r5.model.MessageDefinition.MessageDefinitionFocusComponent tgt = new org.hl7.fhir.r5.model.MessageDefinition.MessageDefinitionFocusComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasCode()) - tgt.setCode(src.getCode()); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.r5.model.CodeType) VersionConvertor_30_50.convertType(src.getCodeElement())); if (src.hasProfile()) tgt.setProfileElement(VersionConvertor_30_50.convertReferenceToCanonical(src.getProfile())); - if (src.hasMin()) - tgt.setMin(src.getMin()); - if (src.hasMax()) - tgt.setMax(src.getMax()); + if (src.hasMinElement()) + tgt.setMinElement((org.hl7.fhir.r5.model.UnsignedIntType) VersionConvertor_30_50.convertType(src.getMinElement())); + if (src.hasMaxElement()) + tgt.setMaxElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getMaxElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/MessageHeader30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/MessageHeader30_50.java index c3dcddcef..7b5b63839 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/MessageHeader30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/MessageHeader30_50.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_50; import org.hl7.fhir.convertors.VersionConvertor_30_50; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class MessageHeader30_50 { @@ -10,12 +11,12 @@ public class MessageHeader30_50 { return null; org.hl7.fhir.dstu3.model.MessageHeader.MessageDestinationComponent tgt = new org.hl7.fhir.dstu3.model.MessageHeader.MessageDestinationComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getNameElement())); if (src.hasTarget()) tgt.setTarget(VersionConvertor_30_50.convertReference(src.getTarget())); - if (src.hasEndpoint()) - tgt.setEndpoint(src.getEndpoint()); + if (src.hasEndpointElement()) + tgt.setEndpointElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_50.convertType(src.getEndpointElement())); return tgt; } @@ -24,12 +25,12 @@ public class MessageHeader30_50 { return null; org.hl7.fhir.r5.model.MessageHeader.MessageDestinationComponent tgt = new org.hl7.fhir.r5.model.MessageHeader.MessageDestinationComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getNameElement())); if (src.hasTarget()) tgt.setTarget(VersionConvertor_30_50.convertReference(src.getTarget())); - if (src.hasEndpoint()) - tgt.setEndpoint(src.getEndpoint()); + if (src.hasEndpointElement()) + tgt.setEndpointElement((org.hl7.fhir.r5.model.UrlType) VersionConvertor_30_50.convertType(src.getEndpointElement())); return tgt; } @@ -98,8 +99,8 @@ public class MessageHeader30_50 { return null; org.hl7.fhir.r5.model.MessageHeader.MessageHeaderResponseComponent tgt = new org.hl7.fhir.r5.model.MessageHeader.MessageHeaderResponseComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasIdentifier()) - tgt.setIdentifier(src.getIdentifier()); + if (src.hasIdentifierElement()) + tgt.setIdentifierElement((org.hl7.fhir.r5.model.IdType) VersionConvertor_30_50.convertType(src.getIdentifierElement())); if (src.hasCode()) tgt.setCode(convertResponseType(src.getCode())); if (src.hasDetails()) @@ -112,8 +113,8 @@ public class MessageHeader30_50 { return null; org.hl7.fhir.dstu3.model.MessageHeader.MessageHeaderResponseComponent tgt = new org.hl7.fhir.dstu3.model.MessageHeader.MessageHeaderResponseComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasIdentifier()) - tgt.setIdentifier(src.getIdentifier()); + if (src.hasIdentifierElement()) + tgt.setIdentifierElement((org.hl7.fhir.dstu3.model.IdType) VersionConvertor_30_50.convertType(src.getIdentifierElement())); if (src.hasCode()) tgt.setCode(convertResponseType(src.getCode())); if (src.hasDetails()) @@ -126,16 +127,16 @@ public class MessageHeader30_50 { return null; org.hl7.fhir.dstu3.model.MessageHeader.MessageSourceComponent tgt = new org.hl7.fhir.dstu3.model.MessageHeader.MessageSourceComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasSoftware()) - tgt.setSoftware(src.getSoftware()); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getNameElement())); + if (src.hasSoftwareElement()) + tgt.setSoftwareElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getSoftwareElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getVersionElement())); if (src.hasContact()) tgt.setContact(VersionConvertor_30_50.convertContactPoint(src.getContact())); - if (src.hasEndpoint()) - tgt.setEndpoint(src.getEndpoint()); + if (src.hasEndpointElement()) + tgt.setEndpointElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_50.convertType(src.getEndpointElement())); return tgt; } @@ -144,16 +145,16 @@ public class MessageHeader30_50 { return null; org.hl7.fhir.r5.model.MessageHeader.MessageSourceComponent tgt = new org.hl7.fhir.r5.model.MessageHeader.MessageSourceComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasSoftware()) - tgt.setSoftware(src.getSoftware()); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getNameElement())); + if (src.hasSoftwareElement()) + tgt.setSoftwareElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getSoftwareElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getVersionElement())); if (src.hasContact()) tgt.setContact(VersionConvertor_30_50.convertContactPoint(src.getContact())); - if (src.hasEndpoint()) - tgt.setEndpoint(src.getEndpoint()); + if (src.hasEndpointElement()) + tgt.setEndpointElement((org.hl7.fhir.r5.model.UrlType) VersionConvertor_30_50.convertType(src.getEndpointElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/NamingSystem30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/NamingSystem30_50.java index 0607be788..25268a1f1 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/NamingSystem30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/NamingSystem30_50.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_50; import org.hl7.fhir.convertors.VersionConvertor_30_50; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class NamingSystem30_50 { @@ -10,33 +11,33 @@ public class NamingSystem30_50 { return null; org.hl7.fhir.dstu3.model.NamingSystem tgt = new org.hl7.fhir.dstu3.model.NamingSystem(); VersionConvertor_30_50.copyDomainResource(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getNameElement())); if (src.hasStatus()) tgt.setStatus(VersionConvertor_30_50.convertPublicationStatus(src.getStatus())); if (src.hasKind()) tgt.setKind(convertNamingSystemType(src.getKind())); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_30_50.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.r5.model.ContactDetail t : src.getContact()) tgt.addContact(VersionConvertor_30_50.convertContactDetail(t)); } - if (src.hasResponsible()) - tgt.setResponsible(src.getResponsible()); + if (src.hasResponsibleElement()) + tgt.setResponsibleElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getResponsibleElement())); if (src.hasType()) tgt.setType(VersionConvertor_30_50.convertCodeableConcept(src.getType())); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); if (src.hasUseContext()) { for (org.hl7.fhir.r5.model.UsageContext t : src.getUseContext()) tgt.addUseContext(VersionConvertor_30_50.convertUsageContext(t)); } if (src.hasJurisdiction()) { for (org.hl7.fhir.r5.model.CodeableConcept t : src.getJurisdiction()) tgt.addJurisdiction(VersionConvertor_30_50.convertCodeableConcept(t)); } - if (src.hasUsage()) - tgt.setUsage(src.getUsage()); + if (src.hasUsageElement()) + tgt.setUsageElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getUsageElement())); if (src.hasUniqueId()) { for (org.hl7.fhir.r5.model.NamingSystem.NamingSystemUniqueIdComponent t : src.getUniqueId()) tgt.addUniqueId(convertNamingSystemUniqueIdComponent(t)); } @@ -48,33 +49,33 @@ public class NamingSystem30_50 { return null; org.hl7.fhir.r5.model.NamingSystem tgt = new org.hl7.fhir.r5.model.NamingSystem(); VersionConvertor_30_50.copyDomainResource(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getNameElement())); if (src.hasStatus()) tgt.setStatus(VersionConvertor_30_50.convertPublicationStatus(src.getStatus())); if (src.hasKind()) tgt.setKind(convertNamingSystemType(src.getKind())); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.r5.model.DateTimeType) VersionConvertor_30_50.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) tgt.addContact(VersionConvertor_30_50.convertContactDetail(t)); } - if (src.hasResponsible()) - tgt.setResponsible(src.getResponsible()); + if (src.hasResponsibleElement()) + tgt.setResponsibleElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getResponsibleElement())); if (src.hasType()) tgt.setType(VersionConvertor_30_50.convertCodeableConcept(src.getType())); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r5.model.MarkdownType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); if (src.hasUseContext()) { for (org.hl7.fhir.dstu3.model.UsageContext t : src.getUseContext()) tgt.addUseContext(VersionConvertor_30_50.convertUsageContext(t)); } if (src.hasJurisdiction()) { for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getJurisdiction()) tgt.addJurisdiction(VersionConvertor_30_50.convertCodeableConcept(t)); } - if (src.hasUsage()) - tgt.setUsage(src.getUsage()); + if (src.hasUsageElement()) + tgt.setUsageElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getUsageElement())); if (src.hasUniqueId()) { for (org.hl7.fhir.dstu3.model.NamingSystem.NamingSystemUniqueIdComponent t : src.getUniqueId()) tgt.addUniqueId(convertNamingSystemUniqueIdComponent(t)); } @@ -152,12 +153,12 @@ public class NamingSystem30_50 { VersionConvertor_30_50.copyElement(src, tgt); if (src.hasType()) tgt.setType(convertNamingSystemIdentifierType(src.getType())); - if (src.hasValue()) - tgt.setValue(src.getValue()); - if (src.hasPreferred()) - tgt.setPreferred(src.getPreferred()); - if (src.hasComment()) - tgt.setComment(src.getComment()); + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getValueElement())); + if (src.hasPreferredElement()) + tgt.setPreferredElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_30_50.convertType(src.getPreferredElement())); + if (src.hasCommentElement()) + tgt.setCommentElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getCommentElement())); if (src.hasPeriod()) tgt.setPeriod(VersionConvertor_30_50.convertPeriod(src.getPeriod())); return tgt; @@ -170,12 +171,12 @@ public class NamingSystem30_50 { VersionConvertor_30_50.copyElement(src, tgt); if (src.hasType()) tgt.setType(convertNamingSystemIdentifierType(src.getType())); - if (src.hasValue()) - tgt.setValue(src.getValue()); - if (src.hasPreferred()) - tgt.setPreferred(src.getPreferred()); - if (src.hasComment()) - tgt.setComment(src.getComment()); + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getValueElement())); + if (src.hasPreferredElement()) + tgt.setPreferredElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_50.convertType(src.getPreferredElement())); + if (src.hasCommentElement()) + tgt.setCommentElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getCommentElement())); if (src.hasPeriod()) tgt.setPeriod(VersionConvertor_30_50.convertPeriod(src.getPeriod())); return tgt; diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Observation30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Observation30_50.java index e8505e201..c62952dcc 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Observation30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Observation30_50.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_50; import org.hl7.fhir.convertors.VersionConvertor_30_50; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Observation30_50 { @@ -29,8 +30,8 @@ public class Observation30_50 { tgt.setContext(VersionConvertor_30_50.convertReference(src.getEncounter())); if (src.hasEffective()) tgt.setEffective(VersionConvertor_30_50.convertType(src.getEffective())); - if (src.hasIssued()) - tgt.setIssued(src.getIssued()); + if (src.hasIssuedElement()) + tgt.setIssuedElement((org.hl7.fhir.dstu3.model.InstantType) VersionConvertor_30_50.convertType(src.getIssuedElement())); if (src.hasPerformer()) { for (org.hl7.fhir.r5.model.Reference t : src.getPerformer()) tgt.addPerformer(VersionConvertor_30_50.convertReference(t)); } @@ -89,8 +90,8 @@ public class Observation30_50 { tgt.setEncounter(VersionConvertor_30_50.convertReference(src.getContext())); if (src.hasEffective()) tgt.setEffective(VersionConvertor_30_50.convertType(src.getEffective())); - if (src.hasIssued()) - tgt.setIssued(src.getIssued()); + if (src.hasIssuedElement()) + tgt.setIssuedElement((org.hl7.fhir.r5.model.InstantType) VersionConvertor_30_50.convertType(src.getIssuedElement())); if (src.hasPerformer()) { for (org.hl7.fhir.dstu3.model.Reference t : src.getPerformer()) tgt.addPerformer(VersionConvertor_30_50.convertReference(t)); } @@ -177,8 +178,8 @@ public class Observation30_50 { } if (src.hasAge()) tgt.setAge(VersionConvertor_30_50.convertRange(src.getAge())); - if (src.hasText()) - tgt.setText(src.getText()); + if (src.hasTextElement()) + tgt.setTextElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getTextElement())); return tgt; } @@ -198,8 +199,8 @@ public class Observation30_50 { } if (src.hasAge()) tgt.setAge(VersionConvertor_30_50.convertRange(src.getAge())); - if (src.hasText()) - tgt.setText(src.getText()); + if (src.hasTextElement()) + tgt.setTextElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getTextElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/OperationDefinition30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/OperationDefinition30_50.java index a37f5828c..e9fbe4376 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/OperationDefinition30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/OperationDefinition30_50.java @@ -2,9 +2,11 @@ package org.hl7.fhir.convertors.conv30_50; import org.hl7.fhir.convertors.VersionConvertorConstants; import org.hl7.fhir.convertors.VersionConvertor_30_50; +import org.hl7.fhir.dstu3.model.CodeType; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r5.model.DataType; import org.hl7.fhir.r5.model.Enumerations; +import java.util.Collections; public class OperationDefinition30_50 { @@ -13,52 +15,52 @@ public class OperationDefinition30_50 { return null; org.hl7.fhir.r5.model.OperationDefinition tgt = new org.hl7.fhir.r5.model.OperationDefinition(); VersionConvertor_30_50.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r5.model.UriType) VersionConvertor_30_50.convertType(src.getUrlElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getNameElement())); if (src.hasStatus()) tgt.setStatus(VersionConvertor_30_50.convertPublicationStatus(src.getStatus())); if (src.hasKind()) tgt.setKind(convertOperationKind(src.getKind())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_30_50.convertType(src.getExperimentalElement())); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.r5.model.DateTimeType) VersionConvertor_30_50.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) tgt.addContact(VersionConvertor_30_50.convertContactDetail(t)); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r5.model.MarkdownType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); if (src.hasUseContext()) { for (org.hl7.fhir.dstu3.model.UsageContext t : src.getUseContext()) tgt.addUseContext(VersionConvertor_30_50.convertUsageContext(t)); } if (src.hasJurisdiction()) { for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getJurisdiction()) tgt.addJurisdiction(VersionConvertor_30_50.convertCodeableConcept(t)); } - if (src.hasPurpose()) - tgt.setPurpose(src.getPurpose()); + if (src.hasPurposeElement()) + tgt.setPurposeElement((org.hl7.fhir.r5.model.MarkdownType) VersionConvertor_30_50.convertType(src.getPurposeElement())); if (src.hasIdempotent()) tgt.setAffectsState(!src.getIdempotent()); - if (src.hasCode()) - tgt.setCode(src.getCode()); - if (src.hasComment()) - tgt.setComment(src.getComment()); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.r5.model.CodeType) VersionConvertor_30_50.convertType(src.getCodeElement())); + if (src.hasCommentElement()) + tgt.setCommentElement((org.hl7.fhir.r5.model.MarkdownType) VersionConvertor_30_50.convertType(src.getCommentElement())); if (src.hasBase()) tgt.setBaseElement(VersionConvertor_30_50.convertReferenceToCanonical(src.getBase())); if (src.hasResource()) { for (org.hl7.fhir.dstu3.model.CodeType t : src.getResource()) tgt.addResource(t.getValue()); } - if (src.hasSystem()) - tgt.setSystem(src.getSystem()); - if (src.hasType()) - tgt.setType(src.getType()); - if (src.hasInstance()) - tgt.setInstance(src.getInstance()); + if (src.hasSystemElement()) + tgt.setSystemElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_30_50.convertType(src.getSystemElement())); + if (src.hasTypeElement()) + tgt.setTypeElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_30_50.convertType(src.getTypeElement())); + if (src.hasInstanceElement()) + tgt.setInstanceElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_30_50.convertType(src.getInstanceElement())); if (src.hasParameter()) { for (org.hl7.fhir.dstu3.model.OperationDefinition.OperationDefinitionParameterComponent t : src.getParameter()) tgt.addParameter(convertOperationDefinitionParameterComponent(t)); } @@ -73,52 +75,52 @@ public class OperationDefinition30_50 { return null; org.hl7.fhir.dstu3.model.OperationDefinition tgt = new org.hl7.fhir.dstu3.model.OperationDefinition(); VersionConvertor_30_50.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_50.convertType(src.getUrlElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getNameElement())); if (src.hasStatus()) tgt.setStatus(VersionConvertor_30_50.convertPublicationStatus(src.getStatus())); if (src.hasKind()) tgt.setKind(convertOperationKind(src.getKind())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_50.convertType(src.getExperimentalElement())); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_30_50.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.r5.model.ContactDetail t : src.getContact()) tgt.addContact(VersionConvertor_30_50.convertContactDetail(t)); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); if (src.hasUseContext()) { for (org.hl7.fhir.r5.model.UsageContext t : src.getUseContext()) tgt.addUseContext(VersionConvertor_30_50.convertUsageContext(t)); } if (src.hasJurisdiction()) { for (org.hl7.fhir.r5.model.CodeableConcept t : src.getJurisdiction()) tgt.addJurisdiction(VersionConvertor_30_50.convertCodeableConcept(t)); } - if (src.hasPurpose()) - tgt.setPurpose(src.getPurpose()); + if (src.hasPurposeElement()) + tgt.setPurposeElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_50.convertType(src.getPurposeElement())); if (src.hasAffectsState()) tgt.setIdempotent(!src.getAffectsState()); - if (src.hasCode()) - tgt.setCode(src.getCode()); - if (src.hasComment()) - tgt.setComment(src.getComment()); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_30_50.convertType(src.getCodeElement())); + if (src.hasCommentElement()) + tgt.setCommentElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getCommentElement())); if (src.hasBase()) tgt.setBase(VersionConvertor_30_50.convertCanonicalToReference(src.getBaseElement())); if (src.hasResource()) { for (org.hl7.fhir.r5.model.CodeType t : src.getResource()) tgt.addResource(t.getValue()); } - if (src.hasSystem()) - tgt.setSystem(src.getSystem()); - if (src.hasType()) - tgt.setType(src.getType()); - if (src.hasInstance()) - tgt.setInstance(src.getInstance()); + if (src.hasSystemElement()) + tgt.setSystemElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_50.convertType(src.getSystemElement())); + if (src.hasTypeElement()) + tgt.setTypeElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_50.convertType(src.getTypeElement())); + if (src.hasInstanceElement()) + tgt.setInstanceElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_50.convertType(src.getInstanceElement())); if (src.hasParameter()) { for (org.hl7.fhir.r5.model.OperationDefinition.OperationDefinitionParameterComponent t : src.getParameter()) tgt.addParameter(convertOperationDefinitionParameterComponent(t)); } @@ -136,8 +138,8 @@ public class OperationDefinition30_50 { if (src.hasParameterName()) { for (org.hl7.fhir.r5.model.StringType t : src.getParameterName()) tgt.addParameterName(t.getValue()); } - if (src.hasComment()) - tgt.setComment(src.getComment()); + if (src.hasCommentElement()) + tgt.setCommentElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getCommentElement())); return tgt; } @@ -149,8 +151,8 @@ public class OperationDefinition30_50 { if (src.hasParameterName()) { for (org.hl7.fhir.dstu3.model.StringType t : src.getParameterName()) tgt.addParameterName(t.getValue()); } - if (src.hasComment()) - tgt.setComment(src.getComment()); + if (src.hasCommentElement()) + tgt.setCommentElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getCommentElement())); return tgt; } @@ -194,18 +196,18 @@ public class OperationDefinition30_50 { return null; org.hl7.fhir.r5.model.OperationDefinition.OperationDefinitionParameterComponent tgt = new org.hl7.fhir.r5.model.OperationDefinition.OperationDefinitionParameterComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.CodeType) VersionConvertor_30_50.convertType(src.getNameElement())); if (src.hasUse()) tgt.setUse(convertOperationParameterUse(src.getUse())); - if (src.hasMin()) - tgt.setMin(src.getMin()); - if (src.hasMax()) - tgt.setMax(src.getMax()); - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasMinElement()) + tgt.setMinElement((org.hl7.fhir.r5.model.IntegerType) VersionConvertor_30_50.convertType(src.getMinElement())); + if (src.hasMaxElement()) + tgt.setMaxElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getMaxElement())); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getDocumentationElement())); if (src.hasType()) - tgt.setType(Enumerations.FHIRAllTypes.fromCode(src.getType())); + tgt.setType(Enumerations.FHIRAllTypes.fromCode(src.getType())); if (src.hasSearchType()) tgt.setSearchType(VersionConvertor_30_50.convertSearchParamType(src.getSearchType())); if (src.hasProfile()) @@ -223,18 +225,18 @@ public class OperationDefinition30_50 { return null; org.hl7.fhir.dstu3.model.OperationDefinition.OperationDefinitionParameterComponent tgt = new org.hl7.fhir.dstu3.model.OperationDefinition.OperationDefinitionParameterComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_30_50.convertType(src.getNameElement())); if (src.hasUse()) tgt.setUse(convertOperationParameterUse(src.getUse())); - if (src.hasMin()) - tgt.setMin(src.getMin()); - if (src.hasMax()) - tgt.setMax(src.getMax()); - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasMinElement()) + tgt.setMinElement((org.hl7.fhir.dstu3.model.IntegerType) VersionConvertor_30_50.convertType(src.getMinElement())); + if (src.hasMaxElement()) + tgt.setMaxElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getMaxElement())); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getDocumentationElement())); if (src.hasType()) - tgt.setType(src.getType().toCode()); + tgt.setType(src.getType().toCode()); if (src.hasSearchType()) tgt.setSearchType(VersionConvertor_30_50.convertSearchParamType(src.getSearchType())); if (src.hasTargetProfile()) { diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/OperationOutcome30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/OperationOutcome30_50.java index 63c65bd39..c1c2b02c9 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/OperationOutcome30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/OperationOutcome30_50.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_50; import org.hl7.fhir.convertors.VersionConvertor_30_50; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class OperationOutcome30_50 { @@ -206,8 +207,8 @@ public class OperationOutcome30_50 { tgt.setCode(convertIssueType(src.getCode())); if (src.hasDetails()) tgt.setDetails(VersionConvertor_30_50.convertCodeableConcept(src.getDetails())); - if (src.hasDiagnostics()) - tgt.setDiagnostics(src.getDiagnostics()); + if (src.hasDiagnosticsElement()) + tgt.setDiagnosticsElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getDiagnosticsElement())); if (src.hasLocation()) { for (org.hl7.fhir.dstu3.model.StringType t : src.getLocation()) tgt.addLocation(t.getValue()); } @@ -228,8 +229,8 @@ public class OperationOutcome30_50 { tgt.setCode(convertIssueType(src.getCode())); if (src.hasDetails()) tgt.setDetails(VersionConvertor_30_50.convertCodeableConcept(src.getDetails())); - if (src.hasDiagnostics()) - tgt.setDiagnostics(src.getDiagnostics()); + if (src.hasDiagnosticsElement()) + tgt.setDiagnosticsElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getDiagnosticsElement())); if (src.hasLocation()) { for (org.hl7.fhir.r5.model.StringType t : src.getLocation()) tgt.addLocation(t.getValue()); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Organization30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Organization30_50.java index ede2cca75..4debd26d7 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Organization30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Organization30_50.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_50; import org.hl7.fhir.convertors.VersionConvertor_30_50; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Organization30_50 { @@ -13,13 +14,13 @@ public class Organization30_50 { if (src.hasIdentifier()) { for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_30_50.convertIdentifier(t)); } - if (src.hasActive()) - tgt.setActive(src.getActive()); + if (src.hasActiveElement()) + tgt.setActiveElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_30_50.convertType(src.getActiveElement())); if (src.hasType()) { for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getType()) tgt.addType(VersionConvertor_30_50.convertCodeableConcept(t)); } - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getNameElement())); if (src.hasAlias()) { for (org.hl7.fhir.dstu3.model.StringType t : src.getAlias()) tgt.addAlias(t.getValue()); } @@ -48,13 +49,13 @@ public class Organization30_50 { if (src.hasIdentifier()) { for (org.hl7.fhir.r5.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_30_50.convertIdentifier(t)); } - if (src.hasActive()) - tgt.setActive(src.getActive()); + if (src.hasActiveElement()) + tgt.setActiveElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_50.convertType(src.getActiveElement())); if (src.hasType()) { for (org.hl7.fhir.r5.model.CodeableConcept t : src.getType()) tgt.addType(VersionConvertor_30_50.convertCodeableConcept(t)); } - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getNameElement())); if (src.hasAlias()) { for (org.hl7.fhir.r5.model.StringType t : src.getAlias()) tgt.addAlias(t.getValue()); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Parameters30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Parameters30_50.java index 60a16958f..662940a2e 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Parameters30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Parameters30_50.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_50; import org.hl7.fhir.convertors.VersionConvertor_30_50; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Parameters30_50 { @@ -32,8 +33,8 @@ public class Parameters30_50 { return null; org.hl7.fhir.r5.model.Parameters.ParametersParameterComponent tgt = new org.hl7.fhir.r5.model.Parameters.ParametersParameterComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getNameElement())); if (src.hasValue()) tgt.setValue(VersionConvertor_30_50.convertType(src.getValue())); if (src.hasResource()) @@ -49,8 +50,8 @@ public class Parameters30_50 { return null; org.hl7.fhir.dstu3.model.Parameters.ParametersParameterComponent tgt = new org.hl7.fhir.dstu3.model.Parameters.ParametersParameterComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getNameElement())); if (src.hasValue()) tgt.setValue(VersionConvertor_30_50.convertType(src.getValue())); if (src.hasResource()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Patient30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Patient30_50.java index 6cfa0950d..8088bec31 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Patient30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Patient30_50.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_50; import org.hl7.fhir.convertors.VersionConvertor_30_50; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Patient30_50 { @@ -124,8 +125,8 @@ public class Patient30_50 { if (src.hasIdentifier()) { for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_30_50.convertIdentifier(t)); } - if (src.hasActive()) - tgt.setActive(src.getActive()); + if (src.hasActiveElement()) + tgt.setActiveElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_30_50.convertType(src.getActiveElement())); if (src.hasName()) { for (org.hl7.fhir.dstu3.model.HumanName t : src.getName()) tgt.addName(VersionConvertor_30_50.convertHumanName(t)); } @@ -134,8 +135,8 @@ public class Patient30_50 { } if (src.hasGender()) tgt.setGender(VersionConvertor_30_50.convertAdministrativeGender(src.getGender())); - if (src.hasBirthDate()) - tgt.setBirthDate(src.getBirthDate()); + if (src.hasBirthDateElement()) + tgt.setBirthDateElement((org.hl7.fhir.r5.model.DateType) VersionConvertor_30_50.convertType(src.getBirthDateElement())); if (src.hasDeceased()) tgt.setDeceased(VersionConvertor_30_50.convertType(src.getDeceased())); if (src.hasAddress()) { @@ -175,8 +176,8 @@ public class Patient30_50 { if (src.hasIdentifier()) { for (org.hl7.fhir.r5.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_30_50.convertIdentifier(t)); } - if (src.hasActive()) - tgt.setActive(src.getActive()); + if (src.hasActiveElement()) + tgt.setActiveElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_50.convertType(src.getActiveElement())); if (src.hasName()) { for (org.hl7.fhir.r5.model.HumanName t : src.getName()) tgt.addName(VersionConvertor_30_50.convertHumanName(t)); } @@ -185,8 +186,8 @@ public class Patient30_50 { } if (src.hasGender()) tgt.setGender(VersionConvertor_30_50.convertAdministrativeGender(src.getGender())); - if (src.hasBirthDate()) - tgt.setBirthDate(src.getBirthDate()); + if (src.hasBirthDateElement()) + tgt.setBirthDateElement((org.hl7.fhir.dstu3.model.DateType) VersionConvertor_30_50.convertType(src.getBirthDateElement())); if (src.hasDeceased()) tgt.setDeceased(VersionConvertor_30_50.convertType(src.getDeceased())); if (src.hasAddress()) { @@ -225,8 +226,8 @@ public class Patient30_50 { VersionConvertor_30_50.copyElement(src, tgt); if (src.hasLanguage()) tgt.setLanguage(VersionConvertor_30_50.convertCodeableConcept(src.getLanguage())); - if (src.hasPreferred()) - tgt.setPreferred(src.getPreferred()); + if (src.hasPreferredElement()) + tgt.setPreferredElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_30_50.convertType(src.getPreferredElement())); return tgt; } @@ -237,8 +238,8 @@ public class Patient30_50 { VersionConvertor_30_50.copyElement(src, tgt); if (src.hasLanguage()) tgt.setLanguage(VersionConvertor_30_50.convertCodeableConcept(src.getLanguage())); - if (src.hasPreferred()) - tgt.setPreferred(src.getPreferred()); + if (src.hasPreferredElement()) + tgt.setPreferredElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_50.convertType(src.getPreferredElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/PaymentNotice30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/PaymentNotice30_50.java index 4a3844ffb..507f9e5e8 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/PaymentNotice30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/PaymentNotice30_50.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_50; import org.hl7.fhir.convertors.VersionConvertor_30_50; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class PaymentNotice30_50 { @@ -21,8 +22,8 @@ public class PaymentNotice30_50 { tgt.setResponse(VersionConvertor_30_50.convertReference(src.getResponse())); if (src.hasPaymentDate()) tgt.setStatusDate(src.getPaymentDate()); - if (src.hasCreated()) - tgt.setCreated(src.getCreated()); + if (src.hasCreatedElement()) + tgt.setCreatedElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_30_50.convertType(src.getCreatedElement())); if (src.hasRecipient()) tgt.setTarget(VersionConvertor_30_50.convertReference(src.getRecipient())); if (src.hasProvider()) @@ -48,8 +49,8 @@ public class PaymentNotice30_50 { tgt.setResponse(VersionConvertor_30_50.convertReference(src.getResponse())); if (src.hasStatusDate()) tgt.setPaymentDate(src.getStatusDate()); - if (src.hasCreated()) - tgt.setCreated(src.getCreated()); + if (src.hasCreatedElement()) + tgt.setCreatedElement((org.hl7.fhir.r5.model.DateTimeType) VersionConvertor_30_50.convertType(src.getCreatedElement())); if (src.hasTarget()) tgt.setRecipient(VersionConvertor_30_50.convertReference(src.getTarget())); if (src.hasProvider()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Person30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Person30_50.java index 286aa3dd8..393e811e1 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Person30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Person30_50.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_50; import org.hl7.fhir.convertors.VersionConvertor_30_50; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Person30_50 { @@ -55,8 +56,8 @@ public class Person30_50 { } if (src.hasGender()) tgt.setGender(VersionConvertor_30_50.convertAdministrativeGender(src.getGender())); - if (src.hasBirthDate()) - tgt.setBirthDate(src.getBirthDate()); + if (src.hasBirthDateElement()) + tgt.setBirthDateElement((org.hl7.fhir.dstu3.model.DateType) VersionConvertor_30_50.convertType(src.getBirthDateElement())); if (src.hasAddress()) { for (org.hl7.fhir.r5.model.Address t : src.getAddress()) tgt.addAddress(VersionConvertor_30_50.convertAddress(t)); } @@ -64,8 +65,8 @@ public class Person30_50 { tgt.setPhoto(VersionConvertor_30_50.convertAttachment(src.getPhoto())); if (src.hasManagingOrganization()) tgt.setManagingOrganization(VersionConvertor_30_50.convertReference(src.getManagingOrganization())); - if (src.hasActive()) - tgt.setActive(src.getActive()); + if (src.hasActiveElement()) + tgt.setActiveElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_50.convertType(src.getActiveElement())); if (src.hasLink()) { for (org.hl7.fhir.r5.model.Person.PersonLinkComponent t : src.getLink()) tgt.addLink(convertPersonLinkComponent(t)); } @@ -88,8 +89,8 @@ public class Person30_50 { } if (src.hasGender()) tgt.setGender(VersionConvertor_30_50.convertAdministrativeGender(src.getGender())); - if (src.hasBirthDate()) - tgt.setBirthDate(src.getBirthDate()); + if (src.hasBirthDateElement()) + tgt.setBirthDateElement((org.hl7.fhir.r5.model.DateType) VersionConvertor_30_50.convertType(src.getBirthDateElement())); if (src.hasAddress()) { for (org.hl7.fhir.dstu3.model.Address t : src.getAddress()) tgt.addAddress(VersionConvertor_30_50.convertAddress(t)); } @@ -97,8 +98,8 @@ public class Person30_50 { tgt.setPhoto(VersionConvertor_30_50.convertAttachment(src.getPhoto())); if (src.hasManagingOrganization()) tgt.setManagingOrganization(VersionConvertor_30_50.convertReference(src.getManagingOrganization())); - if (src.hasActive()) - tgt.setActive(src.getActive()); + if (src.hasActiveElement()) + tgt.setActiveElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_30_50.convertType(src.getActiveElement())); if (src.hasLink()) { for (org.hl7.fhir.dstu3.model.Person.PersonLinkComponent t : src.getLink()) tgt.addLink(convertPersonLinkComponent(t)); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/PlanDefinition30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/PlanDefinition30_50.java index e4a492296..28137e5fe 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/PlanDefinition30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/PlanDefinition30_50.java @@ -4,6 +4,10 @@ import org.hl7.fhir.convertors.VersionConvertor_30_50; import org.hl7.fhir.dstu3.model.ContactDetail; import org.hl7.fhir.dstu3.model.Contributor.ContributorType; import org.hl7.fhir.exceptions.FHIRException; +import org.hl7.fhir.r5.model.CodeType; +import org.hl7.fhir.r5.model.StringType; + +import java.util.Collections; public class PlanDefinition30_50 { @@ -280,37 +284,37 @@ public class PlanDefinition30_50 { return null; org.hl7.fhir.dstu3.model.PlanDefinition tgt = new org.hl7.fhir.dstu3.model.PlanDefinition(); VersionConvertor_30_50.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_50.convertType(src.getUrlElement())); if (src.hasIdentifier()) { for (org.hl7.fhir.r5.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_30_50.convertIdentifier(t)); } - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getNameElement())); + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getTitleElement())); if (src.hasType()) tgt.setType(VersionConvertor_30_50.convertCodeableConcept(src.getType())); if (src.hasStatus()) tgt.setStatus(VersionConvertor_30_50.convertPublicationStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - if (src.hasPurpose()) - tgt.setPurpose(src.getPurpose()); - if (src.hasUsage()) - tgt.setUsage(src.getUsage()); - if (src.hasApprovalDate()) - tgt.setApprovalDate(src.getApprovalDate()); - if (src.hasLastReviewDate()) - tgt.setLastReviewDate(src.getLastReviewDate()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_50.convertType(src.getExperimentalElement())); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_30_50.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getPublisherElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); + if (src.hasPurposeElement()) + tgt.setPurposeElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_50.convertType(src.getPurposeElement())); + if (src.hasUsageElement()) + tgt.setUsageElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getUsageElement())); + if (src.hasApprovalDateElement()) + tgt.setApprovalDateElement((org.hl7.fhir.dstu3.model.DateType) VersionConvertor_30_50.convertType(src.getApprovalDateElement())); + if (src.hasLastReviewDateElement()) + tgt.setLastReviewDateElement((org.hl7.fhir.dstu3.model.DateType) VersionConvertor_30_50.convertType(src.getLastReviewDateElement())); if (src.hasEffectivePeriod()) tgt.setEffectivePeriod(VersionConvertor_30_50.convertPeriod(src.getEffectivePeriod())); if (src.hasUseContext()) { @@ -349,8 +353,8 @@ public class PlanDefinition30_50 { if (src.hasContact()) { for (org.hl7.fhir.r5.model.ContactDetail t : src.getContact()) tgt.addContact(VersionConvertor_30_50.convertContactDetail(t)); } - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_50.convertType(src.getCopyrightElement())); if (src.hasRelatedArtifact()) { for (org.hl7.fhir.r5.model.RelatedArtifact t : src.getRelatedArtifact()) tgt.addRelatedArtifact(VersionConvertor_30_50.convertRelatedArtifact(t)); } @@ -371,37 +375,37 @@ public class PlanDefinition30_50 { return null; org.hl7.fhir.r5.model.PlanDefinition tgt = new org.hl7.fhir.r5.model.PlanDefinition(); VersionConvertor_30_50.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r5.model.UriType) VersionConvertor_30_50.convertType(src.getUrlElement())); if (src.hasIdentifier()) { for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_30_50.convertIdentifier(t)); } - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getNameElement())); + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getTitleElement())); if (src.hasType()) tgt.setType(VersionConvertor_30_50.convertCodeableConcept(src.getType())); if (src.hasStatus()) tgt.setStatus(VersionConvertor_30_50.convertPublicationStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - if (src.hasPurpose()) - tgt.setPurpose(src.getPurpose()); - if (src.hasUsage()) - tgt.setUsage(src.getUsage()); - if (src.hasApprovalDate()) - tgt.setApprovalDate(src.getApprovalDate()); - if (src.hasLastReviewDate()) - tgt.setLastReviewDate(src.getLastReviewDate()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_30_50.convertType(src.getExperimentalElement())); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.r5.model.DateTimeType) VersionConvertor_30_50.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getPublisherElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r5.model.MarkdownType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); + if (src.hasPurposeElement()) + tgt.setPurposeElement((org.hl7.fhir.r5.model.MarkdownType) VersionConvertor_30_50.convertType(src.getPurposeElement())); + if (src.hasUsageElement()) + tgt.setUsageElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getUsageElement())); + if (src.hasApprovalDateElement()) + tgt.setApprovalDateElement((org.hl7.fhir.r5.model.DateType) VersionConvertor_30_50.convertType(src.getApprovalDateElement())); + if (src.hasLastReviewDateElement()) + tgt.setLastReviewDateElement((org.hl7.fhir.r5.model.DateType) VersionConvertor_30_50.convertType(src.getLastReviewDateElement())); if (src.hasEffectivePeriod()) tgt.setEffectivePeriod(VersionConvertor_30_50.convertPeriod(src.getEffectivePeriod())); if (src.hasUseContext()) { @@ -426,8 +430,8 @@ public class PlanDefinition30_50 { if (src.hasContact()) { for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) tgt.addContact(VersionConvertor_30_50.convertContactDetail(t)); } - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.r5.model.MarkdownType) VersionConvertor_30_50.convertType(src.getCopyrightElement())); if (src.hasRelatedArtifact()) { for (org.hl7.fhir.dstu3.model.RelatedArtifact t : src.getRelatedArtifact()) tgt.addRelatedArtifact(VersionConvertor_30_50.convertRelatedArtifact(t)); } @@ -450,12 +454,12 @@ public class PlanDefinition30_50 { VersionConvertor_30_50.copyElement(src, tgt); if (src.hasLabel()) tgt.setPrefix(src.getLabel()); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - if (src.hasTextEquivalent()) - tgt.setTextEquivalent(src.getTextEquivalent()); + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getTitleElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); + if (src.hasTextEquivalentElement()) + tgt.setTextEquivalentElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getTextEquivalentElement())); if (src.hasCode()) { for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getCode()) tgt.addCode(VersionConvertor_30_50.convertCodeableConcept(t)); } @@ -520,12 +524,12 @@ public class PlanDefinition30_50 { VersionConvertor_30_50.copyElement(src, tgt); if (src.hasPrefix()) tgt.setLabel(src.getPrefix()); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - if (src.hasTextEquivalent()) - tgt.setTextEquivalent(src.getTextEquivalent()); + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getTitleElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); + if (src.hasTextEquivalentElement()) + tgt.setTextEquivalentElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getTextEquivalentElement())); if (src.hasCode()) { for (org.hl7.fhir.r5.model.CodeableConcept t : src.getCode()) tgt.addCode(VersionConvertor_30_50.convertCodeableConcept(t)); } @@ -590,12 +594,12 @@ public class PlanDefinition30_50 { VersionConvertor_30_50.copyElement(src, tgt); if (src.hasKind()) tgt.setKind(convertActionConditionKind(src.getKind())); - if (src.hasDescription()) - tgt.getExpression().setDescription(src.getDescription()); - if (src.hasLanguage()) - tgt.getExpression().setLanguage(src.getLanguage()); - if (src.hasExpression()) - tgt.getExpression().setExpression(src.getExpression()); + if (src.hasDescriptionElement()) + tgt.getExpression().setDescriptionElement((StringType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); + if (src.hasLanguageElement()) + tgt.getExpression().setLanguageElement((CodeType) VersionConvertor_30_50.convertType(src.getLanguageElement())); + if (src.hasExpressionElement()) + tgt.getExpression().setExpressionElement((StringType) VersionConvertor_30_50.convertType(src.getExpressionElement())); return tgt; } @@ -606,12 +610,12 @@ public class PlanDefinition30_50 { VersionConvertor_30_50.copyElement(src, tgt); if (src.hasKind()) tgt.setKind(convertActionConditionKind(src.getKind())); - if (src.getExpression().hasDescription()) - tgt.setDescription(src.getExpression().getDescription()); - if (src.getExpression().hasLanguage()) - tgt.setLanguage(src.getExpression().getLanguage()); - if (src.getExpression().hasExpression()) - tgt.setExpression(src.getExpression().getExpression()); + if (src.getExpression().hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getExpression().getDescriptionElement())); + if (src.getExpression().hasLanguageElement()) + tgt.setLanguageElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getExpression().getLanguageElement())); + if (src.getExpression().hasExpressionElement()) + tgt.setExpressionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getExpression().getExpressionElement())); return tgt; } @@ -620,14 +624,14 @@ public class PlanDefinition30_50 { return null; org.hl7.fhir.dstu3.model.PlanDefinition.PlanDefinitionActionDynamicValueComponent tgt = new org.hl7.fhir.dstu3.model.PlanDefinition.PlanDefinitionActionDynamicValueComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.getExpression().hasDescription()) - tgt.setDescription(src.getExpression().getDescription()); - if (src.hasPath()) - tgt.setPath(src.getPath()); - if (src.getExpression().hasLanguage()) - tgt.setLanguage(src.getExpression().getLanguage()); - if (src.getExpression().hasExpression()) - tgt.setExpression(src.getExpression().getExpression()); + if (src.getExpression().hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getExpression().getDescriptionElement())); + if (src.hasPathElement()) + tgt.setPathElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getPathElement())); + if (src.getExpression().hasLanguageElement()) + tgt.setLanguageElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getExpression().getLanguageElement())); + if (src.getExpression().hasExpressionElement()) + tgt.setExpressionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getExpression().getExpressionElement())); return tgt; } @@ -636,14 +640,14 @@ public class PlanDefinition30_50 { return null; org.hl7.fhir.r5.model.PlanDefinition.PlanDefinitionActionDynamicValueComponent tgt = new org.hl7.fhir.r5.model.PlanDefinition.PlanDefinitionActionDynamicValueComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasDescription()) - tgt.getExpression().setDescription(src.getDescription()); - if (src.hasPath()) - tgt.setPath(src.getPath()); - if (src.hasLanguage()) - tgt.getExpression().setLanguage(src.getLanguage()); - if (src.hasExpression()) - tgt.getExpression().setExpression(src.getExpression()); + if (src.hasDescriptionElement()) + tgt.getExpression().setDescriptionElement((StringType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); + if (src.hasPathElement()) + tgt.setPathElement((StringType) VersionConvertor_30_50.convertType(src.getPathElement())); + if (src.hasLanguageElement()) + tgt.getExpression().setLanguageElement((CodeType) VersionConvertor_30_50.convertType(src.getLanguageElement())); + if (src.hasExpressionElement()) + tgt.getExpression().setExpressionElement((StringType) VersionConvertor_30_50.convertType(src.getExpressionElement())); return tgt; } @@ -676,8 +680,8 @@ public class PlanDefinition30_50 { return null; org.hl7.fhir.dstu3.model.PlanDefinition.PlanDefinitionActionRelatedActionComponent tgt = new org.hl7.fhir.dstu3.model.PlanDefinition.PlanDefinitionActionRelatedActionComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasActionId()) - tgt.setActionId(src.getActionId()); + if (src.hasActionIdElement()) + tgt.setActionIdElement((org.hl7.fhir.dstu3.model.IdType) VersionConvertor_30_50.convertType(src.getActionIdElement())); if (src.hasRelationship()) tgt.setRelationship(convertActionRelationshipType(src.getRelationship())); if (src.hasOffset()) @@ -690,8 +694,8 @@ public class PlanDefinition30_50 { return null; org.hl7.fhir.r5.model.PlanDefinition.PlanDefinitionActionRelatedActionComponent tgt = new org.hl7.fhir.r5.model.PlanDefinition.PlanDefinitionActionRelatedActionComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasActionId()) - tgt.setActionId(src.getActionId()); + if (src.hasActionIdElement()) + tgt.setActionIdElement((org.hl7.fhir.r5.model.IdType) VersionConvertor_30_50.convertType(src.getActionIdElement())); if (src.hasRelationship()) tgt.setRelationship(convertActionRelationshipType(src.getRelationship())); if (src.hasOffset()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Practitioner30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Practitioner30_50.java index f020e55eb..9c8c20398 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Practitioner30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Practitioner30_50.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_50; import org.hl7.fhir.convertors.VersionConvertor_30_50; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Practitioner30_50 { @@ -13,8 +14,8 @@ public class Practitioner30_50 { if (src.hasIdentifier()) { for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_30_50.convertIdentifier(t)); } - if (src.hasActive()) - tgt.setActive(src.getActive()); + if (src.hasActiveElement()) + tgt.setActiveElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_30_50.convertType(src.getActiveElement())); if (src.hasName()) { for (org.hl7.fhir.dstu3.model.HumanName t : src.getName()) tgt.addName(VersionConvertor_30_50.convertHumanName(t)); } @@ -26,8 +27,8 @@ public class Practitioner30_50 { } if (src.hasGender()) tgt.setGender(VersionConvertor_30_50.convertAdministrativeGender(src.getGender())); - if (src.hasBirthDate()) - tgt.setBirthDate(src.getBirthDate()); + if (src.hasBirthDateElement()) + tgt.setBirthDateElement((org.hl7.fhir.r5.model.DateType) VersionConvertor_30_50.convertType(src.getBirthDateElement())); if (src.hasPhoto()) { for (org.hl7.fhir.dstu3.model.Attachment t : src.getPhoto()) tgt.addPhoto(VersionConvertor_30_50.convertAttachment(t)); } @@ -48,8 +49,8 @@ public class Practitioner30_50 { if (src.hasIdentifier()) { for (org.hl7.fhir.r5.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_30_50.convertIdentifier(t)); } - if (src.hasActive()) - tgt.setActive(src.getActive()); + if (src.hasActiveElement()) + tgt.setActiveElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_50.convertType(src.getActiveElement())); if (src.hasName()) { for (org.hl7.fhir.r5.model.HumanName t : src.getName()) tgt.addName(VersionConvertor_30_50.convertHumanName(t)); } @@ -61,8 +62,8 @@ public class Practitioner30_50 { } if (src.hasGender()) tgt.setGender(VersionConvertor_30_50.convertAdministrativeGender(src.getGender())); - if (src.hasBirthDate()) - tgt.setBirthDate(src.getBirthDate()); + if (src.hasBirthDateElement()) + tgt.setBirthDateElement((org.hl7.fhir.dstu3.model.DateType) VersionConvertor_30_50.convertType(src.getBirthDateElement())); if (src.hasPhoto()) { for (org.hl7.fhir.r5.model.Attachment t : src.getPhoto()) tgt.addPhoto(VersionConvertor_30_50.convertAttachment(t)); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/PractitionerRole30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/PractitionerRole30_50.java index 8e52842c5..ba3a9aea7 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/PractitionerRole30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/PractitionerRole30_50.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_50; import org.hl7.fhir.convertors.VersionConvertor_30_50; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class PractitionerRole30_50 { @@ -36,8 +37,8 @@ public class PractitionerRole30_50 { if (src.hasIdentifier()) { for (org.hl7.fhir.r5.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_30_50.convertIdentifier(t)); } - if (src.hasActive()) - tgt.setActive(src.getActive()); + if (src.hasActiveElement()) + tgt.setActiveElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_50.convertType(src.getActiveElement())); if (src.hasPeriod()) tgt.setPeriod(VersionConvertor_30_50.convertPeriod(src.getPeriod())); if (src.hasPractitioner()) @@ -65,8 +66,8 @@ public class PractitionerRole30_50 { if (src.hasNotAvailable()) { for (org.hl7.fhir.r5.model.PractitionerRole.PractitionerRoleNotAvailableComponent t : src.getNotAvailable()) tgt.addNotAvailable(convertPractitionerRoleNotAvailableComponent(t)); } - if (src.hasAvailabilityExceptions()) - tgt.setAvailabilityExceptions(src.getAvailabilityExceptions()); + if (src.hasAvailabilityExceptionsElement()) + tgt.setAvailabilityExceptionsElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getAvailabilityExceptionsElement())); if (src.hasEndpoint()) { for (org.hl7.fhir.r5.model.Reference t : src.getEndpoint()) tgt.addEndpoint(VersionConvertor_30_50.convertReference(t)); } @@ -81,8 +82,8 @@ public class PractitionerRole30_50 { if (src.hasIdentifier()) { for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_30_50.convertIdentifier(t)); } - if (src.hasActive()) - tgt.setActive(src.getActive()); + if (src.hasActiveElement()) + tgt.setActiveElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_30_50.convertType(src.getActiveElement())); if (src.hasPeriod()) tgt.setPeriod(VersionConvertor_30_50.convertPeriod(src.getPeriod())); if (src.hasPractitioner()) @@ -110,8 +111,8 @@ public class PractitionerRole30_50 { if (src.hasNotAvailable()) { for (org.hl7.fhir.dstu3.model.PractitionerRole.PractitionerRoleNotAvailableComponent t : src.getNotAvailable()) tgt.addNotAvailable(convertPractitionerRoleNotAvailableComponent(t)); } - if (src.hasAvailabilityExceptions()) - tgt.setAvailabilityExceptions(src.getAvailabilityExceptions()); + if (src.hasAvailabilityExceptionsElement()) + tgt.setAvailabilityExceptionsElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getAvailabilityExceptionsElement())); if (src.hasEndpoint()) { for (org.hl7.fhir.dstu3.model.Reference t : src.getEndpoint()) tgt.addEndpoint(VersionConvertor_30_50.convertReference(t)); } @@ -126,12 +127,12 @@ public class PractitionerRole30_50 { if (src.hasDaysOfWeek()) { for (org.hl7.fhir.r5.model.Enumeration t : src.getDaysOfWeek()) VersionConvertor_30_50.copyElement(t, tgt.addDaysOfWeekElement().setValue(convertDaysOfWeek2(t.getValue()))); } - if (src.hasAllDay()) - tgt.setAllDay(src.getAllDay()); - if (src.hasAvailableStartTime()) - tgt.setAvailableStartTime(src.getAvailableStartTime()); - if (src.hasAvailableEndTime()) - tgt.setAvailableEndTime(src.getAvailableEndTime()); + if (src.hasAllDayElement()) + tgt.setAllDayElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_50.convertType(src.getAllDayElement())); + if (src.hasAvailableStartTimeElement()) + tgt.setAvailableStartTimeElement((org.hl7.fhir.dstu3.model.TimeType) VersionConvertor_30_50.convertType(src.getAvailableStartTimeElement())); + if (src.hasAvailableEndTimeElement()) + tgt.setAvailableEndTimeElement((org.hl7.fhir.dstu3.model.TimeType) VersionConvertor_30_50.convertType(src.getAvailableEndTimeElement())); return tgt; } @@ -143,12 +144,12 @@ public class PractitionerRole30_50 { if (src.hasDaysOfWeek()) { for (org.hl7.fhir.dstu3.model.Enumeration t : src.getDaysOfWeek()) VersionConvertor_30_50.copyElement(t, tgt.addDaysOfWeekElement().setValue(VersionConvertor_30_50.convertDaysOfWeek(t.getValue()))); } - if (src.hasAllDay()) - tgt.setAllDay(src.getAllDay()); - if (src.hasAvailableStartTime()) - tgt.setAvailableStartTime(src.getAvailableStartTime()); - if (src.hasAvailableEndTime()) - tgt.setAvailableEndTime(src.getAvailableEndTime()); + if (src.hasAllDayElement()) + tgt.setAllDayElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_30_50.convertType(src.getAllDayElement())); + if (src.hasAvailableStartTimeElement()) + tgt.setAvailableStartTimeElement((org.hl7.fhir.r5.model.TimeType) VersionConvertor_30_50.convertType(src.getAvailableStartTimeElement())); + if (src.hasAvailableEndTimeElement()) + tgt.setAvailableEndTimeElement((org.hl7.fhir.r5.model.TimeType) VersionConvertor_30_50.convertType(src.getAvailableEndTimeElement())); return tgt; } @@ -157,8 +158,8 @@ public class PractitionerRole30_50 { return null; org.hl7.fhir.dstu3.model.PractitionerRole.PractitionerRoleNotAvailableComponent tgt = new org.hl7.fhir.dstu3.model.PractitionerRole.PractitionerRoleNotAvailableComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); if (src.hasDuring()) tgt.setDuring(VersionConvertor_30_50.convertPeriod(src.getDuring())); return tgt; @@ -169,8 +170,8 @@ public class PractitionerRole30_50 { return null; org.hl7.fhir.r5.model.PractitionerRole.PractitionerRoleNotAvailableComponent tgt = new org.hl7.fhir.r5.model.PractitionerRole.PractitionerRoleNotAvailableComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); if (src.hasDuring()) tgt.setDuring(VersionConvertor_30_50.convertPeriod(src.getDuring())); return tgt; diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Questionnaire30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Questionnaire30_50.java index cad6c5685..8a07aad3c 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Questionnaire30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Questionnaire30_50.java @@ -3,6 +3,7 @@ package org.hl7.fhir.convertors.conv30_50; import org.hl7.fhir.convertors.VersionConvertor_30_50; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r5.model.Questionnaire; +import java.util.Collections; public class Questionnaire30_50 { @@ -11,33 +12,33 @@ public class Questionnaire30_50 { return null; org.hl7.fhir.r5.model.Questionnaire tgt = new org.hl7.fhir.r5.model.Questionnaire(); VersionConvertor_30_50.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r5.model.UriType) VersionConvertor_30_50.convertType(src.getUrlElement())); if (src.hasIdentifier()) { for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_30_50.convertIdentifier(t)); } - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getNameElement())); + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getTitleElement())); if (src.hasStatus()) tgt.setStatus(VersionConvertor_30_50.convertPublicationStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - if (src.hasPurpose()) - tgt.setPurpose(src.getPurpose()); - if (src.hasApprovalDate()) - tgt.setApprovalDate(src.getApprovalDate()); - if (src.hasLastReviewDate()) - tgt.setLastReviewDate(src.getLastReviewDate()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_30_50.convertType(src.getExperimentalElement())); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.r5.model.DateTimeType) VersionConvertor_30_50.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getPublisherElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r5.model.MarkdownType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); + if (src.hasPurposeElement()) + tgt.setPurposeElement((org.hl7.fhir.r5.model.MarkdownType) VersionConvertor_30_50.convertType(src.getPurposeElement())); + if (src.hasApprovalDateElement()) + tgt.setApprovalDateElement((org.hl7.fhir.r5.model.DateType) VersionConvertor_30_50.convertType(src.getApprovalDateElement())); + if (src.hasLastReviewDateElement()) + tgt.setLastReviewDateElement((org.hl7.fhir.r5.model.DateType) VersionConvertor_30_50.convertType(src.getLastReviewDateElement())); if (src.hasEffectivePeriod()) tgt.setEffectivePeriod(VersionConvertor_30_50.convertPeriod(src.getEffectivePeriod())); if (src.hasUseContext()) { @@ -49,8 +50,8 @@ public class Questionnaire30_50 { if (src.hasContact()) { for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) tgt.addContact(VersionConvertor_30_50.convertContactDetail(t)); } - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.r5.model.MarkdownType) VersionConvertor_30_50.convertType(src.getCopyrightElement())); if (src.hasCode()) { for (org.hl7.fhir.dstu3.model.Coding t : src.getCode()) tgt.addCode(VersionConvertor_30_50.convertCoding(t)); } @@ -68,33 +69,33 @@ public class Questionnaire30_50 { return null; org.hl7.fhir.dstu3.model.Questionnaire tgt = new org.hl7.fhir.dstu3.model.Questionnaire(); VersionConvertor_30_50.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_50.convertType(src.getUrlElement())); if (src.hasIdentifier()) { for (org.hl7.fhir.r5.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_30_50.convertIdentifier(t)); } - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getNameElement())); + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getTitleElement())); if (src.hasStatus()) tgt.setStatus(VersionConvertor_30_50.convertPublicationStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - if (src.hasPurpose()) - tgt.setPurpose(src.getPurpose()); - if (src.hasApprovalDate()) - tgt.setApprovalDate(src.getApprovalDate()); - if (src.hasLastReviewDate()) - tgt.setLastReviewDate(src.getLastReviewDate()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_50.convertType(src.getExperimentalElement())); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_30_50.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getPublisherElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); + if (src.hasPurposeElement()) + tgt.setPurposeElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_50.convertType(src.getPurposeElement())); + if (src.hasApprovalDateElement()) + tgt.setApprovalDateElement((org.hl7.fhir.dstu3.model.DateType) VersionConvertor_30_50.convertType(src.getApprovalDateElement())); + if (src.hasLastReviewDateElement()) + tgt.setLastReviewDateElement((org.hl7.fhir.dstu3.model.DateType) VersionConvertor_30_50.convertType(src.getLastReviewDateElement())); if (src.hasEffectivePeriod()) tgt.setEffectivePeriod(VersionConvertor_30_50.convertPeriod(src.getEffectivePeriod())); if (src.hasUseContext()) { @@ -106,8 +107,8 @@ public class Questionnaire30_50 { if (src.hasContact()) { for (org.hl7.fhir.r5.model.ContactDetail t : src.getContact()) tgt.addContact(VersionConvertor_30_50.convertContactDetail(t)); } - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_50.convertType(src.getCopyrightElement())); if (src.hasCode()) { for (org.hl7.fhir.r5.model.Coding t : src.getCode()) tgt.addCode(VersionConvertor_30_50.convertCoding(t)); } @@ -125,30 +126,30 @@ public class Questionnaire30_50 { return null; org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemComponent tgt = new org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasLinkId()) - tgt.setLinkId(src.getLinkId()); - if (src.hasDefinition()) - tgt.setDefinition(src.getDefinition()); + if (src.hasLinkIdElement()) + tgt.setLinkIdElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getLinkIdElement())); + if (src.hasDefinitionElement()) + tgt.setDefinitionElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_50.convertType(src.getDefinitionElement())); if (src.hasCode()) { for (org.hl7.fhir.r5.model.Coding t : src.getCode()) tgt.addCode(VersionConvertor_30_50.convertCoding(t)); } - if (src.hasPrefix()) - tgt.setPrefix(src.getPrefix()); - if (src.hasText()) - tgt.setText(src.getText()); + if (src.hasPrefixElement()) + tgt.setPrefixElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getPrefixElement())); + if (src.hasTextElement()) + tgt.setTextElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getTextElement())); if (src.hasType()) tgt.setType(convertQuestionnaireItemType(src.getType())); if (src.hasEnableWhen()) { for (org.hl7.fhir.r5.model.Questionnaire.QuestionnaireItemEnableWhenComponent t : src.getEnableWhen()) tgt.addEnableWhen(convertQuestionnaireItemEnableWhenComponent(t)); } - if (src.hasRequired()) - tgt.setRequired(src.getRequired()); - if (src.hasRepeats()) - tgt.setRepeats(src.getRepeats()); - if (src.hasReadOnly()) - tgt.setReadOnly(src.getReadOnly()); - if (src.hasMaxLength()) - tgt.setMaxLength(src.getMaxLength()); + if (src.hasRequiredElement()) + tgt.setRequiredElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_50.convertType(src.getRequiredElement())); + if (src.hasRepeatsElement()) + tgt.setRepeatsElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_50.convertType(src.getRepeatsElement())); + if (src.hasReadOnlyElement()) + tgt.setReadOnlyElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_50.convertType(src.getReadOnlyElement())); + if (src.hasMaxLengthElement()) + tgt.setMaxLengthElement((org.hl7.fhir.dstu3.model.IntegerType) VersionConvertor_30_50.convertType(src.getMaxLengthElement())); if (src.hasAnswerValueSet()) tgt.setOptions(VersionConvertor_30_50.convertCanonicalToReference(src.getAnswerValueSetElement())); if (src.hasAnswerOption()) { @@ -167,31 +168,31 @@ public class Questionnaire30_50 { return null; org.hl7.fhir.r5.model.Questionnaire.QuestionnaireItemComponent tgt = new org.hl7.fhir.r5.model.Questionnaire.QuestionnaireItemComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasLinkId()) - tgt.setLinkId(src.getLinkId()); - if (src.hasDefinition()) - tgt.setDefinition(src.getDefinition()); + if (src.hasLinkIdElement()) + tgt.setLinkIdElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getLinkIdElement())); + if (src.hasDefinitionElement()) + tgt.setDefinitionElement((org.hl7.fhir.r5.model.UriType) VersionConvertor_30_50.convertType(src.getDefinitionElement())); if (src.hasCode()) { for (org.hl7.fhir.dstu3.model.Coding t : src.getCode()) tgt.addCode(VersionConvertor_30_50.convertCoding(t)); } - if (src.hasPrefix()) - tgt.setPrefix(src.getPrefix()); - if (src.hasText()) - tgt.setText(src.getText()); + if (src.hasPrefixElement()) + tgt.setPrefixElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getPrefixElement())); + if (src.hasTextElement()) + tgt.setTextElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getTextElement())); if (src.hasType()) tgt.setType(convertQuestionnaireItemType(src.getType())); if (src.hasEnableWhen()) { for (org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemEnableWhenComponent t : src.getEnableWhen()) tgt.addEnableWhen(convertQuestionnaireItemEnableWhenComponent(t)); } tgt.setEnableBehavior(Questionnaire.EnableWhenBehavior.ANY); - if (src.hasRequired()) - tgt.setRequired(src.getRequired()); - if (src.hasRepeats()) - tgt.setRepeats(src.getRepeats()); - if (src.hasReadOnly()) - tgt.setReadOnly(src.getReadOnly()); - if (src.hasMaxLength()) - tgt.setMaxLength(src.getMaxLength()); + if (src.hasRequiredElement()) + tgt.setRequiredElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_30_50.convertType(src.getRequiredElement())); + if (src.hasRepeatsElement()) + tgt.setRepeatsElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_30_50.convertType(src.getRepeatsElement())); + if (src.hasReadOnlyElement()) + tgt.setReadOnlyElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_30_50.convertType(src.getReadOnlyElement())); + if (src.hasMaxLengthElement()) + tgt.setMaxLengthElement((org.hl7.fhir.r5.model.IntegerType) VersionConvertor_30_50.convertType(src.getMaxLengthElement())); if (src.hasOptions()) tgt.setAnswerValueSetElement(VersionConvertor_30_50.convertReferenceToCanonical(src.getOptions())); if (src.hasOption()) { @@ -213,8 +214,8 @@ public class Questionnaire30_50 { return null; org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemEnableWhenComponent tgt = new org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemEnableWhenComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasQuestion()) - tgt.setQuestion(src.getQuestion()); + if (src.hasQuestionElement()) + tgt.setQuestionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getQuestionElement())); if (src.hasOperator() && src.getOperator() == org.hl7.fhir.r5.model.Questionnaire.QuestionnaireItemOperator.EXISTS) tgt.setHasAnswer(src.getAnswerBooleanType().getValue()); else if (src.hasAnswer()) @@ -227,8 +228,8 @@ public class Questionnaire30_50 { return null; org.hl7.fhir.r5.model.Questionnaire.QuestionnaireItemEnableWhenComponent tgt = new org.hl7.fhir.r5.model.Questionnaire.QuestionnaireItemEnableWhenComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasQuestion()) - tgt.setQuestion(src.getQuestion()); + if (src.hasQuestionElement()) + tgt.setQuestionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getQuestionElement())); if (src.hasHasAnswer()) { tgt.setOperator(org.hl7.fhir.r5.model.Questionnaire.QuestionnaireItemOperator.EXISTS); if (src.hasHasAnswerElement()) { diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/QuestionnaireResponse30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/QuestionnaireResponse30_50.java index c3d56a30d..07b107e70 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/QuestionnaireResponse30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/QuestionnaireResponse30_50.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_50; import org.hl7.fhir.convertors.VersionConvertor_30_50; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class QuestionnaireResponse30_50 { @@ -26,8 +27,8 @@ public class QuestionnaireResponse30_50 { tgt.setSubject(VersionConvertor_30_50.convertReference(src.getSubject())); if (src.hasContext()) tgt.setEncounter(VersionConvertor_30_50.convertReference(src.getContext())); - if (src.hasAuthored()) - tgt.setAuthored(src.getAuthored()); + if (src.hasAuthoredElement()) + tgt.setAuthoredElement((org.hl7.fhir.r5.model.DateTimeType) VersionConvertor_30_50.convertType(src.getAuthoredElement())); if (src.hasAuthor()) tgt.setAuthor(VersionConvertor_30_50.convertReference(src.getAuthor())); if (src.hasSource()) @@ -59,8 +60,8 @@ public class QuestionnaireResponse30_50 { tgt.setSubject(VersionConvertor_30_50.convertReference(src.getSubject())); if (src.hasEncounter()) tgt.setContext(VersionConvertor_30_50.convertReference(src.getEncounter())); - if (src.hasAuthored()) - tgt.setAuthored(src.getAuthored()); + if (src.hasAuthoredElement()) + tgt.setAuthoredElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_30_50.convertType(src.getAuthoredElement())); if (src.hasAuthor()) tgt.setAuthor(VersionConvertor_30_50.convertReference(src.getAuthor())); if (src.hasSource()) @@ -102,12 +103,12 @@ public class QuestionnaireResponse30_50 { return null; org.hl7.fhir.r5.model.QuestionnaireResponse.QuestionnaireResponseItemComponent tgt = new org.hl7.fhir.r5.model.QuestionnaireResponse.QuestionnaireResponseItemComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasLinkId()) - tgt.setLinkId(src.getLinkId()); - if (src.hasDefinition()) - tgt.setDefinition(src.getDefinition()); - if (src.hasText()) - tgt.setText(src.getText()); + if (src.hasLinkIdElement()) + tgt.setLinkIdElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getLinkIdElement())); + if (src.hasDefinitionElement()) + tgt.setDefinitionElement((org.hl7.fhir.r5.model.UriType) VersionConvertor_30_50.convertType(src.getDefinitionElement())); + if (src.hasTextElement()) + tgt.setTextElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getTextElement())); if (src.hasAnswer()) { for (org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent t : src.getAnswer()) tgt.addAnswer(convertQuestionnaireResponseItemAnswerComponent(t)); } @@ -122,12 +123,12 @@ public class QuestionnaireResponse30_50 { return null; org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseItemComponent tgt = new org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseItemComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasLinkId()) - tgt.setLinkId(src.getLinkId()); - if (src.hasDefinition()) - tgt.setDefinition(src.getDefinition()); - if (src.hasText()) - tgt.setText(src.getText()); + if (src.hasLinkIdElement()) + tgt.setLinkIdElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getLinkIdElement())); + if (src.hasDefinitionElement()) + tgt.setDefinitionElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_50.convertType(src.getDefinitionElement())); + if (src.hasTextElement()) + tgt.setTextElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getTextElement())); if (src.hasAnswer()) { for (org.hl7.fhir.r5.model.QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent t : src.getAnswer()) tgt.addAnswer(convertQuestionnaireResponseItemAnswerComponent(t)); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/RelatedPerson30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/RelatedPerson30_50.java index a086688d9..015325dcc 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/RelatedPerson30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/RelatedPerson30_50.java @@ -3,6 +3,7 @@ package org.hl7.fhir.convertors.conv30_50; import org.hl7.fhir.convertors.VersionConvertor_30_50; import org.hl7.fhir.exceptions.FHIRException; import java.util.List; +import java.util.Collections; public class RelatedPerson30_50 { @@ -14,9 +15,8 @@ public class RelatedPerson30_50 { for (org.hl7.fhir.r5.model.Identifier t : src.getIdentifier()) { tgt.addIdentifier(VersionConvertor_30_50.convertIdentifier(t)); } - if (src.hasActive()) { - tgt.setActive(src.getActive()); - } + if (src.hasActiveElement()) + tgt.setActiveElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_50.convertType(src.getActiveElement())); if (src.hasPatient()) { tgt.setPatient(VersionConvertor_30_50.convertReference(src.getPatient())); } @@ -35,9 +35,8 @@ public class RelatedPerson30_50 { if (src.hasGender()) { tgt.setGender(VersionConvertor_30_50.convertAdministrativeGender(src.getGender())); } - if (src.hasBirthDate()) { - tgt.setBirthDate(tgt.getBirthDate()); - } + if (src.hasBirthDateElement()) + tgt.setBirthDateElement((org.hl7.fhir.dstu3.model.DateType) VersionConvertor_30_50.convertType(src.getBirthDateElement())); for (org.hl7.fhir.r5.model.Address t : src.getAddress()) { tgt.addAddress(VersionConvertor_30_50.convertAddress(t)); } @@ -58,20 +57,13 @@ public class RelatedPerson30_50 { for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) { tgt.addIdentifier(VersionConvertor_30_50.convertIdentifier(t)); } - if (src.hasActive()) { - if (src.hasActive()) { - tgt.setActive(src.getActive()); - } - } + if (src.hasActiveElement()) + tgt.setActiveElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_30_50.convertType(src.getActiveElement())); if (src.hasPatient()) { - if (src.hasPatient()) { - tgt.setPatient(VersionConvertor_30_50.convertReference(src.getPatient())); - } + tgt.setPatient(VersionConvertor_30_50.convertReference(src.getPatient())); } if (src.hasRelationship()) { - if (src.hasRelationship()) { - tgt.addRelationship(VersionConvertor_30_50.convertCodeableConcept(src.getRelationship())); - } + tgt.addRelationship(VersionConvertor_30_50.convertCodeableConcept(src.getRelationship())); } for (org.hl7.fhir.dstu3.model.HumanName t : src.getName()) { tgt.addName(VersionConvertor_30_50.convertHumanName(t)); @@ -80,13 +72,10 @@ public class RelatedPerson30_50 { tgt.addTelecom(VersionConvertor_30_50.convertContactPoint(t)); } if (src.hasGender()) { - if (src.hasGender()) { - tgt.setGender(VersionConvertor_30_50.convertAdministrativeGender(src.getGender())); - } - } - if (src.hasBirthDate()) { - tgt.setBirthDate(tgt.getBirthDate()); + tgt.setGender(VersionConvertor_30_50.convertAdministrativeGender(src.getGender())); } + if (src.hasBirthDateElement()) + tgt.setBirthDateElement((org.hl7.fhir.r5.model.DateType) VersionConvertor_30_50.convertType(src.getBirthDateElement())); for (org.hl7.fhir.dstu3.model.Address t : src.getAddress()) { tgt.addAddress(VersionConvertor_30_50.convertAddress(t)); } @@ -94,9 +83,7 @@ public class RelatedPerson30_50 { tgt.addPhoto(VersionConvertor_30_50.convertAttachment(t)); } if (src.hasPeriod()) { - if (src.hasPeriod()) { - tgt.setPeriod(VersionConvertor_30_50.convertPeriod(src.getPeriod())); - } + tgt.setPeriod(VersionConvertor_30_50.convertPeriod(src.getPeriod())); } return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/RiskAssessment30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/RiskAssessment30_50.java index 0306cd14e..29b09277b 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/RiskAssessment30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/RiskAssessment30_50.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_50; import org.hl7.fhir.convertors.VersionConvertor_30_50; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class RiskAssessment30_50 { @@ -44,8 +45,8 @@ public class RiskAssessment30_50 { if (src.hasPrediction()) { for (org.hl7.fhir.dstu3.model.RiskAssessment.RiskAssessmentPredictionComponent t : src.getPrediction()) tgt.addPrediction(convertRiskAssessmentPredictionComponent(t)); } - if (src.hasMitigation()) - tgt.setMitigation(src.getMitigation()); + if (src.hasMitigationElement()) + tgt.setMitigationElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getMitigationElement())); if (src.hasComment()) tgt.addNote().setText(src.getComment()); return tgt; @@ -88,8 +89,8 @@ public class RiskAssessment30_50 { if (src.hasPrediction()) { for (org.hl7.fhir.r5.model.RiskAssessment.RiskAssessmentPredictionComponent t : src.getPrediction()) tgt.addPrediction(convertRiskAssessmentPredictionComponent(t)); } - if (src.hasMitigation()) - tgt.setMitigation(src.getMitigation()); + if (src.hasMitigationElement()) + tgt.setMitigationElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getMitigationElement())); if (src.hasNote()) tgt.setComment(src.getNoteFirstRep().getText()); return tgt; @@ -106,12 +107,12 @@ public class RiskAssessment30_50 { tgt.setProbability(VersionConvertor_30_50.convertType(src.getProbability())); if (src.hasQualitativeRisk()) tgt.setQualitativeRisk(VersionConvertor_30_50.convertCodeableConcept(src.getQualitativeRisk())); - if (src.hasRelativeRisk()) - tgt.setRelativeRisk(src.getRelativeRisk()); + if (src.hasRelativeRiskElement()) + tgt.setRelativeRiskElement((org.hl7.fhir.r5.model.DecimalType) VersionConvertor_30_50.convertType(src.getRelativeRiskElement())); if (src.hasWhen()) tgt.setWhen(VersionConvertor_30_50.convertType(src.getWhen())); - if (src.hasRationale()) - tgt.setRationale(src.getRationale()); + if (src.hasRationaleElement()) + tgt.setRationaleElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getRationaleElement())); return tgt; } @@ -126,12 +127,12 @@ public class RiskAssessment30_50 { tgt.setProbability(VersionConvertor_30_50.convertType(src.getProbability())); if (src.hasQualitativeRisk()) tgt.setQualitativeRisk(VersionConvertor_30_50.convertCodeableConcept(src.getQualitativeRisk())); - if (src.hasRelativeRisk()) - tgt.setRelativeRisk(src.getRelativeRisk()); + if (src.hasRelativeRiskElement()) + tgt.setRelativeRiskElement((org.hl7.fhir.dstu3.model.DecimalType) VersionConvertor_30_50.convertType(src.getRelativeRiskElement())); if (src.hasWhen()) tgt.setWhen(VersionConvertor_30_50.convertType(src.getWhen())); - if (src.hasRationale()) - tgt.setRationale(src.getRationale()); + if (src.hasRationaleElement()) + tgt.setRationaleElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getRationaleElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Schedule30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Schedule30_50.java index c3f52e6b4..9ea04a9e1 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Schedule30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Schedule30_50.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_50; import org.hl7.fhir.convertors.VersionConvertor_30_50; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Schedule30_50 { @@ -13,8 +14,8 @@ public class Schedule30_50 { if (src.hasIdentifier()) { for (org.hl7.fhir.r5.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_30_50.convertIdentifier(t)); } - if (src.hasActive()) - tgt.setActive(src.getActive()); + if (src.hasActiveElement()) + tgt.setActiveElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_50.convertType(src.getActiveElement())); if (src.hasServiceCategory()) tgt.setServiceCategory(VersionConvertor_30_50.convertCodeableConcept(src.getServiceCategoryFirstRep())); if (src.hasServiceType()) { @@ -28,8 +29,8 @@ public class Schedule30_50 { } if (src.hasPlanningHorizon()) tgt.setPlanningHorizon(VersionConvertor_30_50.convertPeriod(src.getPlanningHorizon())); - if (src.hasComment()) - tgt.setComment(src.getComment()); + if (src.hasCommentElement()) + tgt.setCommentElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getCommentElement())); return tgt; } @@ -41,8 +42,8 @@ public class Schedule30_50 { if (src.hasIdentifier()) { for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_30_50.convertIdentifier(t)); } - if (src.hasActive()) - tgt.setActive(src.getActive()); + if (src.hasActiveElement()) + tgt.setActiveElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_30_50.convertType(src.getActiveElement())); if (src.hasServiceCategory()) tgt.addServiceCategory(VersionConvertor_30_50.convertCodeableConcept(src.getServiceCategory())); if (src.hasServiceType()) { @@ -56,8 +57,8 @@ public class Schedule30_50 { } if (src.hasPlanningHorizon()) tgt.setPlanningHorizon(VersionConvertor_30_50.convertPeriod(src.getPlanningHorizon())); - if (src.hasComment()) - tgt.setComment(src.getComment()); + if (src.hasCommentElement()) + tgt.setCommentElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getCommentElement())); return tgt; } } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/SearchParameter30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/SearchParameter30_50.java index dcdee763b..27da8003f 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/SearchParameter30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/SearchParameter30_50.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_50; import org.hl7.fhir.convertors.VersionConvertor_30_50; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class SearchParameter30_50 { @@ -122,20 +123,20 @@ public class SearchParameter30_50 { return null; org.hl7.fhir.r5.model.SearchParameter tgt = new org.hl7.fhir.r5.model.SearchParameter(); VersionConvertor_30_50.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r5.model.UriType) VersionConvertor_30_50.convertType(src.getUrlElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getNameElement())); if (src.hasStatus()) tgt.setStatus(VersionConvertor_30_50.convertPublicationStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_30_50.convertType(src.getExperimentalElement())); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.r5.model.DateTimeType) VersionConvertor_30_50.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) tgt.addContact(VersionConvertor_30_50.convertContactDetail(t)); } @@ -145,23 +146,23 @@ public class SearchParameter30_50 { if (src.hasJurisdiction()) { for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getJurisdiction()) tgt.addJurisdiction(VersionConvertor_30_50.convertCodeableConcept(t)); } - if (src.hasPurpose()) - tgt.setPurpose(src.getPurpose()); - if (src.hasCode()) - tgt.setCode(src.getCode()); + if (src.hasPurposeElement()) + tgt.setPurposeElement((org.hl7.fhir.r5.model.MarkdownType) VersionConvertor_30_50.convertType(src.getPurposeElement())); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.r5.model.CodeType) VersionConvertor_30_50.convertType(src.getCodeElement())); if (src.hasBase()) { for (org.hl7.fhir.dstu3.model.CodeType t : src.getBase()) tgt.addBase(t.getValue()); } if (src.hasType()) tgt.setType(VersionConvertor_30_50.convertSearchParamType(src.getType())); - if (src.hasDerivedFrom()) - tgt.setDerivedFrom(src.getDerivedFrom()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - if (src.hasExpression()) - tgt.setExpression(src.getExpression()); - if (src.hasXpath()) - tgt.setXpath(src.getXpath()); + if (src.hasDerivedFromElement()) + tgt.setDerivedFromElement((org.hl7.fhir.r5.model.CanonicalType) VersionConvertor_30_50.convertType(src.getDerivedFromElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r5.model.MarkdownType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); + if (src.hasExpressionElement()) + tgt.setExpressionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getExpressionElement())); + if (src.hasXpathElement()) + tgt.setXpathElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getXpathElement())); if (src.hasXpathUsage()) tgt.setXpathUsage(convertXPathUsageType(src.getXpathUsage())); if (src.hasTarget()) { @@ -187,20 +188,20 @@ public class SearchParameter30_50 { return null; org.hl7.fhir.dstu3.model.SearchParameter tgt = new org.hl7.fhir.dstu3.model.SearchParameter(); VersionConvertor_30_50.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_50.convertType(src.getUrlElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getNameElement())); if (src.hasStatus()) tgt.setStatus(VersionConvertor_30_50.convertPublicationStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_50.convertType(src.getExperimentalElement())); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_30_50.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.r5.model.ContactDetail t : src.getContact()) tgt.addContact(VersionConvertor_30_50.convertContactDetail(t)); } @@ -210,23 +211,23 @@ public class SearchParameter30_50 { if (src.hasJurisdiction()) { for (org.hl7.fhir.r5.model.CodeableConcept t : src.getJurisdiction()) tgt.addJurisdiction(VersionConvertor_30_50.convertCodeableConcept(t)); } - if (src.hasPurpose()) - tgt.setPurpose(src.getPurpose()); - if (src.hasCode()) - tgt.setCode(src.getCode()); + if (src.hasPurposeElement()) + tgt.setPurposeElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_50.convertType(src.getPurposeElement())); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_30_50.convertType(src.getCodeElement())); if (src.hasBase()) { for (org.hl7.fhir.r5.model.CodeType t : src.getBase()) tgt.addBase(t.getValue()); } if (src.hasType()) tgt.setType(VersionConvertor_30_50.convertSearchParamType(src.getType())); - if (src.hasDerivedFrom()) - tgt.setDerivedFrom(src.getDerivedFrom()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - if (src.hasExpression()) - tgt.setExpression(src.getExpression()); - if (src.hasXpath()) - tgt.setXpath(src.getXpath()); + if (src.hasDerivedFromElement()) + tgt.setDerivedFromElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_50.convertType(src.getDerivedFromElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); + if (src.hasExpressionElement()) + tgt.setExpressionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getExpressionElement())); + if (src.hasXpathElement()) + tgt.setXpathElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getXpathElement())); if (src.hasXpathUsage()) tgt.setXpathUsage(convertXPathUsageType(src.getXpathUsage())); if (src.hasTarget()) { @@ -254,8 +255,8 @@ public class SearchParameter30_50 { VersionConvertor_30_50.copyElement(src, tgt); if (src.hasDefinition()) tgt.setDefinitionElement(VersionConvertor_30_50.convertReferenceToCanonical(src.getDefinition())); - if (src.hasExpression()) - tgt.setExpression(src.getExpression()); + if (src.hasExpressionElement()) + tgt.setExpressionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getExpressionElement())); return tgt; } @@ -266,8 +267,8 @@ public class SearchParameter30_50 { VersionConvertor_30_50.copyElement(src, tgt); if (src.hasDefinition()) tgt.setDefinition(VersionConvertor_30_50.convertCanonicalToReference(src.getDefinitionElement())); - if (src.hasExpression()) - tgt.setExpression(src.getExpression()); + if (src.hasExpressionElement()) + tgt.setExpressionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getExpressionElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Sequence30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Sequence30_50.java index 1bb80be78..32ec7331f 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Sequence30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Sequence30_50.java @@ -1,7 +1,13 @@ package org.hl7.fhir.convertors.conv30_50; import org.hl7.fhir.convertors.VersionConvertor_30_50; +import org.hl7.fhir.dstu3.model.DecimalType; +import org.hl7.fhir.dstu3.model.IntegerType; +import org.hl7.fhir.dstu3.model.UriType; import org.hl7.fhir.exceptions.FHIRException; +import org.hl7.fhir.r5.model.StringType; + +import java.util.Collections; public class Sequence30_50 { @@ -126,8 +132,8 @@ public class Sequence30_50 { } if (src.hasType()) tgt.setType(convertSequenceType(src.getType())); - if (src.hasCoordinateSystem()) - tgt.setCoordinateSystem(src.getCoordinateSystem()); + if (src.hasCoordinateSystemElement()) + tgt.setCoordinateSystemElement((org.hl7.fhir.dstu3.model.IntegerType) VersionConvertor_30_50.convertType(src.getCoordinateSystemElement())); if (src.hasPatient()) tgt.setPatient(VersionConvertor_30_50.convertReference(src.getPatient())); if (src.hasSpecimen()) @@ -143,13 +149,13 @@ public class Sequence30_50 { if (src.hasVariant()) { for (org.hl7.fhir.r5.model.MolecularSequence.MolecularSequenceVariantComponent t : src.getVariant()) tgt.addVariant(convertSequenceVariantComponent(t)); } - if (src.hasObservedSeq()) - tgt.setObservedSeq(src.getObservedSeq()); + if (src.hasObservedSeqElement()) + tgt.setObservedSeqElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getObservedSeqElement())); if (src.hasQuality()) { for (org.hl7.fhir.r5.model.MolecularSequence.MolecularSequenceQualityComponent t : src.getQuality()) tgt.addQuality(convertSequenceQualityComponent(t)); } - if (src.hasReadCoverage()) - tgt.setReadCoverage(src.getReadCoverage()); + if (src.hasReadCoverageElement()) + tgt.setReadCoverageElement((org.hl7.fhir.dstu3.model.IntegerType) VersionConvertor_30_50.convertType(src.getReadCoverageElement())); if (src.hasRepository()) { for (org.hl7.fhir.r5.model.MolecularSequence.MolecularSequenceRepositoryComponent t : src.getRepository()) tgt.addRepository(convertSequenceRepositoryComponent(t)); } @@ -168,30 +174,30 @@ public class Sequence30_50 { tgt.setType(convertQualityType(src.getType())); if (src.hasStandardSequence()) tgt.setStandardSequence(VersionConvertor_30_50.convertCodeableConcept(src.getStandardSequence())); - if (src.hasStart()) - tgt.setStart(src.getStart()); - if (src.hasEnd()) - tgt.setEnd(src.getEnd()); + if (src.hasStartElement()) + tgt.setStartElement((IntegerType) VersionConvertor_30_50.convertType(src.getStartElement())); + if (src.hasEndElement()) + tgt.setEndElement((IntegerType) VersionConvertor_30_50.convertType(src.getEndElement())); if (src.hasScore()) tgt.setScore(VersionConvertor_30_50.convertQuantity(src.getScore())); if (src.hasMethod()) tgt.setMethod(VersionConvertor_30_50.convertCodeableConcept(src.getMethod())); - if (src.hasTruthTP()) - tgt.setTruthTP(src.getTruthTP()); - if (src.hasQueryTP()) - tgt.setQueryTP(src.getQueryTP()); - if (src.hasTruthFN()) - tgt.setTruthFN(src.getTruthFN()); - if (src.hasQueryFP()) - tgt.setQueryFP(src.getQueryFP()); - if (src.hasGtFP()) - tgt.setGtFP(src.getGtFP()); - if (src.hasPrecision()) - tgt.setPrecision(src.getPrecision()); - if (src.hasRecall()) - tgt.setRecall(src.getRecall()); - if (src.hasFScore()) - tgt.setFScore(src.getFScore()); + if (src.hasTruthTPElement()) + tgt.setTruthTPElement((DecimalType) VersionConvertor_30_50.convertType(src.getTruthTPElement())); + if (src.hasQueryTPElement()) + tgt.setQueryTPElement((DecimalType) VersionConvertor_30_50.convertType(src.getQueryTPElement())); + if (src.hasTruthFNElement()) + tgt.setTruthFNElement((DecimalType) VersionConvertor_30_50.convertType(src.getTruthFNElement())); + if (src.hasQueryFPElement()) + tgt.setQueryFPElement((DecimalType) VersionConvertor_30_50.convertType(src.getQueryFPElement())); + if (src.hasGtFPElement()) + tgt.setGtFPElement((DecimalType) VersionConvertor_30_50.convertType(src.getGtFPElement())); + if (src.hasPrecisionElement()) + tgt.setPrecisionElement((DecimalType) VersionConvertor_30_50.convertType(src.getPrecisionElement())); + if (src.hasRecallElement()) + tgt.setRecallElement((DecimalType) VersionConvertor_30_50.convertType(src.getRecallElement())); + if (src.hasFScoreElement()) + tgt.setFScoreElement((DecimalType) VersionConvertor_30_50.convertType(src.getFScoreElement())); return tgt; } @@ -204,30 +210,30 @@ public class Sequence30_50 { tgt.setType(convertQualityType(src.getType())); if (src.hasStandardSequence()) tgt.setStandardSequence(VersionConvertor_30_50.convertCodeableConcept(src.getStandardSequence())); - if (src.hasStart()) - tgt.setStart(src.getStart()); - if (src.hasEnd()) - tgt.setEnd(src.getEnd()); + if (src.hasStartElement()) + tgt.setStartElement((org.hl7.fhir.r5.model.IntegerType) VersionConvertor_30_50.convertType(src.getStartElement())); + if (src.hasEndElement()) + tgt.setEndElement((org.hl7.fhir.r5.model.IntegerType) VersionConvertor_30_50.convertType(src.getEndElement())); if (src.hasScore()) tgt.setScore(VersionConvertor_30_50.convertQuantity(src.getScore())); if (src.hasMethod()) tgt.setMethod(VersionConvertor_30_50.convertCodeableConcept(src.getMethod())); - if (src.hasTruthTP()) - tgt.setTruthTP(src.getTruthTP()); - if (src.hasQueryTP()) - tgt.setQueryTP(src.getQueryTP()); - if (src.hasTruthFN()) - tgt.setTruthFN(src.getTruthFN()); - if (src.hasQueryFP()) - tgt.setQueryFP(src.getQueryFP()); - if (src.hasGtFP()) - tgt.setGtFP(src.getGtFP()); - if (src.hasPrecision()) - tgt.setPrecision(src.getPrecision()); - if (src.hasRecall()) - tgt.setRecall(src.getRecall()); - if (src.hasFScore()) - tgt.setFScore(src.getFScore()); + if (src.hasTruthTPElement()) + tgt.setTruthTPElement((org.hl7.fhir.r5.model.DecimalType) VersionConvertor_30_50.convertType(src.getTruthTPElement())); + if (src.hasQueryTPElement()) + tgt.setQueryTPElement((org.hl7.fhir.r5.model.DecimalType) VersionConvertor_30_50.convertType(src.getQueryTPElement())); + if (src.hasTruthFNElement()) + tgt.setTruthFNElement((org.hl7.fhir.r5.model.DecimalType) VersionConvertor_30_50.convertType(src.getTruthFNElement())); + if (src.hasQueryFPElement()) + tgt.setQueryFPElement((org.hl7.fhir.r5.model.DecimalType) VersionConvertor_30_50.convertType(src.getQueryFPElement())); + if (src.hasGtFPElement()) + tgt.setGtFPElement((org.hl7.fhir.r5.model.DecimalType) VersionConvertor_30_50.convertType(src.getGtFPElement())); + if (src.hasPrecisionElement()) + tgt.setPrecisionElement((org.hl7.fhir.r5.model.DecimalType) VersionConvertor_30_50.convertType(src.getPrecisionElement())); + if (src.hasRecallElement()) + tgt.setRecallElement((org.hl7.fhir.r5.model.DecimalType) VersionConvertor_30_50.convertType(src.getRecallElement())); + if (src.hasFScoreElement()) + tgt.setFScoreElement((org.hl7.fhir.r5.model.DecimalType) VersionConvertor_30_50.convertType(src.getFScoreElement())); return tgt; } @@ -238,18 +244,18 @@ public class Sequence30_50 { VersionConvertor_30_50.copyElement(src, tgt); if (src.hasChromosome()) tgt.setChromosome(VersionConvertor_30_50.convertCodeableConcept(src.getChromosome())); - if (src.hasGenomeBuild()) - tgt.setGenomeBuild(src.getGenomeBuild()); + if (src.hasGenomeBuildElement()) + tgt.setGenomeBuildElement((StringType) VersionConvertor_30_50.convertType(src.getGenomeBuildElement())); if (src.hasReferenceSeqId()) tgt.setReferenceSeqId(VersionConvertor_30_50.convertCodeableConcept(src.getReferenceSeqId())); if (src.hasReferenceSeqPointer()) tgt.setReferenceSeqPointer(VersionConvertor_30_50.convertReference(src.getReferenceSeqPointer())); - if (src.hasReferenceSeqString()) - tgt.setReferenceSeqString(src.getReferenceSeqString()); - if (src.hasWindowStart()) - tgt.setWindowStart(src.getWindowStart()); - if (src.hasWindowEnd()) - tgt.setWindowEnd(src.getWindowEnd()); + if (src.hasReferenceSeqStringElement()) + tgt.setReferenceSeqStringElement((StringType) VersionConvertor_30_50.convertType(src.getReferenceSeqStringElement())); + if (src.hasWindowStartElement()) + tgt.setWindowStartElement((org.hl7.fhir.r5.model.IntegerType) VersionConvertor_30_50.convertType(src.getWindowStartElement())); + if (src.hasWindowEndElement()) + tgt.setWindowEndElement((org.hl7.fhir.r5.model.IntegerType) VersionConvertor_30_50.convertType(src.getWindowEndElement())); return tgt; } @@ -260,18 +266,18 @@ public class Sequence30_50 { VersionConvertor_30_50.copyElement(src, tgt); if (src.hasChromosome()) tgt.setChromosome(VersionConvertor_30_50.convertCodeableConcept(src.getChromosome())); - if (src.hasGenomeBuild()) - tgt.setGenomeBuild(src.getGenomeBuild()); + if (src.hasGenomeBuildElement()) + tgt.setGenomeBuildElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getGenomeBuildElement())); if (src.hasReferenceSeqId()) tgt.setReferenceSeqId(VersionConvertor_30_50.convertCodeableConcept(src.getReferenceSeqId())); if (src.hasReferenceSeqPointer()) tgt.setReferenceSeqPointer(VersionConvertor_30_50.convertReference(src.getReferenceSeqPointer())); - if (src.hasReferenceSeqString()) - tgt.setReferenceSeqString(src.getReferenceSeqString()); - if (src.hasWindowStart()) - tgt.setWindowStart(src.getWindowStart()); - if (src.hasWindowEnd()) - tgt.setWindowEnd(src.getWindowEnd()); + if (src.hasReferenceSeqStringElement()) + tgt.setReferenceSeqStringElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getReferenceSeqStringElement())); + if (src.hasWindowStartElement()) + tgt.setWindowStartElement((IntegerType) VersionConvertor_30_50.convertType(src.getWindowStartElement())); + if (src.hasWindowEndElement()) + tgt.setWindowEndElement((IntegerType) VersionConvertor_30_50.convertType(src.getWindowEndElement())); return tgt; } @@ -282,16 +288,16 @@ public class Sequence30_50 { VersionConvertor_30_50.copyElement(src, tgt); if (src.hasType()) tgt.setType(convertRepositoryType(src.getType())); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasDatasetId()) - tgt.setDatasetId(src.getDatasetId()); - if (src.hasVariantsetId()) - tgt.setVariantsetId(src.getVariantsetId()); - if (src.hasReadsetId()) - tgt.setReadsetId(src.getReadsetId()); + if (src.hasUrlElement()) + tgt.setUrlElement((UriType) VersionConvertor_30_50.convertType(src.getUrlElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getNameElement())); + if (src.hasDatasetIdElement()) + tgt.setDatasetIdElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getDatasetIdElement())); + if (src.hasVariantsetIdElement()) + tgt.setVariantsetIdElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getVariantsetIdElement())); + if (src.hasReadsetIdElement()) + tgt.setReadsetIdElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getReadsetIdElement())); return tgt; } @@ -302,16 +308,16 @@ public class Sequence30_50 { VersionConvertor_30_50.copyElement(src, tgt); if (src.hasType()) tgt.setType(convertRepositoryType(src.getType())); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasDatasetId()) - tgt.setDatasetId(src.getDatasetId()); - if (src.hasVariantsetId()) - tgt.setVariantsetId(src.getVariantsetId()); - if (src.hasReadsetId()) - tgt.setReadsetId(src.getReadsetId()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r5.model.UriType) VersionConvertor_30_50.convertType(src.getUrlElement())); + if (src.hasNameElement()) + tgt.setNameElement((StringType) VersionConvertor_30_50.convertType(src.getNameElement())); + if (src.hasDatasetIdElement()) + tgt.setDatasetIdElement((StringType) VersionConvertor_30_50.convertType(src.getDatasetIdElement())); + if (src.hasVariantsetIdElement()) + tgt.setVariantsetIdElement((StringType) VersionConvertor_30_50.convertType(src.getVariantsetIdElement())); + if (src.hasReadsetIdElement()) + tgt.setReadsetIdElement((StringType) VersionConvertor_30_50.convertType(src.getReadsetIdElement())); return tgt; } @@ -350,16 +356,16 @@ public class Sequence30_50 { return null; org.hl7.fhir.dstu3.model.Sequence.SequenceVariantComponent tgt = new org.hl7.fhir.dstu3.model.Sequence.SequenceVariantComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasStart()) - tgt.setStart(src.getStart()); - if (src.hasEnd()) - tgt.setEnd(src.getEnd()); - if (src.hasObservedAllele()) - tgt.setObservedAllele(src.getObservedAllele()); - if (src.hasReferenceAllele()) - tgt.setReferenceAllele(src.getReferenceAllele()); - if (src.hasCigar()) - tgt.setCigar(src.getCigar()); + if (src.hasStartElement()) + tgt.setStartElement((IntegerType) VersionConvertor_30_50.convertType(src.getStartElement())); + if (src.hasEndElement()) + tgt.setEndElement((IntegerType) VersionConvertor_30_50.convertType(src.getEndElement())); + if (src.hasObservedAlleleElement()) + tgt.setObservedAlleleElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getObservedAlleleElement())); + if (src.hasReferenceAlleleElement()) + tgt.setReferenceAlleleElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getReferenceAlleleElement())); + if (src.hasCigarElement()) + tgt.setCigarElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getCigarElement())); if (src.hasVariantPointer()) tgt.setVariantPointer(VersionConvertor_30_50.convertReference(src.getVariantPointer())); return tgt; @@ -370,16 +376,16 @@ public class Sequence30_50 { return null; org.hl7.fhir.r5.model.MolecularSequence.MolecularSequenceVariantComponent tgt = new org.hl7.fhir.r5.model.MolecularSequence.MolecularSequenceVariantComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasStart()) - tgt.setStart(src.getStart()); - if (src.hasEnd()) - tgt.setEnd(src.getEnd()); - if (src.hasObservedAllele()) - tgt.setObservedAllele(src.getObservedAllele()); - if (src.hasReferenceAllele()) - tgt.setReferenceAllele(src.getReferenceAllele()); - if (src.hasCigar()) - tgt.setCigar(src.getCigar()); + if (src.hasStartElement()) + tgt.setStartElement((org.hl7.fhir.r5.model.IntegerType) VersionConvertor_30_50.convertType(src.getStartElement())); + if (src.hasEndElement()) + tgt.setEndElement((org.hl7.fhir.r5.model.IntegerType) VersionConvertor_30_50.convertType(src.getEndElement())); + if (src.hasObservedAlleleElement()) + tgt.setObservedAlleleElement((StringType) VersionConvertor_30_50.convertType(src.getObservedAlleleElement())); + if (src.hasReferenceAlleleElement()) + tgt.setReferenceAlleleElement((StringType) VersionConvertor_30_50.convertType(src.getReferenceAlleleElement())); + if (src.hasCigarElement()) + tgt.setCigarElement((StringType) VersionConvertor_30_50.convertType(src.getCigarElement())); if (src.hasVariantPointer()) tgt.setVariantPointer(VersionConvertor_30_50.convertReference(src.getVariantPointer())); return tgt; diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Slot30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Slot30_50.java index c28f09651..d7e29b30f 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Slot30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Slot30_50.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_50; import org.hl7.fhir.convertors.VersionConvertor_30_50; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Slot30_50 { @@ -27,14 +28,14 @@ public class Slot30_50 { tgt.setSchedule(VersionConvertor_30_50.convertReference(src.getSchedule())); if (src.hasStatus()) tgt.setStatus(convertSlotStatus(src.getStatus())); - if (src.hasStart()) - tgt.setStart(src.getStart()); - if (src.hasEnd()) - tgt.setEnd(src.getEnd()); - if (src.hasOverbooked()) - tgt.setOverbooked(src.getOverbooked()); - if (src.hasComment()) - tgt.setComment(src.getComment()); + if (src.hasStartElement()) + tgt.setStartElement((org.hl7.fhir.r5.model.InstantType) VersionConvertor_30_50.convertType(src.getStartElement())); + if (src.hasEndElement()) + tgt.setEndElement((org.hl7.fhir.r5.model.InstantType) VersionConvertor_30_50.convertType(src.getEndElement())); + if (src.hasOverbookedElement()) + tgt.setOverbookedElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_30_50.convertType(src.getOverbookedElement())); + if (src.hasCommentElement()) + tgt.setCommentElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getCommentElement())); return tgt; } @@ -60,14 +61,14 @@ public class Slot30_50 { tgt.setSchedule(VersionConvertor_30_50.convertReference(src.getSchedule())); if (src.hasStatus()) tgt.setStatus(convertSlotStatus(src.getStatus())); - if (src.hasStart()) - tgt.setStart(src.getStart()); - if (src.hasEnd()) - tgt.setEnd(src.getEnd()); - if (src.hasOverbooked()) - tgt.setOverbooked(src.getOverbooked()); - if (src.hasComment()) - tgt.setComment(src.getComment()); + if (src.hasStartElement()) + tgt.setStartElement((org.hl7.fhir.dstu3.model.InstantType) VersionConvertor_30_50.convertType(src.getStartElement())); + if (src.hasEndElement()) + tgt.setEndElement((org.hl7.fhir.dstu3.model.InstantType) VersionConvertor_30_50.convertType(src.getEndElement())); + if (src.hasOverbookedElement()) + tgt.setOverbookedElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_50.convertType(src.getOverbookedElement())); + if (src.hasCommentElement()) + tgt.setCommentElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getCommentElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Specimen30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Specimen30_50.java index 87a537aef..ccbe05d20 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Specimen30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Specimen30_50.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_50; import org.hl7.fhir.convertors.VersionConvertor_30_50; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Specimen30_50 { @@ -21,8 +22,8 @@ public class Specimen30_50 { tgt.setType(VersionConvertor_30_50.convertCodeableConcept(src.getType())); if (src.hasSubject()) tgt.setSubject(VersionConvertor_30_50.convertReference(src.getSubject())); - if (src.hasReceivedTime()) - tgt.setReceivedTime(src.getReceivedTime()); + if (src.hasReceivedTimeElement()) + tgt.setReceivedTimeElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_30_50.convertType(src.getReceivedTimeElement())); if (src.hasParent()) { for (org.hl7.fhir.r5.model.Reference t : src.getParent()) tgt.addParent(VersionConvertor_30_50.convertReference(t)); } @@ -59,8 +60,8 @@ public class Specimen30_50 { tgt.setType(VersionConvertor_30_50.convertCodeableConcept(src.getType())); if (src.hasSubject()) tgt.setSubject(VersionConvertor_30_50.convertReference(src.getSubject())); - if (src.hasReceivedTime()) - tgt.setReceivedTime(src.getReceivedTime()); + if (src.hasReceivedTimeElement()) + tgt.setReceivedTimeElement((org.hl7.fhir.r5.model.DateTimeType) VersionConvertor_30_50.convertType(src.getReceivedTimeElement())); if (src.hasParent()) { for (org.hl7.fhir.dstu3.model.Reference t : src.getParent()) tgt.addParent(VersionConvertor_30_50.convertReference(t)); } @@ -125,8 +126,8 @@ public class Specimen30_50 { if (src.hasIdentifier()) { for (org.hl7.fhir.r5.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_30_50.convertIdentifier(t)); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); if (src.hasType()) tgt.setType(VersionConvertor_30_50.convertCodeableConcept(src.getType())); if (src.hasCapacity()) @@ -146,8 +147,8 @@ public class Specimen30_50 { if (src.hasIdentifier()) { for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_30_50.convertIdentifier(t)); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); if (src.hasType()) tgt.setType(VersionConvertor_30_50.convertCodeableConcept(src.getType())); if (src.hasCapacity()) @@ -164,8 +165,8 @@ public class Specimen30_50 { return null; org.hl7.fhir.r5.model.Specimen.SpecimenProcessingComponent tgt = new org.hl7.fhir.r5.model.Specimen.SpecimenProcessingComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); if (src.hasProcedure()) tgt.setProcedure(VersionConvertor_30_50.convertCodeableConcept(src.getProcedure())); if (src.hasAdditive()) { @@ -181,8 +182,8 @@ public class Specimen30_50 { return null; org.hl7.fhir.dstu3.model.Specimen.SpecimenProcessingComponent tgt = new org.hl7.fhir.dstu3.model.Specimen.SpecimenProcessingComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); if (src.hasProcedure()) tgt.setProcedure(VersionConvertor_30_50.convertCodeableConcept(src.getProcedure())); if (src.hasAdditive()) { diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/StructureDefinition30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/StructureDefinition30_50.java index e247e9451..398b9ecef 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/StructureDefinition30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/StructureDefinition30_50.java @@ -3,6 +3,7 @@ package org.hl7.fhir.convertors.conv30_50; import org.hl7.fhir.convertors.VersionConvertor_30_50; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.utilities.Utilities; +import java.util.Collections; public class StructureDefinition30_50 { @@ -46,40 +47,40 @@ public class StructureDefinition30_50 { return null; org.hl7.fhir.r5.model.StructureDefinition tgt = new org.hl7.fhir.r5.model.StructureDefinition(); VersionConvertor_30_50.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r5.model.UriType) VersionConvertor_30_50.convertType(src.getUrlElement())); if (src.hasIdentifier()) { for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_30_50.convertIdentifier(t)); } - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getNameElement())); + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getTitleElement())); if (src.hasStatus()) tgt.setStatus(VersionConvertor_30_50.convertPublicationStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_30_50.convertType(src.getExperimentalElement())); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.r5.model.DateTimeType) VersionConvertor_30_50.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) tgt.addContact(VersionConvertor_30_50.convertContactDetail(t)); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r5.model.MarkdownType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); if (src.hasUseContext()) { for (org.hl7.fhir.dstu3.model.UsageContext t : src.getUseContext()) tgt.addUseContext(VersionConvertor_30_50.convertUsageContext(t)); } if (src.hasJurisdiction()) { for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getJurisdiction()) tgt.addJurisdiction(VersionConvertor_30_50.convertCodeableConcept(t)); } - if (src.hasPurpose()) - tgt.setPurpose(src.getPurpose()); - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); + if (src.hasPurposeElement()) + tgt.setPurposeElement((org.hl7.fhir.r5.model.MarkdownType) VersionConvertor_30_50.convertType(src.getPurposeElement())); + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.r5.model.MarkdownType) VersionConvertor_30_50.convertType(src.getCopyrightElement())); if (src.hasKeyword()) { for (org.hl7.fhir.dstu3.model.Coding t : src.getKeyword()) tgt.addKeyword(VersionConvertor_30_50.convertCoding(t)); } @@ -90,8 +91,8 @@ public class StructureDefinition30_50 { } if (src.hasKind()) tgt.setKind(convertStructureDefinitionKind(src.getKind())); - if (src.hasAbstract()) - tgt.setAbstract(src.getAbstract()); + if (src.hasAbstractElement()) + tgt.setAbstractElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_30_50.convertType(src.getAbstractElement())); for (org.hl7.fhir.dstu3.model.StringType t : src.getContext()) { org.hl7.fhir.r5.model.StructureDefinition.StructureDefinitionContextComponent ec = tgt.addContext(); if (src.hasContextType()) { @@ -103,9 +104,9 @@ public class StructureDefinition30_50 { for (org.hl7.fhir.dstu3.model.StringType t : src.getContextInvariant()) tgt.addContextInvariant(t.getValue()); } if (src.hasType()) - tgt.setType(src.getType()); - if (src.hasBaseDefinition()) - tgt.setBaseDefinition(src.getBaseDefinition()); + tgt.setType(src.getType()); + if (src.hasBaseDefinitionElement()) + tgt.setBaseDefinitionElement((org.hl7.fhir.r5.model.CanonicalType) VersionConvertor_30_50.convertType(src.getBaseDefinitionElement())); if (src.hasDerivation()) tgt.setDerivation(convertTypeDerivationRule(src.getDerivation())); if (src.hasSnapshot()) @@ -127,40 +128,40 @@ public class StructureDefinition30_50 { return null; org.hl7.fhir.dstu3.model.StructureDefinition tgt = new org.hl7.fhir.dstu3.model.StructureDefinition(); VersionConvertor_30_50.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_50.convertType(src.getUrlElement())); if (src.hasIdentifier()) { for (org.hl7.fhir.r5.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_30_50.convertIdentifier(t)); } - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getNameElement())); + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getTitleElement())); if (src.hasStatus()) tgt.setStatus(VersionConvertor_30_50.convertPublicationStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_50.convertType(src.getExperimentalElement())); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_30_50.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.r5.model.ContactDetail t : src.getContact()) tgt.addContact(VersionConvertor_30_50.convertContactDetail(t)); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); if (src.hasUseContext()) { for (org.hl7.fhir.r5.model.UsageContext t : src.getUseContext()) tgt.addUseContext(VersionConvertor_30_50.convertUsageContext(t)); } if (src.hasJurisdiction()) { for (org.hl7.fhir.r5.model.CodeableConcept t : src.getJurisdiction()) tgt.addJurisdiction(VersionConvertor_30_50.convertCodeableConcept(t)); } - if (src.hasPurpose()) - tgt.setPurpose(src.getPurpose()); - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); + if (src.hasPurposeElement()) + tgt.setPurposeElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_50.convertType(src.getPurposeElement())); + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_50.convertType(src.getCopyrightElement())); if (src.hasKeyword()) { for (org.hl7.fhir.r5.model.Coding t : src.getKeyword()) tgt.addKeyword(VersionConvertor_30_50.convertCoding(t)); } @@ -171,20 +172,20 @@ public class StructureDefinition30_50 { } if (src.hasKind()) tgt.setKind(convertStructureDefinitionKind(src.getKind())); - if (src.hasAbstract()) - tgt.setAbstract(src.getAbstract()); + if (src.hasAbstractElement()) + tgt.setAbstractElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_50.convertType(src.getAbstractElement())); for (org.hl7.fhir.r5.model.StructureDefinition.StructureDefinitionContextComponent t : src.getContext()) { if (!tgt.hasContextType()) - tgt.setContextType(convertExtensionContext(t.getType(), t.getExpression())); + tgt.setTypeElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_30_50.convertType(src.getTypeElement())); tgt.addContext("Element".equals(t.getExpression()) ? "*" : t.getExpression()); } if (src.hasContextInvariant()) { for (org.hl7.fhir.r5.model.StringType t : src.getContextInvariant()) tgt.addContextInvariant(t.getValue()); } if (src.hasType()) - tgt.setType(src.getType()); - if (src.hasBaseDefinition()) - tgt.setBaseDefinition(src.getBaseDefinition()); + tgt.setType(src.getType()); + if (src.hasBaseDefinitionElement()) + tgt.setBaseDefinitionElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_50.convertType(src.getBaseDefinitionElement())); if (src.hasDerivation()) tgt.setDerivation(convertTypeDerivationRule(src.getDerivation())); if (src.hasSnapshot()) @@ -255,14 +256,14 @@ public class StructureDefinition30_50 { return null; org.hl7.fhir.dstu3.model.StructureDefinition.StructureDefinitionMappingComponent tgt = new org.hl7.fhir.dstu3.model.StructureDefinition.StructureDefinitionMappingComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasIdentity()) - tgt.setIdentity(src.getIdentity()); - if (src.hasUri()) - tgt.setUri(src.getUri()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasComment()) - tgt.setComment(src.getComment()); + if (src.hasIdentityElement()) + tgt.setIdentityElement((org.hl7.fhir.dstu3.model.IdType) VersionConvertor_30_50.convertType(src.getIdentityElement())); + if (src.hasUriElement()) + tgt.setUriElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_50.convertType(src.getUriElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getNameElement())); + if (src.hasCommentElement()) + tgt.setCommentElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getCommentElement())); return tgt; } @@ -271,14 +272,14 @@ public class StructureDefinition30_50 { return null; org.hl7.fhir.r5.model.StructureDefinition.StructureDefinitionMappingComponent tgt = new org.hl7.fhir.r5.model.StructureDefinition.StructureDefinitionMappingComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasIdentity()) - tgt.setIdentity(src.getIdentity()); - if (src.hasUri()) - tgt.setUri(src.getUri()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasComment()) - tgt.setComment(src.getComment()); + if (src.hasIdentityElement()) + tgt.setIdentityElement((org.hl7.fhir.r5.model.IdType) VersionConvertor_30_50.convertType(src.getIdentityElement())); + if (src.hasUriElement()) + tgt.setUriElement((org.hl7.fhir.r5.model.UriType) VersionConvertor_30_50.convertType(src.getUriElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getNameElement())); + if (src.hasCommentElement()) + tgt.setCommentElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getCommentElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/StructureMap30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/StructureMap30_50.java index ea753a4b2..a707829e0 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/StructureMap30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/StructureMap30_50.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_50; import org.hl7.fhir.convertors.VersionConvertor_30_50; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class StructureMap30_50 { @@ -10,40 +11,40 @@ public class StructureMap30_50 { return null; org.hl7.fhir.r5.model.StructureMap tgt = new org.hl7.fhir.r5.model.StructureMap(); VersionConvertor_30_50.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r5.model.UriType) VersionConvertor_30_50.convertType(src.getUrlElement())); if (src.hasIdentifier()) { for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_30_50.convertIdentifier(t)); } - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getNameElement())); + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getTitleElement())); if (src.hasStatus()) tgt.setStatus(VersionConvertor_30_50.convertPublicationStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_30_50.convertType(src.getExperimentalElement())); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.r5.model.DateTimeType) VersionConvertor_30_50.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) tgt.addContact(VersionConvertor_30_50.convertContactDetail(t)); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r5.model.MarkdownType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); if (src.hasUseContext()) { for (org.hl7.fhir.dstu3.model.UsageContext t : src.getUseContext()) tgt.addUseContext(VersionConvertor_30_50.convertUsageContext(t)); } if (src.hasJurisdiction()) { for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getJurisdiction()) tgt.addJurisdiction(VersionConvertor_30_50.convertCodeableConcept(t)); } - if (src.hasPurpose()) - tgt.setPurpose(src.getPurpose()); - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); + if (src.hasPurposeElement()) + tgt.setPurposeElement((org.hl7.fhir.r5.model.MarkdownType) VersionConvertor_30_50.convertType(src.getPurposeElement())); + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.r5.model.MarkdownType) VersionConvertor_30_50.convertType(src.getCopyrightElement())); if (src.hasStructure()) { for (org.hl7.fhir.dstu3.model.StructureMap.StructureMapStructureComponent t : src.getStructure()) tgt.addStructure(convertStructureMapStructureComponent(t)); } @@ -61,40 +62,40 @@ public class StructureMap30_50 { return null; org.hl7.fhir.dstu3.model.StructureMap tgt = new org.hl7.fhir.dstu3.model.StructureMap(); VersionConvertor_30_50.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_50.convertType(src.getUrlElement())); if (src.hasIdentifier()) { for (org.hl7.fhir.r5.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_30_50.convertIdentifier(t)); } - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getNameElement())); + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getTitleElement())); if (src.hasStatus()) tgt.setStatus(VersionConvertor_30_50.convertPublicationStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_50.convertType(src.getExperimentalElement())); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_30_50.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.r5.model.ContactDetail t : src.getContact()) tgt.addContact(VersionConvertor_30_50.convertContactDetail(t)); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); if (src.hasUseContext()) { for (org.hl7.fhir.r5.model.UsageContext t : src.getUseContext()) tgt.addUseContext(VersionConvertor_30_50.convertUsageContext(t)); } if (src.hasJurisdiction()) { for (org.hl7.fhir.r5.model.CodeableConcept t : src.getJurisdiction()) tgt.addJurisdiction(VersionConvertor_30_50.convertCodeableConcept(t)); } - if (src.hasPurpose()) - tgt.setPurpose(src.getPurpose()); - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); + if (src.hasPurposeElement()) + tgt.setPurposeElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_50.convertType(src.getPurposeElement())); + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_50.convertType(src.getCopyrightElement())); if (src.hasStructure()) { for (org.hl7.fhir.r5.model.StructureMap.StructureMapStructureComponent t : src.getStructure()) tgt.addStructure(convertStructureMapStructureComponent(t)); } @@ -138,14 +139,14 @@ public class StructureMap30_50 { return null; org.hl7.fhir.r5.model.StructureMap.StructureMapGroupComponent tgt = new org.hl7.fhir.r5.model.StructureMap.StructureMapGroupComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasExtends()) - tgt.setExtends(src.getExtends()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.IdType) VersionConvertor_30_50.convertType(src.getNameElement())); + if (src.hasExtendsElement()) + tgt.setExtendsElement((org.hl7.fhir.r5.model.IdType) VersionConvertor_30_50.convertType(src.getExtendsElement())); if (src.hasTypeMode()) tgt.setTypeMode(convertStructureMapGroupTypeMode(src.getTypeMode())); - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getDocumentationElement())); if (src.hasInput()) { for (org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupInputComponent t : src.getInput()) tgt.addInput(convertStructureMapGroupInputComponent(t)); } @@ -160,14 +161,14 @@ public class StructureMap30_50 { return null; org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupComponent tgt = new org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasExtends()) - tgt.setExtends(src.getExtends()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.IdType) VersionConvertor_30_50.convertType(src.getNameElement())); + if (src.hasExtendsElement()) + tgt.setExtendsElement((org.hl7.fhir.dstu3.model.IdType) VersionConvertor_30_50.convertType(src.getExtendsElement())); if (src.hasTypeMode()) tgt.setTypeMode(convertStructureMapGroupTypeMode(src.getTypeMode())); - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getDocumentationElement())); if (src.hasInput()) { for (org.hl7.fhir.r5.model.StructureMap.StructureMapGroupInputComponent t : src.getInput()) tgt.addInput(convertStructureMapGroupInputComponent(t)); } @@ -182,14 +183,14 @@ public class StructureMap30_50 { return null; org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupInputComponent tgt = new org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupInputComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasType()) - tgt.setType(src.getType()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.IdType) VersionConvertor_30_50.convertType(src.getNameElement())); + if (src.hasTypeElement()) + tgt.setTypeElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getTypeElement())); if (src.hasMode()) tgt.setMode(convertStructureMapInputMode(src.getMode())); - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getDocumentationElement())); return tgt; } @@ -198,14 +199,14 @@ public class StructureMap30_50 { return null; org.hl7.fhir.r5.model.StructureMap.StructureMapGroupInputComponent tgt = new org.hl7.fhir.r5.model.StructureMap.StructureMapGroupInputComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasType()) - tgt.setType(src.getType()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.IdType) VersionConvertor_30_50.convertType(src.getNameElement())); + if (src.hasTypeElement()) + tgt.setTypeElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getTypeElement())); if (src.hasMode()) tgt.setMode(convertStructureMapInputMode(src.getMode())); - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getDocumentationElement())); return tgt; } @@ -214,8 +215,8 @@ public class StructureMap30_50 { return null; org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupRuleComponent tgt = new org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupRuleComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.IdType) VersionConvertor_30_50.convertType(src.getNameElement())); if (src.hasSource()) { for (org.hl7.fhir.r5.model.StructureMap.StructureMapGroupRuleSourceComponent t : src.getSource()) tgt.addSource(convertStructureMapGroupRuleSourceComponent(t)); } @@ -228,8 +229,8 @@ public class StructureMap30_50 { if (src.hasDependent()) { for (org.hl7.fhir.r5.model.StructureMap.StructureMapGroupRuleDependentComponent t : src.getDependent()) tgt.addDependent(convertStructureMapGroupRuleDependentComponent(t)); } - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getDocumentationElement())); return tgt; } @@ -238,8 +239,8 @@ public class StructureMap30_50 { return null; org.hl7.fhir.r5.model.StructureMap.StructureMapGroupRuleComponent tgt = new org.hl7.fhir.r5.model.StructureMap.StructureMapGroupRuleComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.IdType) VersionConvertor_30_50.convertType(src.getNameElement())); if (src.hasSource()) { for (org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupRuleSourceComponent t : src.getSource()) tgt.addSource(convertStructureMapGroupRuleSourceComponent(t)); } @@ -252,8 +253,8 @@ public class StructureMap30_50 { if (src.hasDependent()) { for (org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupRuleDependentComponent t : src.getDependent()) tgt.addDependent(convertStructureMapGroupRuleDependentComponent(t)); } - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getDocumentationElement())); return tgt; } @@ -262,8 +263,8 @@ public class StructureMap30_50 { return null; org.hl7.fhir.r5.model.StructureMap.StructureMapGroupRuleDependentComponent tgt = new org.hl7.fhir.r5.model.StructureMap.StructureMapGroupRuleDependentComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.IdType) VersionConvertor_30_50.convertType(src.getNameElement())); if (src.hasVariable()) { for (org.hl7.fhir.dstu3.model.StringType t : src.getVariable()) tgt.addVariable(t.getValue()); } @@ -275,8 +276,8 @@ public class StructureMap30_50 { return null; org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupRuleDependentComponent tgt = new org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupRuleDependentComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.IdType) VersionConvertor_30_50.convertType(src.getNameElement())); if (src.hasVariable()) { for (org.hl7.fhir.r5.model.StringType t : src.getVariable()) tgt.addVariable(t.getValue()); } @@ -288,26 +289,26 @@ public class StructureMap30_50 { return null; org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupRuleSourceComponent tgt = new org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupRuleSourceComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasContext()) - tgt.setContext(src.getContext()); - if (src.hasMin()) - tgt.setMin(src.getMin()); - if (src.hasMax()) - tgt.setMax(src.getMax()); - if (src.hasType()) - tgt.setType(src.getType()); + if (src.hasContextElement()) + tgt.setContextElement((org.hl7.fhir.dstu3.model.IdType) VersionConvertor_30_50.convertType(src.getContextElement())); + if (src.hasMinElement()) + tgt.setMinElement((org.hl7.fhir.dstu3.model.IntegerType) VersionConvertor_30_50.convertType(src.getMinElement())); + if (src.hasMaxElement()) + tgt.setMaxElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getMaxElement())); + if (src.hasTypeElement()) + tgt.setTypeElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getTypeElement())); if (src.hasDefaultValue()) tgt.setDefaultValue(VersionConvertor_30_50.convertType(src.getDefaultValue())); - if (src.hasElement()) - tgt.setElement(src.getElement()); + if (src.hasElementElement()) + tgt.setElementElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getElementElement())); if (src.hasListMode()) tgt.setListMode(convertStructureMapSourceListMode(src.getListMode())); - if (src.hasVariable()) - tgt.setVariable(src.getVariable()); - if (src.hasCondition()) - tgt.setCondition(src.getCondition()); - if (src.hasCheck()) - tgt.setCheck(src.getCheck()); + if (src.hasVariableElement()) + tgt.setVariableElement((org.hl7.fhir.dstu3.model.IdType) VersionConvertor_30_50.convertType(src.getVariableElement())); + if (src.hasConditionElement()) + tgt.setConditionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getConditionElement())); + if (src.hasCheckElement()) + tgt.setCheckElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getCheckElement())); return tgt; } @@ -316,26 +317,26 @@ public class StructureMap30_50 { return null; org.hl7.fhir.r5.model.StructureMap.StructureMapGroupRuleSourceComponent tgt = new org.hl7.fhir.r5.model.StructureMap.StructureMapGroupRuleSourceComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasContext()) - tgt.setContext(src.getContext()); - if (src.hasMin()) - tgt.setMin(src.getMin()); - if (src.hasMax()) - tgt.setMax(src.getMax()); - if (src.hasType()) - tgt.setType(src.getType()); + if (src.hasContextElement()) + tgt.setContextElement((org.hl7.fhir.r5.model.IdType) VersionConvertor_30_50.convertType(src.getContextElement())); + if (src.hasMinElement()) + tgt.setMinElement((org.hl7.fhir.r5.model.IntegerType) VersionConvertor_30_50.convertType(src.getMinElement())); + if (src.hasMaxElement()) + tgt.setMaxElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getMaxElement())); + if (src.hasTypeElement()) + tgt.setTypeElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getTypeElement())); if (src.hasDefaultValue()) tgt.setDefaultValue(VersionConvertor_30_50.convertType(src.getDefaultValue())); - if (src.hasElement()) - tgt.setElement(src.getElement()); + if (src.hasElementElement()) + tgt.setElementElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getElementElement())); if (src.hasListMode()) tgt.setListMode(convertStructureMapSourceListMode(src.getListMode())); - if (src.hasVariable()) - tgt.setVariable(src.getVariable()); - if (src.hasCondition()) - tgt.setCondition(src.getCondition()); - if (src.hasCheck()) - tgt.setCheck(src.getCheck()); + if (src.hasVariableElement()) + tgt.setVariableElement((org.hl7.fhir.r5.model.IdType) VersionConvertor_30_50.convertType(src.getVariableElement())); + if (src.hasConditionElement()) + tgt.setConditionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getConditionElement())); + if (src.hasCheckElement()) + tgt.setCheckElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getCheckElement())); return tgt; } @@ -344,19 +345,19 @@ public class StructureMap30_50 { return null; org.hl7.fhir.r5.model.StructureMap.StructureMapGroupRuleTargetComponent tgt = new org.hl7.fhir.r5.model.StructureMap.StructureMapGroupRuleTargetComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasContext()) - tgt.setContext(src.getContext()); + if (src.hasContextElement()) + tgt.setContextElement((org.hl7.fhir.r5.model.IdType) VersionConvertor_30_50.convertType(src.getContextElement())); if (src.hasContextType()) tgt.setContextType(convertStructureMapContextType(src.getContextType())); - if (src.hasElement()) - tgt.setElement(src.getElement()); - if (src.hasVariable()) - tgt.setVariable(src.getVariable()); + if (src.hasElementElement()) + tgt.setElementElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getElementElement())); + if (src.hasVariableElement()) + tgt.setVariableElement((org.hl7.fhir.r5.model.IdType) VersionConvertor_30_50.convertType(src.getVariableElement())); if (src.hasListMode()) { for (org.hl7.fhir.dstu3.model.Enumeration t : src.getListMode()) VersionConvertor_30_50.copyElement(t, tgt.addListModeElement().setValue(convertStructureMapTargetListMode(t.getValue()))); } - if (src.hasListRuleId()) - tgt.setListRuleId(src.getListRuleId()); + if (src.hasListRuleIdElement()) + tgt.setListRuleIdElement((org.hl7.fhir.r5.model.IdType) VersionConvertor_30_50.convertType(src.getListRuleIdElement())); if (src.hasTransform()) tgt.setTransform(convertStructureMapTransform(src.getTransform())); if (src.hasParameter()) { @@ -370,19 +371,19 @@ public class StructureMap30_50 { return null; org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupRuleTargetComponent tgt = new org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupRuleTargetComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasContext()) - tgt.setContext(src.getContext()); + if (src.hasContextElement()) + tgt.setContextElement((org.hl7.fhir.dstu3.model.IdType) VersionConvertor_30_50.convertType(src.getContextElement())); if (src.hasContextType()) tgt.setContextType(convertStructureMapContextType(src.getContextType())); - if (src.hasElement()) - tgt.setElement(src.getElement()); - if (src.hasVariable()) - tgt.setVariable(src.getVariable()); + if (src.hasElementElement()) + tgt.setElementElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getElementElement())); + if (src.hasVariableElement()) + tgt.setVariableElement((org.hl7.fhir.dstu3.model.IdType) VersionConvertor_30_50.convertType(src.getVariableElement())); if (src.hasListMode()) { for (org.hl7.fhir.r5.model.Enumeration t : src.getListMode()) VersionConvertor_30_50.copyElement(t, tgt.addListModeElement().setValue(convertStructureMapTargetListMode(t.getValue()))); } - if (src.hasListRuleId()) - tgt.setListRuleId(src.getListRuleId()); + if (src.hasListRuleIdElement()) + tgt.setListRuleIdElement((org.hl7.fhir.dstu3.model.IdType) VersionConvertor_30_50.convertType(src.getListRuleIdElement())); if (src.hasTransform()) tgt.setTransform(convertStructureMapTransform(src.getTransform())); if (src.hasParameter()) { @@ -544,14 +545,14 @@ public class StructureMap30_50 { return null; org.hl7.fhir.dstu3.model.StructureMap.StructureMapStructureComponent tgt = new org.hl7.fhir.dstu3.model.StructureMap.StructureMapStructureComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_50.convertType(src.getUrlElement())); if (src.hasMode()) tgt.setMode(convertStructureMapModelMode(src.getMode())); - if (src.hasAlias()) - tgt.setAlias(src.getAlias()); - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasAliasElement()) + tgt.setAliasElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getAliasElement())); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getDocumentationElement())); return tgt; } @@ -560,14 +561,14 @@ public class StructureMap30_50 { return null; org.hl7.fhir.r5.model.StructureMap.StructureMapStructureComponent tgt = new org.hl7.fhir.r5.model.StructureMap.StructureMapStructureComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r5.model.CanonicalType) VersionConvertor_30_50.convertType(src.getUrlElement())); if (src.hasMode()) tgt.setMode(convertStructureMapModelMode(src.getMode())); - if (src.hasAlias()) - tgt.setAlias(src.getAlias()); - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasAliasElement()) + tgt.setAliasElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getAliasElement())); + if (src.hasDocumentationElement()) + tgt.setDocumentationElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getDocumentationElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Substance30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Substance30_50.java index de54cb3c8..aa1544ae0 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Substance30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Substance30_50.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_50; import org.hl7.fhir.convertors.VersionConvertor_30_50; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class Substance30_50 { @@ -50,8 +51,8 @@ public class Substance30_50 { } if (src.hasCode()) tgt.setCode(VersionConvertor_30_50.convertCodeableConcept(src.getCode())); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); if (src.hasInstance()) { for (org.hl7.fhir.dstu3.model.Substance.SubstanceInstanceComponent t : src.getInstance()) tgt.addInstance(convertSubstanceInstanceComponent(t)); } @@ -76,8 +77,8 @@ public class Substance30_50 { } if (src.hasCode()) tgt.setCode(VersionConvertor_30_50.convertCodeableConcept(src.getCode())); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); if (src.hasInstance()) { for (org.hl7.fhir.r5.model.Substance.SubstanceInstanceComponent t : src.getInstance()) tgt.addInstance(convertSubstanceInstanceComponent(t)); } @@ -118,8 +119,8 @@ public class Substance30_50 { VersionConvertor_30_50.copyElement(src, tgt); if (src.hasIdentifier()) tgt.setIdentifier(VersionConvertor_30_50.convertIdentifier(src.getIdentifier())); - if (src.hasExpiry()) - tgt.setExpiry(src.getExpiry()); + if (src.hasExpiryElement()) + tgt.setExpiryElement((org.hl7.fhir.r5.model.DateTimeType) VersionConvertor_30_50.convertType(src.getExpiryElement())); if (src.hasQuantity()) tgt.setQuantity(VersionConvertor_30_50.convertSimpleQuantity(src.getQuantity())); return tgt; @@ -132,8 +133,8 @@ public class Substance30_50 { VersionConvertor_30_50.copyElement(src, tgt); if (src.hasIdentifier()) tgt.setIdentifier(VersionConvertor_30_50.convertIdentifier(src.getIdentifier())); - if (src.hasExpiry()) - tgt.setExpiry(src.getExpiry()); + if (src.hasExpiryElement()) + tgt.setExpiryElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_30_50.convertType(src.getExpiryElement())); if (src.hasQuantity()) tgt.setQuantity(VersionConvertor_30_50.convertSimpleQuantity(src.getQuantity())); return tgt; diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/SupplyDelivery30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/SupplyDelivery30_50.java index cdd38ff27..7d316a3e8 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/SupplyDelivery30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/SupplyDelivery30_50.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_50; import org.hl7.fhir.convertors.VersionConvertor_30_50; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class SupplyDelivery30_50 { diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/TestReport30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/TestReport30_50.java index 681517841..4eaf59fa7 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/TestReport30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/TestReport30_50.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_50; import org.hl7.fhir.convertors.VersionConvertor_30_50; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class TestReport30_50 { @@ -12,20 +13,20 @@ public class TestReport30_50 { VersionConvertor_30_50.copyDomainResource(src, tgt); if (src.hasIdentifier()) tgt.setIdentifier(VersionConvertor_30_50.convertIdentifier(src.getIdentifier())); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getNameElement())); if (src.hasStatus()) tgt.setStatus(convertTestReportStatus(src.getStatus())); if (src.hasTestScript()) tgt.setTestScript(VersionConvertor_30_50.convertReference(src.getTestScript())); if (src.hasResult()) tgt.setResult(convertTestReportResult(src.getResult())); - if (src.hasScore()) - tgt.setScore(src.getScore()); - if (src.hasTester()) - tgt.setTester(src.getTester()); - if (src.hasIssued()) - tgt.setIssued(src.getIssued()); + if (src.hasScoreElement()) + tgt.setScoreElement((org.hl7.fhir.dstu3.model.DecimalType) VersionConvertor_30_50.convertType(src.getScoreElement())); + if (src.hasTesterElement()) + tgt.setTesterElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getTesterElement())); + if (src.hasIssuedElement()) + tgt.setIssuedElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_30_50.convertType(src.getIssuedElement())); if (src.hasParticipant()) { for (org.hl7.fhir.r5.model.TestReport.TestReportParticipantComponent t : src.getParticipant()) tgt.addParticipant(convertTestReportParticipantComponent(t)); } @@ -46,20 +47,20 @@ public class TestReport30_50 { VersionConvertor_30_50.copyDomainResource(src, tgt); if (src.hasIdentifier()) tgt.setIdentifier(VersionConvertor_30_50.convertIdentifier(src.getIdentifier())); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getNameElement())); if (src.hasStatus()) tgt.setStatus(convertTestReportStatus(src.getStatus())); if (src.hasTestScript()) tgt.setTestScript(VersionConvertor_30_50.convertReference(src.getTestScript())); if (src.hasResult()) tgt.setResult(convertTestReportResult(src.getResult())); - if (src.hasScore()) - tgt.setScore(src.getScore()); - if (src.hasTester()) - tgt.setTester(src.getTester()); - if (src.hasIssued()) - tgt.setIssued(src.getIssued()); + if (src.hasScoreElement()) + tgt.setScoreElement((org.hl7.fhir.r5.model.DecimalType) VersionConvertor_30_50.convertType(src.getScoreElement())); + if (src.hasTesterElement()) + tgt.setTesterElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getTesterElement())); + if (src.hasIssuedElement()) + tgt.setIssuedElement((org.hl7.fhir.r5.model.DateTimeType) VersionConvertor_30_50.convertType(src.getIssuedElement())); if (src.hasParticipant()) { for (org.hl7.fhir.dstu3.model.TestReport.TestReportParticipantComponent t : src.getParticipant()) tgt.addParticipant(convertTestReportParticipantComponent(t)); } @@ -80,10 +81,10 @@ public class TestReport30_50 { VersionConvertor_30_50.copyElement(src, tgt); if (src.hasType()) tgt.setType(convertTestReportParticipantType(src.getType())); - if (src.hasUri()) - tgt.setUri(src.getUri()); - if (src.hasDisplay()) - tgt.setDisplay(src.getDisplay()); + if (src.hasUriElement()) + tgt.setUriElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_50.convertType(src.getUriElement())); + if (src.hasDisplayElement()) + tgt.setDisplayElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getDisplayElement())); return tgt; } @@ -94,10 +95,10 @@ public class TestReport30_50 { VersionConvertor_30_50.copyElement(src, tgt); if (src.hasType()) tgt.setType(convertTestReportParticipantType(src.getType())); - if (src.hasUri()) - tgt.setUri(src.getUri()); - if (src.hasDisplay()) - tgt.setDisplay(src.getDisplay()); + if (src.hasUriElement()) + tgt.setUriElement((org.hl7.fhir.r5.model.UriType) VersionConvertor_30_50.convertType(src.getUriElement())); + if (src.hasDisplayElement()) + tgt.setDisplayElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getDisplayElement())); return tgt; } @@ -248,10 +249,10 @@ public class TestReport30_50 { return null; org.hl7.fhir.dstu3.model.TestReport.TestReportTestComponent tgt = new org.hl7.fhir.dstu3.model.TestReport.TestReportTestComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getNameElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); if (src.hasAction()) { for (org.hl7.fhir.r5.model.TestReport.TestActionComponent t : src.getAction()) tgt.addAction(VersionConvertor_30_50.convertTestActionComponent(t)); } @@ -263,10 +264,10 @@ public class TestReport30_50 { return null; org.hl7.fhir.r5.model.TestReport.TestReportTestComponent tgt = new org.hl7.fhir.r5.model.TestReport.TestReportTestComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getNameElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); if (src.hasAction()) { for (org.hl7.fhir.dstu3.model.TestReport.TestActionComponent t : src.getAction()) tgt.addAction(VersionConvertor_30_50.convertTestActionComponent(t)); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/TestScript30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/TestScript30_50.java index 8b64d0c44..0ba1fafd9 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/TestScript30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/TestScript30_50.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_50; import org.hl7.fhir.convertors.VersionConvertor_30_50; import org.hl7.fhir.exceptions.FHIRException; +import java.util.Collections; public class TestScript30_50 { @@ -10,39 +11,39 @@ public class TestScript30_50 { return null; org.hl7.fhir.r5.model.TestScript tgt = new org.hl7.fhir.r5.model.TestScript(); VersionConvertor_30_50.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r5.model.UriType) VersionConvertor_30_50.convertType(src.getUrlElement())); if (src.hasIdentifier()) tgt.addIdentifier(VersionConvertor_30_50.convertIdentifier(src.getIdentifier())); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getNameElement())); + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getTitleElement())); if (src.hasStatus()) tgt.setStatus(VersionConvertor_30_50.convertPublicationStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_30_50.convertType(src.getExperimentalElement())); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.r5.model.DateTimeType) VersionConvertor_30_50.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) tgt.addContact(VersionConvertor_30_50.convertContactDetail(t)); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r5.model.MarkdownType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); if (src.hasUseContext()) { for (org.hl7.fhir.dstu3.model.UsageContext t : src.getUseContext()) tgt.addUseContext(VersionConvertor_30_50.convertUsageContext(t)); } if (src.hasJurisdiction()) { for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getJurisdiction()) tgt.addJurisdiction(VersionConvertor_30_50.convertCodeableConcept(t)); } - if (src.hasPurpose()) - tgt.setPurpose(src.getPurpose()); - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); + if (src.hasPurposeElement()) + tgt.setPurposeElement((org.hl7.fhir.r5.model.MarkdownType) VersionConvertor_30_50.convertType(src.getPurposeElement())); + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.r5.model.MarkdownType) VersionConvertor_30_50.convertType(src.getCopyrightElement())); if (src.hasOrigin()) { for (org.hl7.fhir.dstu3.model.TestScript.TestScriptOriginComponent t : src.getOrigin()) tgt.addOrigin(convertTestScriptOriginComponent(t)); } @@ -75,39 +76,39 @@ public class TestScript30_50 { return null; org.hl7.fhir.dstu3.model.TestScript tgt = new org.hl7.fhir.dstu3.model.TestScript(); VersionConvertor_30_50.copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_50.convertType(src.getUrlElement())); if (src.hasIdentifier()) tgt.setIdentifier(VersionConvertor_30_50.convertIdentifier(src.getIdentifierFirstRep())); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getNameElement())); + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getTitleElement())); if (src.hasStatus()) tgt.setStatus(VersionConvertor_30_50.convertPublicationStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_50.convertType(src.getExperimentalElement())); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_30_50.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.r5.model.ContactDetail t : src.getContact()) tgt.addContact(VersionConvertor_30_50.convertContactDetail(t)); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); if (src.hasUseContext()) { for (org.hl7.fhir.r5.model.UsageContext t : src.getUseContext()) tgt.addUseContext(VersionConvertor_30_50.convertUsageContext(t)); } if (src.hasJurisdiction()) { for (org.hl7.fhir.r5.model.CodeableConcept t : src.getJurisdiction()) tgt.addJurisdiction(VersionConvertor_30_50.convertCodeableConcept(t)); } - if (src.hasPurpose()) - tgt.setPurpose(src.getPurpose()); - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); + if (src.hasPurposeElement()) + tgt.setPurposeElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_50.convertType(src.getPurposeElement())); + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_50.convertType(src.getCopyrightElement())); if (src.hasOrigin()) { for (org.hl7.fhir.r5.model.TestScript.TestScriptOriginComponent t : src.getOrigin()) tgt.addOrigin(convertTestScriptOriginComponent(t)); } @@ -140,8 +141,8 @@ public class TestScript30_50 { return null; org.hl7.fhir.dstu3.model.TestScript.TestScriptDestinationComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.TestScriptDestinationComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasIndex()) - tgt.setIndex(src.getIndex()); + if (src.hasIndexElement()) + tgt.setIndexElement((org.hl7.fhir.dstu3.model.IntegerType) VersionConvertor_30_50.convertType(src.getIndexElement())); if (src.hasProfile()) tgt.setProfile(VersionConvertor_30_50.convertCoding(src.getProfile())); return tgt; @@ -152,8 +153,8 @@ public class TestScript30_50 { return null; org.hl7.fhir.r5.model.TestScript.TestScriptDestinationComponent tgt = new org.hl7.fhir.r5.model.TestScript.TestScriptDestinationComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasIndex()) - tgt.setIndex(src.getIndex()); + if (src.hasIndexElement()) + tgt.setIndexElement((org.hl7.fhir.r5.model.IntegerType) VersionConvertor_30_50.convertType(src.getIndexElement())); if (src.hasProfile()) tgt.setProfile(VersionConvertor_30_50.convertCoding(src.getProfile())); return tgt; @@ -164,10 +165,10 @@ public class TestScript30_50 { return null; org.hl7.fhir.dstu3.model.TestScript.TestScriptFixtureComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.TestScriptFixtureComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasAutocreate()) - tgt.setAutocreate(src.getAutocreate()); - if (src.hasAutodelete()) - tgt.setAutodelete(src.getAutodelete()); + if (src.hasAutocreateElement()) + tgt.setAutocreateElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_50.convertType(src.getAutocreateElement())); + if (src.hasAutodeleteElement()) + tgt.setAutodeleteElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_50.convertType(src.getAutodeleteElement())); if (src.hasResource()) tgt.setResource(VersionConvertor_30_50.convertReference(src.getResource())); return tgt; @@ -178,10 +179,10 @@ public class TestScript30_50 { return null; org.hl7.fhir.r5.model.TestScript.TestScriptFixtureComponent tgt = new org.hl7.fhir.r5.model.TestScript.TestScriptFixtureComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasAutocreate()) - tgt.setAutocreate(src.getAutocreate()); - if (src.hasAutodelete()) - tgt.setAutodelete(src.getAutodelete()); + if (src.hasAutocreateElement()) + tgt.setAutocreateElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_30_50.convertType(src.getAutocreateElement())); + if (src.hasAutodeleteElement()) + tgt.setAutodeleteElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_30_50.convertType(src.getAutodeleteElement())); if (src.hasResource()) tgt.setResource(VersionConvertor_30_50.convertReference(src.getResource())); return tgt; @@ -192,17 +193,17 @@ public class TestScript30_50 { return null; org.hl7.fhir.dstu3.model.TestScript.TestScriptMetadataCapabilityComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.TestScriptMetadataCapabilityComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasRequired()) - tgt.setRequired(src.getRequired()); - if (src.hasValidated()) - tgt.setValidated(src.getValidated()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasRequiredElement()) + tgt.setRequiredElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_50.convertType(src.getRequiredElement())); + if (src.hasValidatedElement()) + tgt.setValidatedElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_50.convertType(src.getValidatedElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); if (src.hasOrigin()) { for (org.hl7.fhir.r5.model.IntegerType t : src.getOrigin()) tgt.addOrigin(t.getValue()); } - if (src.hasDestination()) - tgt.setDestination(src.getDestination()); + if (src.hasDestinationElement()) + tgt.setDestinationElement((org.hl7.fhir.dstu3.model.IntegerType) VersionConvertor_30_50.convertType(src.getDestinationElement())); if (src.hasLink()) { for (org.hl7.fhir.r5.model.UriType t : src.getLink()) tgt.addLink(t.getValue()); } @@ -216,17 +217,17 @@ public class TestScript30_50 { return null; org.hl7.fhir.r5.model.TestScript.TestScriptMetadataCapabilityComponent tgt = new org.hl7.fhir.r5.model.TestScript.TestScriptMetadataCapabilityComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasRequired()) - tgt.setRequired(src.getRequired()); - if (src.hasValidated()) - tgt.setValidated(src.getValidated()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasRequiredElement()) + tgt.setRequiredElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_30_50.convertType(src.getRequiredElement())); + if (src.hasValidatedElement()) + tgt.setValidatedElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_30_50.convertType(src.getValidatedElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); if (src.hasOrigin()) { for (org.hl7.fhir.dstu3.model.IntegerType t : src.getOrigin()) tgt.addOrigin(t.getValue()); } - if (src.hasDestination()) - tgt.setDestination(src.getDestination()); + if (src.hasDestinationElement()) + tgt.setDestinationElement((org.hl7.fhir.r5.model.IntegerType) VersionConvertor_30_50.convertType(src.getDestinationElement())); if (src.hasLink()) { for (org.hl7.fhir.dstu3.model.UriType t : src.getLink()) tgt.addLink(t.getValue()); } @@ -268,10 +269,10 @@ public class TestScript30_50 { return null; org.hl7.fhir.dstu3.model.TestScript.TestScriptMetadataLinkComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.TestScriptMetadataLinkComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_50.convertType(src.getUrlElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); return tgt; } @@ -280,10 +281,10 @@ public class TestScript30_50 { return null; org.hl7.fhir.r5.model.TestScript.TestScriptMetadataLinkComponent tgt = new org.hl7.fhir.r5.model.TestScript.TestScriptMetadataLinkComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r5.model.UriType) VersionConvertor_30_50.convertType(src.getUrlElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); return tgt; } @@ -292,8 +293,8 @@ public class TestScript30_50 { return null; org.hl7.fhir.dstu3.model.TestScript.TestScriptOriginComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.TestScriptOriginComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasIndex()) - tgt.setIndex(src.getIndex()); + if (src.hasIndexElement()) + tgt.setIndexElement((org.hl7.fhir.dstu3.model.IntegerType) VersionConvertor_30_50.convertType(src.getIndexElement())); if (src.hasProfile()) tgt.setProfile(VersionConvertor_30_50.convertCoding(src.getProfile())); return tgt; @@ -304,8 +305,8 @@ public class TestScript30_50 { return null; org.hl7.fhir.r5.model.TestScript.TestScriptOriginComponent tgt = new org.hl7.fhir.r5.model.TestScript.TestScriptOriginComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasIndex()) - tgt.setIndex(src.getIndex()); + if (src.hasIndexElement()) + tgt.setIndexElement((org.hl7.fhir.r5.model.IntegerType) VersionConvertor_30_50.convertType(src.getIndexElement())); if (src.hasProfile()) tgt.setProfile(VersionConvertor_30_50.convertCoding(src.getProfile())); return tgt; @@ -360,10 +361,10 @@ public class TestScript30_50 { return null; org.hl7.fhir.dstu3.model.TestScript.TestScriptTestComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.TestScriptTestComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getNameElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); if (src.hasAction()) { for (org.hl7.fhir.r5.model.TestScript.TestActionComponent t : src.getAction()) tgt.addAction(VersionConvertor_30_50.convertTestActionComponent(t)); } @@ -375,10 +376,10 @@ public class TestScript30_50 { return null; org.hl7.fhir.r5.model.TestScript.TestScriptTestComponent tgt = new org.hl7.fhir.r5.model.TestScript.TestScriptTestComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getNameElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); if (src.hasAction()) { for (org.hl7.fhir.dstu3.model.TestScript.TestActionComponent t : src.getAction()) tgt.addAction(VersionConvertor_30_50.convertTestActionComponent(t)); } @@ -390,22 +391,22 @@ public class TestScript30_50 { return null; org.hl7.fhir.r5.model.TestScript.TestScriptVariableComponent tgt = new org.hl7.fhir.r5.model.TestScript.TestScriptVariableComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasDefaultValue()) - tgt.setDefaultValue(src.getDefaultValue()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - if (src.hasExpression()) - tgt.setExpression(src.getExpression()); - if (src.hasHeaderField()) - tgt.setHeaderField(src.getHeaderField()); - if (src.hasHint()) - tgt.setHint(src.getHint()); - if (src.hasPath()) - tgt.setPath(src.getPath()); - if (src.hasSourceId()) - tgt.setSourceId(src.getSourceId()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getNameElement())); + if (src.hasDefaultValueElement()) + tgt.setDefaultValueElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getDefaultValueElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); + if (src.hasExpressionElement()) + tgt.setExpressionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getExpressionElement())); + if (src.hasHeaderFieldElement()) + tgt.setHeaderFieldElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getHeaderFieldElement())); + if (src.hasHintElement()) + tgt.setHintElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getHintElement())); + if (src.hasPathElement()) + tgt.setPathElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getPathElement())); + if (src.hasSourceIdElement()) + tgt.setSourceIdElement((org.hl7.fhir.r5.model.IdType) VersionConvertor_30_50.convertType(src.getSourceIdElement())); return tgt; } @@ -414,22 +415,22 @@ public class TestScript30_50 { return null; org.hl7.fhir.dstu3.model.TestScript.TestScriptVariableComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.TestScriptVariableComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasDefaultValue()) - tgt.setDefaultValue(src.getDefaultValue()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - if (src.hasExpression()) - tgt.setExpression(src.getExpression()); - if (src.hasHeaderField()) - tgt.setHeaderField(src.getHeaderField()); - if (src.hasHint()) - tgt.setHint(src.getHint()); - if (src.hasPath()) - tgt.setPath(src.getPath()); - if (src.hasSourceId()) - tgt.setSourceId(src.getSourceId()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getNameElement())); + if (src.hasDefaultValueElement()) + tgt.setDefaultValueElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getDefaultValueElement())); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); + if (src.hasExpressionElement()) + tgt.setExpressionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getExpressionElement())); + if (src.hasHeaderFieldElement()) + tgt.setHeaderFieldElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getHeaderFieldElement())); + if (src.hasHintElement()) + tgt.setHintElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getHintElement())); + if (src.hasPathElement()) + tgt.setPathElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getPathElement())); + if (src.hasSourceIdElement()) + tgt.setSourceIdElement((org.hl7.fhir.dstu3.model.IdType) VersionConvertor_30_50.convertType(src.getSourceIdElement())); return tgt; } } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/ValueSet30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/ValueSet30_50.java index c048a2682..426e77c80 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/ValueSet30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/ValueSet30_50.java @@ -3,6 +3,7 @@ package org.hl7.fhir.convertors.conv30_50; import org.hl7.fhir.convertors.VersionConvertor_30_50; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r5.model.BooleanType; +import java.util.Collections; public class ValueSet30_50 { @@ -11,10 +12,10 @@ public class ValueSet30_50 { return null; org.hl7.fhir.dstu3.model.ValueSet.ConceptReferenceComponent tgt = new org.hl7.fhir.dstu3.model.ValueSet.ConceptReferenceComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasCode()) - tgt.setCode(src.getCode()); - if (src.hasDisplay()) - tgt.setDisplay(src.getDisplay()); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_30_50.convertType(src.getCodeElement())); + if (src.hasDisplayElement()) + tgt.setDisplayElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getDisplayElement())); if (src.hasDesignation()) { for (org.hl7.fhir.r5.model.ValueSet.ConceptReferenceDesignationComponent t : src.getDesignation()) tgt.addDesignation(convertConceptReferenceDesignationComponent(t)); } @@ -26,10 +27,10 @@ public class ValueSet30_50 { return null; org.hl7.fhir.r5.model.ValueSet.ConceptReferenceComponent tgt = new org.hl7.fhir.r5.model.ValueSet.ConceptReferenceComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasCode()) - tgt.setCode(src.getCode()); - if (src.hasDisplay()) - tgt.setDisplay(src.getDisplay()); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.r5.model.CodeType) VersionConvertor_30_50.convertType(src.getCodeElement())); + if (src.hasDisplayElement()) + tgt.setDisplayElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getDisplayElement())); if (src.hasDesignation()) { for (org.hl7.fhir.dstu3.model.ValueSet.ConceptReferenceDesignationComponent t : src.getDesignation()) tgt.addDesignation(convertConceptReferenceDesignationComponent(t)); } @@ -41,12 +42,12 @@ public class ValueSet30_50 { return null; org.hl7.fhir.r5.model.ValueSet.ConceptReferenceDesignationComponent tgt = new org.hl7.fhir.r5.model.ValueSet.ConceptReferenceDesignationComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasLanguage()) - tgt.setLanguage(src.getLanguage()); + if (src.hasLanguageElement()) + tgt.setLanguageElement((org.hl7.fhir.r5.model.CodeType) VersionConvertor_30_50.convertType(src.getLanguageElement())); if (src.hasUse()) tgt.setUse(VersionConvertor_30_50.convertCoding(src.getUse())); - if (src.hasValue()) - tgt.setValue(src.getValue()); + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getValueElement())); return tgt; } @@ -55,12 +56,12 @@ public class ValueSet30_50 { return null; org.hl7.fhir.dstu3.model.ValueSet.ConceptReferenceDesignationComponent tgt = new org.hl7.fhir.dstu3.model.ValueSet.ConceptReferenceDesignationComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasLanguage()) - tgt.setLanguage(src.getLanguage()); + if (src.hasLanguageElement()) + tgt.setLanguageElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_30_50.convertType(src.getLanguageElement())); if (src.hasUse()) tgt.setUse(VersionConvertor_30_50.convertCoding(src.getUse())); - if (src.hasValue()) - tgt.setValue(src.getValue()); + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getValueElement())); return tgt; } @@ -69,10 +70,10 @@ public class ValueSet30_50 { return null; org.hl7.fhir.r5.model.ValueSet.ConceptSetComponent tgt = new org.hl7.fhir.r5.model.ValueSet.ConceptSetComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasSystem()) - tgt.setSystem(src.getSystem()); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); + if (src.hasSystemElement()) + tgt.setSystemElement((org.hl7.fhir.r5.model.UriType) VersionConvertor_30_50.convertType(src.getSystemElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getVersionElement())); if (src.hasConcept()) { for (org.hl7.fhir.dstu3.model.ValueSet.ConceptReferenceComponent t : src.getConcept()) tgt.addConcept(convertConceptReferenceComponent(t)); } @@ -90,10 +91,10 @@ public class ValueSet30_50 { return null; org.hl7.fhir.dstu3.model.ValueSet.ConceptSetComponent tgt = new org.hl7.fhir.dstu3.model.ValueSet.ConceptSetComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasSystem()) - tgt.setSystem(src.getSystem()); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); + if (src.hasSystemElement()) + tgt.setSystemElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_50.convertType(src.getSystemElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getVersionElement())); if (src.hasConcept()) { for (org.hl7.fhir.r5.model.ValueSet.ConceptReferenceComponent t : src.getConcept()) tgt.addConcept(convertConceptReferenceComponent(t)); } @@ -111,12 +112,12 @@ public class ValueSet30_50 { return null; org.hl7.fhir.dstu3.model.ValueSet.ConceptSetFilterComponent tgt = new org.hl7.fhir.dstu3.model.ValueSet.ConceptSetFilterComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasProperty()) - tgt.setProperty(src.getProperty()); + if (src.hasPropertyElement()) + tgt.setPropertyElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_30_50.convertType(src.getPropertyElement())); if (src.hasOp()) tgt.setOp(convertFilterOperator2(src.getOp())); - if (src.hasValue()) - tgt.setValue(src.getValue()); + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_30_50.convertType(src.getValueElement())); return tgt; } @@ -125,12 +126,12 @@ public class ValueSet30_50 { return null; org.hl7.fhir.r5.model.ValueSet.ConceptSetFilterComponent tgt = new org.hl7.fhir.r5.model.ValueSet.ConceptSetFilterComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasProperty()) - tgt.setProperty(src.getProperty()); + if (src.hasPropertyElement()) + tgt.setPropertyElement((org.hl7.fhir.r5.model.CodeType) VersionConvertor_30_50.convertType(src.getPropertyElement())); if (src.hasOp()) tgt.setOp(VersionConvertor_30_50.convertFilterOperator(src.getOp())); - if (src.hasValue()) - tgt.setValue(src.getValue()); + if (src.hasValueElement()) + tgt.setValueElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getValueElement())); return tgt; } @@ -166,42 +167,42 @@ public class ValueSet30_50 { return null; org.hl7.fhir.r5.model.ValueSet tgt = new org.hl7.fhir.r5.model.ValueSet(); VersionConvertor_30_50.copyDomainResource(src, tgt, "http://hl7.org/fhir/StructureDefinition/valueset-extensible"); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.r5.model.UriType) VersionConvertor_30_50.convertType(src.getUrlElement())); if (src.hasIdentifier()) { for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_30_50.convertIdentifier(t)); } - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getNameElement())); + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getTitleElement())); if (src.hasStatus()) tgt.setStatus(VersionConvertor_30_50.convertPublicationStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_30_50.convertType(src.getExperimentalElement())); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.r5.model.DateTimeType) VersionConvertor_30_50.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) tgt.addContact(VersionConvertor_30_50.convertContactDetail(t)); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.r5.model.MarkdownType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); if (src.hasUseContext()) { for (org.hl7.fhir.dstu3.model.UsageContext t : src.getUseContext()) tgt.addUseContext(VersionConvertor_30_50.convertUsageContext(t)); } if (src.hasJurisdiction()) { for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getJurisdiction()) tgt.addJurisdiction(VersionConvertor_30_50.convertCodeableConcept(t)); } - if (src.hasImmutable()) - tgt.setImmutable(src.getImmutable()); - if (src.hasPurpose()) - tgt.setPurpose(src.getPurpose()); - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); + if (src.hasImmutableElement()) + tgt.setImmutableElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_30_50.convertType(src.getImmutableElement())); + if (src.hasPurposeElement()) + tgt.setPurposeElement((org.hl7.fhir.r5.model.MarkdownType) VersionConvertor_30_50.convertType(src.getPurposeElement())); + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.r5.model.MarkdownType) VersionConvertor_30_50.convertType(src.getCopyrightElement())); if (src.hasExtensible()) tgt.addExtension("http://hl7.org/fhir/StructureDefinition/valueset-extensible", new BooleanType(src.getExtensible())); if (src.hasCompose()) @@ -216,42 +217,42 @@ public class ValueSet30_50 { return null; org.hl7.fhir.dstu3.model.ValueSet tgt = new org.hl7.fhir.dstu3.model.ValueSet(); VersionConvertor_30_50.copyDomainResource(src, tgt, "http://hl7.org/fhir/StructureDefinition/valueset-extensible"); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); + if (src.hasUrlElement()) + tgt.setUrlElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_50.convertType(src.getUrlElement())); if (src.hasIdentifier()) { for (org.hl7.fhir.r5.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_30_50.convertIdentifier(t)); } - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getVersionElement())); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getNameElement())); + if (src.hasTitleElement()) + tgt.setTitleElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getTitleElement())); if (src.hasStatus()) tgt.setStatus(VersionConvertor_30_50.convertPublicationStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); + if (src.hasExperimentalElement()) + tgt.setExperimentalElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_50.convertType(src.getExperimentalElement())); + if (src.hasDateElement()) + tgt.setDateElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_30_50.convertType(src.getDateElement())); + if (src.hasPublisherElement()) + tgt.setPublisherElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getPublisherElement())); if (src.hasContact()) { for (org.hl7.fhir.r5.model.ContactDetail t : src.getContact()) tgt.addContact(VersionConvertor_30_50.convertContactDetail(t)); } - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); + if (src.hasDescriptionElement()) + tgt.setDescriptionElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_50.convertType(src.getDescriptionElement())); if (src.hasUseContext()) { for (org.hl7.fhir.r5.model.UsageContext t : src.getUseContext()) tgt.addUseContext(VersionConvertor_30_50.convertUsageContext(t)); } if (src.hasJurisdiction()) { for (org.hl7.fhir.r5.model.CodeableConcept t : src.getJurisdiction()) tgt.addJurisdiction(VersionConvertor_30_50.convertCodeableConcept(t)); } - if (src.hasImmutable()) - tgt.setImmutable(src.getImmutable()); - if (src.hasPurpose()) - tgt.setPurpose(src.getPurpose()); - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); + if (src.hasImmutableElement()) + tgt.setImmutableElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_50.convertType(src.getImmutableElement())); + if (src.hasPurposeElement()) + tgt.setPurposeElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_50.convertType(src.getPurposeElement())); + if (src.hasCopyrightElement()) + tgt.setCopyrightElement((org.hl7.fhir.dstu3.model.MarkdownType) VersionConvertor_30_50.convertType(src.getCopyrightElement())); if (src.hasExtension("http://hl7.org/fhir/StructureDefinition/valueset-extensible")) tgt.setExtensible(((BooleanType) src.getExtensionByUrl("http://hl7.org/fhir/StructureDefinition/valueset-extensible").getValue()).booleanValue()); if (src.hasCompose()) @@ -266,10 +267,10 @@ public class ValueSet30_50 { return null; org.hl7.fhir.r5.model.ValueSet.ValueSetComposeComponent tgt = new org.hl7.fhir.r5.model.ValueSet.ValueSetComposeComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasLockedDate()) - tgt.setLockedDate(src.getLockedDate()); - if (src.hasInactive()) - tgt.setInactive(src.getInactive()); + if (src.hasLockedDateElement()) + tgt.setLockedDateElement((org.hl7.fhir.r5.model.DateType) VersionConvertor_30_50.convertType(src.getLockedDateElement())); + if (src.hasInactiveElement()) + tgt.setInactiveElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_30_50.convertType(src.getInactiveElement())); if (src.hasInclude()) { for (org.hl7.fhir.dstu3.model.ValueSet.ConceptSetComponent t : src.getInclude()) tgt.addInclude(convertConceptSetComponent(t)); } @@ -284,10 +285,10 @@ public class ValueSet30_50 { return null; org.hl7.fhir.dstu3.model.ValueSet.ValueSetComposeComponent tgt = new org.hl7.fhir.dstu3.model.ValueSet.ValueSetComposeComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasLockedDate()) - tgt.setLockedDate(src.getLockedDate()); - if (src.hasInactive()) - tgt.setInactive(src.getInactive()); + if (src.hasLockedDateElement()) + tgt.setLockedDateElement((org.hl7.fhir.dstu3.model.DateType) VersionConvertor_30_50.convertType(src.getLockedDateElement())); + if (src.hasInactiveElement()) + tgt.setInactiveElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_50.convertType(src.getInactiveElement())); if (src.hasInclude()) { for (org.hl7.fhir.r5.model.ValueSet.ConceptSetComponent t : src.getInclude()) tgt.addInclude(convertConceptSetComponent(t)); } @@ -302,14 +303,14 @@ public class ValueSet30_50 { return null; org.hl7.fhir.r5.model.ValueSet.ValueSetExpansionComponent tgt = new org.hl7.fhir.r5.model.ValueSet.ValueSetExpansionComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasIdentifier()) - tgt.setIdentifier(src.getIdentifier()); - if (src.hasTimestamp()) - tgt.setTimestamp(src.getTimestamp()); - if (src.hasTotal()) - tgt.setTotal(src.getTotal()); - if (src.hasOffset()) - tgt.setOffset(src.getOffset()); + if (src.hasIdentifierElement()) + tgt.setIdentifierElement((org.hl7.fhir.r5.model.UriType) VersionConvertor_30_50.convertType(src.getIdentifierElement())); + if (src.hasTimestampElement()) + tgt.setTimestampElement((org.hl7.fhir.r5.model.DateTimeType) VersionConvertor_30_50.convertType(src.getTimestampElement())); + if (src.hasTotalElement()) + tgt.setTotalElement((org.hl7.fhir.r5.model.IntegerType) VersionConvertor_30_50.convertType(src.getTotalElement())); + if (src.hasOffsetElement()) + tgt.setOffsetElement((org.hl7.fhir.r5.model.IntegerType) VersionConvertor_30_50.convertType(src.getOffsetElement())); if (src.hasParameter()) { for (org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionParameterComponent t : src.getParameter()) tgt.addParameter(convertValueSetExpansionParameterComponent(t)); } @@ -324,14 +325,14 @@ public class ValueSet30_50 { return null; org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionComponent tgt = new org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasIdentifier()) - tgt.setIdentifier(src.getIdentifier()); - if (src.hasTimestamp()) - tgt.setTimestamp(src.getTimestamp()); - if (src.hasTotal()) - tgt.setTotal(src.getTotal()); - if (src.hasOffset()) - tgt.setOffset(src.getOffset()); + if (src.hasIdentifierElement()) + tgt.setIdentifierElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_50.convertType(src.getIdentifierElement())); + if (src.hasTimestampElement()) + tgt.setTimestampElement((org.hl7.fhir.dstu3.model.DateTimeType) VersionConvertor_30_50.convertType(src.getTimestampElement())); + if (src.hasTotalElement()) + tgt.setTotalElement((org.hl7.fhir.dstu3.model.IntegerType) VersionConvertor_30_50.convertType(src.getTotalElement())); + if (src.hasOffsetElement()) + tgt.setOffsetElement((org.hl7.fhir.dstu3.model.IntegerType) VersionConvertor_30_50.convertType(src.getOffsetElement())); if (src.hasParameter()) { for (org.hl7.fhir.r5.model.ValueSet.ValueSetExpansionParameterComponent t : src.getParameter()) tgt.addParameter(convertValueSetExpansionParameterComponent(t)); } @@ -346,18 +347,18 @@ public class ValueSet30_50 { return null; org.hl7.fhir.r5.model.ValueSet.ValueSetExpansionContainsComponent tgt = new org.hl7.fhir.r5.model.ValueSet.ValueSetExpansionContainsComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasSystem()) - tgt.setSystem(src.getSystem()); - if (src.hasAbstract()) - tgt.setAbstract(src.getAbstract()); - if (src.hasInactive()) - tgt.setInactive(src.getInactive()); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasCode()) - tgt.setCode(src.getCode()); - if (src.hasDisplay()) - tgt.setDisplay(src.getDisplay()); + if (src.hasSystemElement()) + tgt.setSystemElement((org.hl7.fhir.r5.model.UriType) VersionConvertor_30_50.convertType(src.getSystemElement())); + if (src.hasAbstractElement()) + tgt.setAbstractElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_30_50.convertType(src.getAbstractElement())); + if (src.hasInactiveElement()) + tgt.setInactiveElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_30_50.convertType(src.getInactiveElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getVersionElement())); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.r5.model.CodeType) VersionConvertor_30_50.convertType(src.getCodeElement())); + if (src.hasDisplayElement()) + tgt.setDisplayElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getDisplayElement())); if (src.hasDesignation()) { for (org.hl7.fhir.dstu3.model.ValueSet.ConceptReferenceDesignationComponent t : src.getDesignation()) tgt.addDesignation(convertConceptReferenceDesignationComponent(t)); } @@ -372,18 +373,18 @@ public class ValueSet30_50 { return null; org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionContainsComponent tgt = new org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionContainsComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasSystem()) - tgt.setSystem(src.getSystem()); - if (src.hasAbstract()) - tgt.setAbstract(src.getAbstract()); - if (src.hasInactive()) - tgt.setInactive(src.getInactive()); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasCode()) - tgt.setCode(src.getCode()); - if (src.hasDisplay()) - tgt.setDisplay(src.getDisplay()); + if (src.hasSystemElement()) + tgt.setSystemElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_50.convertType(src.getSystemElement())); + if (src.hasAbstractElement()) + tgt.setAbstractElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_50.convertType(src.getAbstractElement())); + if (src.hasInactiveElement()) + tgt.setInactiveElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_50.convertType(src.getInactiveElement())); + if (src.hasVersionElement()) + tgt.setVersionElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getVersionElement())); + if (src.hasCodeElement()) + tgt.setCodeElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_30_50.convertType(src.getCodeElement())); + if (src.hasDisplayElement()) + tgt.setDisplayElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getDisplayElement())); if (src.hasDesignation()) { for (org.hl7.fhir.r5.model.ValueSet.ConceptReferenceDesignationComponent t : src.getDesignation()) tgt.addDesignation(convertConceptReferenceDesignationComponent(t)); } @@ -398,8 +399,8 @@ public class ValueSet30_50 { return null; org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionParameterComponent tgt = new org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionParameterComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getNameElement())); if (src.hasValue()) tgt.setValue(VersionConvertor_30_50.convertType(src.getValue())); return tgt; @@ -410,8 +411,8 @@ public class ValueSet30_50 { return null; org.hl7.fhir.r5.model.ValueSet.ValueSetExpansionParameterComponent tgt = new org.hl7.fhir.r5.model.ValueSet.ValueSetExpansionParameterComponent(); VersionConvertor_30_50.copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); + if (src.hasNameElement()) + tgt.setNameElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getNameElement())); if (src.hasValue()) tgt.setValue(VersionConvertor_30_50.convertType(src.getValue())); return tgt; diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/parser/Parser.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/parser/Parser.java index 6e54f824d..b3e6cd24a 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/parser/Parser.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/parser/Parser.java @@ -92,7 +92,7 @@ public class Parser { // VERSION_FILES.forEach(version -> { - String version = "30_40"; + String version = "30_50"; List filenames = listAllJavaFilesInDirectory(new File("").getAbsolutePath() + "/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv" + version + "/"); System.out.println("Checking the following files:"); Collections.sort(filenames); From b10aa49f1657940c05aa906c78dda9e65fd7f9b4 Mon Sep 17 00:00:00 2001 From: markiantorno Date: Mon, 10 Feb 2020 11:28:19 -0500 Subject: [PATCH 12/12] Cleanup of parsing files. --- org.hl7.fhir.convertors/pom.xml | 7 - .../hl7/fhir/convertors/parser/Parser.java | 1782 ----------------- .../fhir/convertors/parser/ParserTest.java | 12 - 3 files changed, 1801 deletions(-) delete mode 100644 org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/parser/Parser.java delete mode 100644 org.hl7.fhir.convertors/src/test/java/org/hl7/fhir/convertors/parser/ParserTest.java diff --git a/org.hl7.fhir.convertors/pom.xml b/org.hl7.fhir.convertors/pom.xml index 0dbc844b6..c31501189 100644 --- a/org.hl7.fhir.convertors/pom.xml +++ b/org.hl7.fhir.convertors/pom.xml @@ -59,13 +59,6 @@ true - - - com.github.javaparser - javaparser-symbol-solver-core - 3.15.9 - - diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/parser/Parser.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/parser/Parser.java deleted file mode 100644 index b3e6cd24a..000000000 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/parser/Parser.java +++ /dev/null @@ -1,1782 +0,0 @@ -package org.hl7.fhir.convertors.parser; - -import com.github.javaparser.StaticJavaParser; -import com.github.javaparser.ast.*; -import com.github.javaparser.ast.body.*; -import com.github.javaparser.ast.comments.Comment; -import com.github.javaparser.ast.expr.Expression; -import com.github.javaparser.ast.expr.MethodCallExpr; -import com.github.javaparser.ast.expr.NameExpr; -import com.github.javaparser.ast.nodeTypes.NodeWithIdentifier; -import com.github.javaparser.ast.nodeTypes.NodeWithName; -import com.github.javaparser.ast.nodeTypes.NodeWithSimpleName; -import com.github.javaparser.ast.nodeTypes.modifiers.NodeWithStaticModifier; -import com.github.javaparser.ast.stmt.*; -import com.github.javaparser.ast.type.Type; -import com.github.javaparser.ast.type.VarType; -import com.github.javaparser.ast.visitor.ModifierVisitor; -import com.github.javaparser.ast.visitor.Visitable; -import com.github.javaparser.ast.visitor.VoidVisitorAdapter; -import com.github.javaparser.resolution.declarations.ResolvedMethodDeclaration; -import com.github.javaparser.symbolsolver.JavaSymbolSolver; -import com.github.javaparser.symbolsolver.javaparsermodel.declarations.JavaParserMethodDeclaration; -import com.github.javaparser.symbolsolver.model.resolution.TypeSolver; -import com.github.javaparser.symbolsolver.resolution.typesolvers.CombinedTypeSolver; -import com.github.javaparser.symbolsolver.resolution.typesolvers.JarTypeSolver; -import com.github.javaparser.symbolsolver.resolution.typesolvers.JavaParserTypeSolver; -import com.github.javaparser.symbolsolver.resolution.typesolvers.ReflectionTypeSolver; -import org.hl7.fhir.dstu3.model.Enumeration; -import org.hl7.fhir.dstu3.model.MedicationAdministration; - -import java.io.*; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.Paths; -import java.util.*; -import java.util.concurrent.ConcurrentHashMap; -import java.util.function.Function; -import java.util.function.Predicate; -import java.util.stream.Collectors; -import java.util.stream.Stream; - -/** - * TODO Line auditing function, try copying based on line numbers and based on MethodDeclr, and compare the outputs - */ -public class Parser { - - public static final String ELEMENT = "Element"; - private static final String RESOURCE_FILE_FORMAT = "_%s"; //TODO fix - private static final List VERSION_FILES = Arrays.asList("10_30", "10_40", "10_50", "14_30", "14_40", "14_50", "30_40", "30_50", "40_50"); - private static final List BASE_TYPES = Arrays.asList("Base64Binary", "Boolean", "boolean", "Canonical", "Code", - "Enumeration", "Date", "DateTime", "DateType", "Decimal", "BigDecimal", "Id", "Instant", "Integer", "int", "Integer64", - "Markdown", "Oid", "PositiveInt", "String", "Time", "UnsignedInt", "Uri", "Url", - "Uuid", "XhtmlNode"); - -// private static org.hl7.fhir.r5.model.Enumeration -// convertMedicationAdministrationStatus(org.hl7.fhir.dstu3.model.Enumeration src) { -// if (src == null) -// return null; -// org.hl7.fhir.r5.model.Enumeration tgt -// = new org.hl7.fhir.r5.model.Enumeration(); -// copyElement(src, tgt); -// tgt.setValue(org.hl7.fhir.r5.model.MedicationAdministration.MedicationAdministrationStatusCodes.fromCode(src.getValueAsString())); -// return tgt; -// } -// -// private static void copyElement(java.util.Enumeration src, -// org.hl7.fhir.r5.model.Enumeration tgt) { -// -// } - - - /** - * @param args - */ - public static void main(String[] args) { - /* - * every tgt.setX(convertT(src.getX)) should be dependent on a hasX - in principle that doesn't matter when you're - * dealing with singleton elements if convertT checks for null and setX accepts null - which *should* be the case. - * But there's enough special cases and other things that I have a lot less bugs where we always do if (src.hasX()) - */ - - List listOfPrimitiveTypes = BASE_TYPES;//getListOfPrimitiveTypes(); - - try { - initializeResolver(new File("").getAbsolutePath(), DIRECTORY_WHERE_THE_CODE_LIVES); - } catch (IOException e) { - e.printStackTrace(); - } - - System.out.println("get to version AuditEvent10_30 :: " + getModelImportToVersion("AuditEvent10_30")); - System.out.println("get from version AuditEvent10_30 :: " + getModelImportFromVersion("AuditEvent10_30")); - - -// VERSION_FILES.forEach(version -> { - String version = "30_50"; - List filenames = listAllJavaFilesInDirectory(new File("").getAbsolutePath() + "/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv" + version + "/"); - System.out.println("Checking the following files:"); - Collections.sort(filenames); - filenames.forEach(System.out::println); - filenames.forEach(name -> { - try { - modifyElementNotField("/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv" + version + "/", name, ".java", listOfPrimitiveTypes, version); - } catch (FileNotFoundException e) { - e.printStackTrace(); - } - }); -// }); -// - try { -// modifyElementNotField("/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_30/", "DataElement14_30", ".java", listOfPrimitiveTypes, "14_30"); -// modifyElementNotField("/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/", "AuditEvent10_30", ".java", listOfPrimitiveTypes, "10_30"); -// modifyElementNotField("/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/", "Binary10_30", ".java", listOfPrimitiveTypes, "10_30"); -// modifyElementNotField("/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/", "Bundle10_30", ".java", listOfPrimitiveTypes, "10_30"); -// modifyElementNotField("/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/", "ClinicalImpression10_30", ".java", listOfPrimitiveTypes, "10_30"); -// modifyElementNotField("/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/", "Communication10_30", ".java", listOfPrimitiveTypes, "10_30"); - } catch (Exception e) { - System.out.println(); - } - System.out.println(); - } - - public static void modifyElementNotField(String srcdirectory, String filename, String extension, List listOfPrimitiveTypes, String version) throws FileNotFoundException { - System.out.println("File :: " + filename); - - String projectDirectory = new File("").getAbsolutePath(); - String srcFilePathWithExtension = projectDirectory + srcdirectory + filename + extension; - long start = System.currentTimeMillis(); - - CompilationUnit compilationUnit = getCompilationUnit(projectDirectory + srcdirectory + filename + extension); - ClassOrInterfaceDeclaration classOrInterfaceDeclaration = initializeTypeSovlerAndParser(compilationUnit, - projectDirectory, srcdirectory, filename); - - Set visited = new HashSet<>(); - - HashMap ifStatementToConditions = new HashMap<>(); - HashMap> keyWordToIfStatement = new HashMap<>(); - - final HashMap generatedBlockStmt = new HashMap<>(); - - MethodDeclaration declaration = classOrInterfaceDeclaration.getMethods().stream() - .filter(md -> md.getNameAsString().equals("convert" + extractName(filename))) - .findFirst().get(); - - String lowerVersionTypeAbsPath = getLowerVersionAbsPathFromImportStatement(declaration.getTypeAsString(), declaration.getParameter(0).getTypeAsString(), version); - String higherVersionTypeAbsPath = getHigherVersionAbsPath(declaration.getTypeAsString(), declaration.getParameter(0).getTypeAsString(), version); - - CompilationUnit lowerCU = StaticJavaParser.parse(new File(lowerVersionTypeAbsPath)); - CompilationUnit higherCU = StaticJavaParser.parse(new File(higherVersionTypeAbsPath)); - System.out.println(); - - List methods = classOrInterfaceDeclaration.getMethods(); - methods.forEach(md -> { - - String toType = importStatementToAbsolutePath(md.getType().asString()); - String fromType = importStatementToAbsolutePath(md.getParameter(0).getType().asString()); - - ClassOrInterfaceDeclaration toTypeClass = null; - ClassOrInterfaceDeclaration fromTypeClass = null; - - String lowerVersionAbsPath = getLowerVersionAbsPathFromAbsPath(toType, fromType, version); - String toString = toType.substring(toType.lastIndexOf('/') + 1, toType.lastIndexOf('.')); - - String fromString = fromType.substring(fromType.lastIndexOf('/') + 1, fromType.lastIndexOf('.')); - if (toType.equals(lowerVersionAbsPath)) { - try { - if (toString.equals(extractName(filename))) { - toTypeClass = lowerCU.getClassByName(toString).get(); - fromTypeClass = higherCU.getClassByName(fromString).get(); - } else { - Node declaration1 = getDeclaration(lowerCU, filename, toString); - if (declaration1 instanceof ClassOrInterfaceDeclaration) { - toTypeClass = (ClassOrInterfaceDeclaration) declaration1; - } else if (declaration1 instanceof EnumDeclaration) { - System.out.println("Filename " + filename + " target String " + toString + ", is an EnumDeclaration"); - } - - Node declaration2 = getDeclaration(higherCU, filename, fromString); - if (declaration2 instanceof ClassOrInterfaceDeclaration) { - fromTypeClass = (ClassOrInterfaceDeclaration) declaration2; - } else if (declaration2 instanceof EnumDeclaration) { - System.out.println("Filename " + filename + " target String " + toString + ", is an EnumDeclaration"); - } - } - } catch (Exception e) { - System.out.println(); - } - } else { - try { - if (toString.equals(extractName(filename))) { - toTypeClass = higherCU.getClassByName(toString).get(); - fromTypeClass = lowerCU.getClassByName(fromString).get(); - } else { - Node declaration1 = getDeclaration(higherCU, filename, toString); - if (declaration1 instanceof ClassOrInterfaceDeclaration) { - toTypeClass = (ClassOrInterfaceDeclaration) declaration1; - } else if (declaration1 instanceof EnumDeclaration) { - System.out.println("Filename " + filename + " target String " + toString + ", is an EnumDeclaration"); - } - Node declaration2 = getDeclaration(lowerCU, filename, fromString); - if (declaration2 instanceof ClassOrInterfaceDeclaration) { - fromTypeClass = (ClassOrInterfaceDeclaration) declaration2; - } else if (declaration2 instanceof EnumDeclaration) { - System.out.println("Filename " + filename + " target String " + toString + ", is an EnumDeclaration"); - } - } - } catch (Exception e) { - System.out.println(); - } - } - - if (toTypeClass != null && fromTypeClass != null) { - ClassOrInterfaceDeclaration finalFromTypeClass = fromTypeClass; - ClassOrInterfaceDeclaration finalToTypeClass = toTypeClass; - md.accept(new ModifierVisitor() { - @Override - public Visitable visit(MethodCallExpr n, Void arg) { - super.visit(n, arg); - - if (n.getNameAsString().contains("get") && !visited.contains(n.getNameAsString())) { - visited.add(n.getNameAsString()); - - Optional first = finalFromTypeClass.getMethods().stream() - .filter(md -> md.getNameAsString().equals(n.getNameAsString())) - .findFirst(); - - if (first.isPresent()) { - - Node topLevelMethodExpr = getTopLevelMethodExpr(n); - Node topLevelIfStatement = getTopLevelIfStatement(n); - - String type = first.get().getType().toString(); - - String baseString = n.getNameAsString().replace("get", ""); - - if (listOfPrimitiveTypes.contains(type)) { - ElementParserEntry e = new ElementParserEntry(); - // do get - Optional firstGetElementMethod = finalFromTypeClass.getMethods().stream() - .filter(methodDeclaration -> methodDeclaration.getNameAsString().equals("get" + baseString + ELEMENT)) - .findFirst(); - if (firstGetElementMethod.isPresent()) { - e.setGetType(firstGetElementMethod.get().getType().toString()); - } else { - finalFromTypeClass.getMethods().stream() - .filter(methodDeclaration -> methodDeclaration.getNameAsString().equals("get" + baseString)) - .findFirst().ifPresent(md -> e.setGetType(md.getType().toString())); - } - - // do set and add - Optional firstSetElementMethod = finalToTypeClass.getMethods().stream() - .filter(methodDeclaration -> methodDeclaration.getNameAsString().equals("set" + baseString + ELEMENT)) - .findFirst(); - if (firstSetElementMethod.isPresent()) { - e.setSetType(firstSetElementMethod.get().getParameter(0).getType().toString()); - } else { - finalToTypeClass.getMethods().stream() - .filter(methodDeclaration -> methodDeclaration.getNameAsString().equals("set" + baseString)) - .findFirst().ifPresent(md -> e.setSetType(md.getParameter(0).getType().toString())); - } - - Optional firstAddElementMethod = finalToTypeClass.getMethods().stream() - .filter(methodDeclaration -> methodDeclaration.getNameAsString().equals("add" + baseString + ELEMENT)) - .findFirst(); - if (firstAddElementMethod.isPresent()) { - e.setAddType(firstAddElementMethod.get().getType().toString()); - } else { - finalToTypeClass.getMethods().stream() - .filter(methodDeclaration -> methodDeclaration.getNameAsString().equals("add" + baseString + ELEMENT)) - .findFirst().ifPresent(md -> e.setAddType(md.getType().toString())); - } - - // do check - if (topLevelIfStatement != null && (((IfStmt) topLevelIfStatement).getCondition() instanceof MethodCallExpr)) { - String nameAsString = ((MethodCallExpr) ((IfStmt) topLevelIfStatement).getCondition()).getNameAsString(); - String finalNameAsString = nameAsString; - finalFromTypeClass.getMethods().stream() - .filter(methodDeclaration -> methodDeclaration.getNameAsString().equals(finalNameAsString)) - .findFirst().ifPresent(methodDeclaration -> { - e.setHasCheck(methodDeclaration.getType().toString()); - }); - } - - ifStatementToConditions.put((IfStmt) topLevelIfStatement, e); - if (!keyWordToIfStatement.containsKey(baseString)) { - keyWordToIfStatement.put(baseString, new ArrayList<>()); - } - keyWordToIfStatement.get(baseString).add((IfStmt) topLevelIfStatement); - } - } - } - - return n; - } - }, null); - visited.clear(); - } - - String returnTypeDir = null; - try { - returnTypeDir = getDirectoryOfOppositeModel(md.getParameter(0).getTypeAsString(), version); - } catch (Exception e) { - System.out.println(); - } - - String condition = "src.has%1$sElement()"; - String statementWithSet = "tgt.set%1$sElement((%3$s%4$s) VersionConvertor_%2$s.convertType(src.get%1$sElement()));"; - - String oneToOne = "tgt.set%1$sElement((%3$s%4$s) VersionConvertor_%2$s.convertType(src.get%1$sElement()));"; - String oneToMany = "tgt.set%1$s(Collections.singletonList((%3$s%4$s) VersionConvertor_%2$s.convertType(src.get%1$sElement())));"; - String manyToOne = "tgt.set%1$sElement((%3$s%4$s) VersionConvertor_%2$s.convertType(src.get%1$s().get(0)));"; - String manyToMany = "tgt.set%1$s(src.get%1$s().stream()\n" + - ".map(toConvert -> (%3$s%4$s) VersionConvertor_%2$s.convertType(toConvert))\n" + - ".collect(Collectors.toList())\n" + - ");"; - - if (returnTypeDir != null) { - for (String s : keyWordToIfStatement.keySet()) { - for (IfStmt ifState : keyWordToIfStatement.get(s)) { - ElementParserEntry e = ifStatementToConditions.get(ifState); - String finalReturnTypeDir = returnTypeDir; - if (e.hasAdd || e.hasSet) { - md.accept(new ModifierVisitor() { - @Override - public Visitable visit(IfStmt n, Void arg) { - super.visit(n, arg); - if (n.equals(ifState)) { - String template = null; - if (e.getType.contains("List") && getToType(e).contains("List")) { - template = manyToMany; - } else if (e.getType.contains("List") && !getToType(e).contains("List")) { - template = manyToOne; - } else if (!e.getType.contains("List") && getToType(e).contains("List")) { - template = oneToMany; - } else { - template = oneToOne; - } - - e.setType = e.setType.replaceAll("List", "").replaceAll("<", "").replaceAll(">", ""); - e.addType = e.setType.replaceAll("List", "").replaceAll("<", "").replaceAll(">", ""); - - Expression conditionExp = e.hasCheck ? StaticJavaParser.parseExpression(String.format(condition, s)) : n.getCondition(); - Statement thenStatement = null; - try { - thenStatement = StaticJavaParser.parseStatement(String.format(template, s, version, finalReturnTypeDir, e.hasSet ? e.setType : e.addType)); - n = new IfStmt(conditionExp, thenStatement, null); - } catch (Exception e1) { - System.out.println(); - } - } - return n; - } - - private String getToType(ElementParserEntry e) { - if (e.hasSet) { - return e.setType; - } else { - return ""; - } - } - }, null); - } - } - } - } - }); - - deleteFile(srcFilePathWithExtension); - - try { - compilationUnit.addImport("java.util.Collections"); - writeStringToFile(compilationUnit.toString(), srcFilePathWithExtension); - } catch (IOException e) { - e.printStackTrace(); - } - - System.out.println("Execution time :: " + (System.currentTimeMillis() - start) / 1000); - - } - - public static Node getDeclaration(CompilationUnit cu, String filename, String targetNodeString) { - Optional classByName = cu.getClassByName(extractName(filename)); - Optional first = null; - if (classByName.isPresent()) { - - first = classByName.get().getChildNodes().stream() - .filter(node -> node instanceof ClassOrInterfaceDeclaration) - .filter(node -> ((ClassOrInterfaceDeclaration) node).getNameAsString().equals(targetNodeString)) - .findFirst(); - - if (!first.isPresent()) { - first = classByName.get().getChildNodes().stream() - .filter(node -> node instanceof EnumDeclaration) - .filter(node -> ((EnumDeclaration) node).getNameAsString().equals(targetNodeString)) - .findFirst(); - } - } - - if (first == null || !first.isPresent()) { - throw new IllegalStateException("No target with name " + targetNodeString + " found in file " + filename); - } else { - return first.get(); - } - } - - public static class ElementParserEntry { - - public boolean hasGet = false; - public boolean hasCheck = false; - public boolean hasSet = false; - public boolean hasAdd = false; - - public String baseNoun = ""; - - public String getType = ""; - public String checkType = ""; - public String setType = ""; - public String addType = ""; - - public void setGetType(String type) { - hasGet = true; - this.getType = type; - } - - public void setSetType(String type) { - hasSet = true; - this.setType = type; - } - - public void setHasCheck(String type) { - hasCheck = true; - this.checkType = type; - } - - public void setAddType(String type) { - hasAdd = true; - this.addType = type; - } - - public ElementParserEntry() { - } - - } - - - public static List getListOfPrimitiveTypes() { - String path = "/Users/markiantorno/Documents/Development/fhir/org.hl7.fhir.core/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/"; - - List result = new ArrayList<>(); - - try (Stream walk = Files.walk(Paths.get(path))) { - walk.map(Path::toString) - .filter(f -> f.endsWith(".java")) - .collect(Collectors.toCollection(() -> result)); - } catch (IOException e) { - e.printStackTrace(); - } - - List primitiveTypes = new ArrayList<>(); - result.forEach(filePath -> { - try { - CompilationUnit cu = StaticJavaParser.parse(new File(filePath)); - String className = pullFileNameFromPath(filePath); - cu.getClassByName(className).ifPresent(classOrInterfaceDeclaration -> { - if (classOrInterfaceDeclaration.getExtendedTypes().stream() - .map(NodeWithSimpleName::getNameAsString) - .collect(Collectors.toList()).contains("PrimitiveType")) { - primitiveTypes.add(className.replace("Type", "")); - } - }); - } catch (FileNotFoundException e) { - e.printStackTrace(); - } - }); - primitiveTypes.forEach(System.out::println); - return primitiveTypes; - } - - public static void cleanAccessorsForFile(String srcdirectory, String filename, String extension) { - String projectDirectory = new File("").getAbsolutePath(); - String srcFilePathWithExtension = projectDirectory + srcdirectory + filename + extension; - - CompilationUnit compilationUnit = getCompilationUnit(projectDirectory + srcdirectory + filename + extension); - ClassOrInterfaceDeclaration classOrInterfaceDeclaration = initializeTypeSovlerAndParser(compilationUnit, - projectDirectory, srcdirectory, filename); - - String ifStatementTemplate = "if(%1$s){%2$s;}"; - String ifStatementTemplate2 = "if(%1$s){%2$s}"; - - final HashMap replacementMap = new HashMap<>(); - final HashMap generatedBlockStmt = new HashMap<>(); - - List methods = classOrInterfaceDeclaration.getMethods(); - methods.forEach(md -> { - String assembledMethod = ""; - md.accept(new ModifierVisitor() { - @Override - public Visitable visit(MethodCallExpr n, String arg) { - super.visit(n, arg); - if (n.getTokenRange().toString().contains("src.get")) { - - Node getStatement = getRootGetMethodCall(n); - String topLevelMethodExpr = getTopLevelMethodExpr(n).toString(); - if (topLevelMethodExpr != null) { - String condition = "src.has" + getStatement.toString().replace("FirstRep", "").replaceFirst("get", "") + "()"; - - String statement = topLevelMethodExpr; - String ifStmt = String.format(statement.startsWith("for") ? ifStatementTemplate2 : ifStatementTemplate, condition, statement); - if (!replacementMap.containsKey(topLevelMethodExpr)) { - replacementMap.put(topLevelMethodExpr, ifStmt); - } - } - } - return n; - } - }, assembledMethod); - String body = md.getBody().get().toString(); - Set keySet = replacementMap.keySet(); - for (String key : keySet) { - if (key.startsWith("for")) { - body = body.replace(key, replacementMap.get(key)); - } else { - body = body.replace(key + ";", replacementMap.get(key)); - } - } - replacementMap.clear(); - try { - generatedBlockStmt.put(md, StaticJavaParser.parseBlock(body)); - } catch (Exception e) { - System.out.println(); - } - }); - - classOrInterfaceDeclaration.accept(new ModifierVisitor() { - @Override - public MethodDeclaration visit(MethodDeclaration md, Void arg) { - super.visit(md, arg); - if (generatedBlockStmt.containsKey(md)) { - return md.setBody(generatedBlockStmt.get(md)); - } else { - return md; - } - } - }, null); - - deleteFile(srcFilePathWithExtension); - - try { - writeStringToFile(compilationUnit.toString(), srcFilePathWithExtension); - } catch (IOException e) { - e.printStackTrace(); - } - } - - private static Node getRootGetMethodCall(Node n) { - if (n.getChildNodes().size() == 0) return n; - - Optional get = n.getChildNodes().stream() - .filter(node -> node.toString().contains("get")) - .findFirst(); - - return get.map(Parser::getRootGetMethodCall).orElse(null); - } - - private static Node getTopLevelMethodExpr(Node exp) { - Optional node = exp.getParentNode(); - if (node.isPresent() && node.get() instanceof ExpressionStmt && node.get().getParentNode().get() instanceof IfStmt) { - return null; - } else if ((node.isPresent()) && ((node.get() instanceof MethodCallExpr) || (node.get() instanceof ForEachStmt))) { - return getTopLevelMethodExpr(node.get()); - } - return exp; - } - - private static Node getTopLevelIfStatement(Node exp) { - Optional node = exp.getParentNode(); - if (!node.isPresent() || (node.get() instanceof ClassOrInterfaceDeclaration)) { - return null; - } else if (node.get() instanceof IfStmt) { - return node.get(); - } - return getTopLevelIfStatement(node.get()); - } - - // ================== OLD CODE ====================== - - - private static final String COMMON_FILENAME = "Common"; - private static final String DEST_DIRECTORY_FORMAT = "conv%s"; - private static final String SRC_FILE_FORMAT = "VersionConvertor_%s"; - - private static final String KEYWORD_CONVERT = "convert"; - private static final String KEYWORD_COPY = "copy"; - private static final String KEYWORD_FIND = "find"; - private static final String KEYWORD_GOD_METHOD = "convertResource"; - - private static final String DIRECTORY_WHERE_THE_CODE_LIVES = "/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/"; - private static final String COMMENT_REPORT = "comment_report%s.txt"; - - //Exception case variables - public static final String DSTU = "dstu"; - public static final String R = "r"; - - public static final String MODEL_RESOURCE = "org.hl7.fhir.%1$s%2$s.model.Resource"; - public static final String MODEL_VALUESET = "org.hl7.fhir.%1$s%2$s.model.ValueSet"; - public static final String MODEL_BUNDLECOMP = "org.hl7.fhir.%1$s%2$s.model.Bundle.BundleEntryComponent"; - public static final String MODEL_BUNDLE = "org.hl7.fhir.%1$s%2$s.model.Bundle"; - public static final String VERSION_CONVERTOR_IMPORT = "org.hl7.fhir.convertors.VersionConvertorAdvisor%s0"; - public static final String VERSION_CONVERTOR = "VersionConvertorAdvisor%s0"; - public static final String ADVISOR_VARIABLE = "advisor"; - - public static String convertPath(String path, String version) { - String versionloc = (version.equals("2") || version.equals("3")) ? DSTU : R; - return String.format(path, versionloc, version); - } - - public static void parseAllTheCodes() { - String projectDirectory = new File("").getAbsolutePath(); - - VERSION_FILES.forEach(version -> { - - String srcFilePathWithExtension = projectDirectory + DIRECTORY_WHERE_THE_CODE_LIVES + String.format(SRC_FILE_FORMAT, version) + ".java"; - String destDirectoryName = String.format(DEST_DIRECTORY_FORMAT, version); - - CompilationUnit compilationUnit = getCompilationUnit(srcFilePathWithExtension); - ClassOrInterfaceDeclaration classOrInterfaceDeclaration - = initializeTypeSovlerAndParser(compilationUnit, projectDirectory, DIRECTORY_WHERE_THE_CODE_LIVES, String.format(SRC_FILE_FORMAT, version)); - - if (version.contains("10")) - dealWithV2ExceptionCasesPreProcessing(compilationUnit, classOrInterfaceDeclaration, version); - - List externalClassNames = getAdditionalClassDeclarations(classOrInterfaceDeclaration).stream() - .filter(c -> !c.getNameAsString().equals(classOrInterfaceDeclaration.getNameAsString())) - .map(NodeWithSimpleName::getNameAsString) - .collect(Collectors.toList()); - - HashMap> generatedTopLevelMethodMap = generateMapOfTopLevelMethods(classOrInterfaceDeclaration); - HashMap generatedMethodMap = new HashMap<>(); - HashMap> generatedStaticFieldMappings = new HashMap<>(); - populateMethodAndFieldMaps(classOrInterfaceDeclaration, generatedTopLevelMethodMap, generatedMethodMap, generatedStaticFieldMappings); - - if (version.equals("10_40") || version.equals("10_50")) { - generatedMethodMap.keySet().stream() - .filter(methodDeclaration -> methodDeclaration.getNameAsString().equals("hasConcept")) - .collect(Collectors.toList()) - .forEach(methodDeclaration -> { - generatedMethodMap.put(methodDeclaration, COMMON_FILENAME); - }); - } - - populateClassMappings(generatedTopLevelMethodMap, generatedMethodMap); - - createCommentReport(srcFilePathWithExtension, - projectDirectory + DIRECTORY_WHERE_THE_CODE_LIVES + String.format(COMMENT_REPORT, version)); - - modifySourceFile(compilationUnit, classOrInterfaceDeclaration, srcFilePathWithExtension, - generatedTopLevelMethodMap, generatedStaticFieldMappings, version); - - String packageDeclaration = compilationUnit.getPackageDeclaration().get().getNameAsString() + "." - + destDirectoryName; - System.out.println("Files will be generated with the package :: " + packageDeclaration); - NodeList imports = compilationUnit.getImports(); - System.out.println("Imports will be taken from the top level file <" + String.format(SRC_FILE_FORMAT, version) + ".java>, you will have to " + - "optimize imports on the generated files. Import list as follows :: \n-----"); - imports.stream().map(NodeWithName::getNameAsString).forEach(System.out::println); - System.out.println("-----\n"); - String directoryPath = projectDirectory + DIRECTORY_WHERE_THE_CODE_LIVES + destDirectoryName + "/"; - createDirectory(directoryPath); - System.out.println("Generated type conversion files will be stored in :: " + directoryPath); - - createJavaFiles(classOrInterfaceDeclaration, generatedTopLevelMethodMap, generatedStaticFieldMappings, - String.format(SRC_FILE_FORMAT, version), packageDeclaration, imports, directoryPath, externalClassNames, version); - }); - - - } - - private static List getAdditionalClassDeclarations(ClassOrInterfaceDeclaration classOrInterfaceDeclaration) { - List collect = new ArrayList<>(); - classOrInterfaceDeclaration.accept(new VoidVisitorAdapter() { - @Override - public void visit(ClassOrInterfaceDeclaration n, Void arg) { - super.visit(n, arg); - collect.add(n); - } - }, null); - return collect; - } - - private static CompilationUnit getCompilationUnit(String filePathWithExtension) { - Optional compilationUnit = initializeParser(filePathWithExtension); - if (!compilationUnit.isPresent()) { - System.out.println("\nNo compilation unit generated during class parsing...aborting."); - System.exit(0); - } - return compilationUnit.get(); - } - - private static ClassOrInterfaceDeclaration initializeTypeSovlerAndParser(CompilationUnit compilationUnit, - String projectDirectory, - String codeDirectory, - String filename) { -// System.out.println("==================== Initializing TypeSolver and Parser ====================\n"); - - try { - initializeResolver(projectDirectory, codeDirectory); - } catch (IOException e) { - System.out.println("Error initializing typesolver, exiting process..."); - e.printStackTrace(); - System.exit(0); - } - -// System.out.println("Loading class: " + filename); - Optional classOrInterfaceDeclaration = loadClass(compilationUnit, filename); - if (!classOrInterfaceDeclaration.isPresent()) { - System.out.println("\nNo class or interface declaration loaded during parsing...aborting."); - System.exit(0); - } - -// System.out.println("\n"); - - return classOrInterfaceDeclaration.get(); - } - - private static HashMap> generateMapOfTopLevelMethods(ClassOrInterfaceDeclaration classOrInterfaceDeclaration) { - System.out.println("==================== Generating List of Parsable Types ====================\n"); - - HashMap> mapToReturn = new HashMap<>(); - - System.out.println("Fetching list of top level parsing methods..."); - System.out.println("---------------------------------------------"); - List listOfParsableMethodCalls = getListOfParsableTypes(classOrInterfaceDeclaration).stream() - .map(methodCallExpr -> methodCallExpr.getName().toString()) - .sorted(Comparator.comparing(Function.identity())) - .distinct() - .collect(Collectors.toList()); - listOfParsableMethodCalls.forEach(System.out::println); - System.out.println("---------------------------------------------"); - System.out.println("\n"); - - System.out.println("==================== Generate Map of Top Level Method Names ====================\n"); - System.out.println("Pulling all top level methods from the parsed class --> " + classOrInterfaceDeclaration.getNameAsString()); - List topLevelMethods = getTopLevelMethods(classOrInterfaceDeclaration, listOfParsableMethodCalls); - System.out.println("\nFetched the following top level methods:"); - System.out.println("------------------------------------------"); - topLevelMethods.forEach(md -> System.out.println(md.getSignature().toString())); - System.out.println("------------------------------------------\n"); - System.out.println("\n"); - - for (String type : listOfParsableMethodCalls) { - topLevelMethods.stream() - .filter(methodDeclaration -> type.equals(methodDeclaration.getName().asString())) - .forEach(md -> { - if (!mapToReturn.containsKey(type.replaceFirst(KEYWORD_CONVERT, ""))) { - mapToReturn.put(type.replaceFirst(KEYWORD_CONVERT, ""), new ArrayList<>()); - } - mapToReturn.get(type.replaceFirst(KEYWORD_CONVERT, "")).add(md); - }); - } - return mapToReturn; - } - - public static void populateMethodAndFieldMaps(ClassOrInterfaceDeclaration classOrInterfaceDeclaration, - HashMap> generatedTopLevelMethodMap, - HashMap methodMapToPopulate, - HashMap> fieldMapToPopulate) { - - System.out.println("==================== Generate Method and Field Maps ====================\n"); - - HashMap fieldDeclarationMap = new HashMap<>(); - - List fieldDeclarations = classOrInterfaceDeclaration.getFields().stream() - .filter(NodeWithStaticModifier::isStatic) - .collect(Collectors.toList()); - - for (String key : generatedTopLevelMethodMap.keySet()) { - for (MethodDeclaration md : generatedTopLevelMethodMap.get(key)) { - recursiveSearchAndAdd(classOrInterfaceDeclaration, methodMapToPopulate, fieldDeclarationMap, fieldDeclarations, md, key); - } - } - - fieldDeclarationMap.keySet().forEach(key -> { - if (!fieldMapToPopulate.containsKey(fieldDeclarationMap.get(key))) { - fieldMapToPopulate.put(fieldDeclarationMap.get(key), new ArrayList<>()); - } - fieldMapToPopulate.get(fieldDeclarationMap.get(key)).add(key); - }); - } - - public static void populateClassMappings(HashMap> generatedTopLevelMethodMap, - HashMap generatedMethodMap) { - System.out.println("==================== Generate Method to Class Mappings ====================\n"); - - generatedTopLevelMethodMap.put(COMMON_FILENAME, new ArrayList<>()); - generatedTopLevelMethodMap.clear(); - generatedMethodMap.keySet().forEach(md -> { - if (!generatedTopLevelMethodMap.containsKey(generatedMethodMap.get(md))) { - generatedTopLevelMethodMap.put(generatedMethodMap.get(md), new ArrayList<>()); - } - generatedTopLevelMethodMap.get(generatedMethodMap.get(md)).add(md); - }); - - for (String className : generatedTopLevelMethodMap.keySet()) { - System.out.println("Class :: " + className); - generatedTopLevelMethodMap.get(className).stream() - .sorted(Comparator.comparing(methodDeclaration -> methodDeclaration.getName().toString())) - .forEach(md -> System.out.println("\t" + md.getSignature())); - System.out.println("\n"); - } - } - - public static void createCommentReport(String fullSrcFilePath, String fullDstFilePath) { - try { - List commentReportEntries = generateCommentReportData(fullSrcFilePath); - String report = commentReportEntries.stream() - .map(Object::toString).collect(Collectors.joining("\n")); - writeStringToFile(report, fullDstFilePath); - } catch (IOException e) { - e.printStackTrace(); - } - } - - public static void dealWithV2ExceptionCasesPreProcessing(CompilationUnit cu, ClassOrInterfaceDeclaration classOrInterfaceDeclaration, String version) { - String from = "2";//version.substring(0, version.indexOf('_')); - String to = version.substring(version.indexOf('_') + 1, version.indexOf('_') + 2); - - - modifyConvertResourceCalls(classOrInterfaceDeclaration, to, from, to, MODEL_VALUESET, "convertValueSet"); - modifyConvertResourceCalls(classOrInterfaceDeclaration, from, to, to, MODEL_VALUESET, "convertValueSet"); - modifyConvertResourceCalls(classOrInterfaceDeclaration, to, from, to, MODEL_BUNDLECOMP, "convertBundleEntryComponent"); - modifyConvertResourceCalls(classOrInterfaceDeclaration, to, from, to, MODEL_BUNDLE, "convertBundle"); - - addAdvisorToMethodCalls(classOrInterfaceDeclaration, "convertBundle", MODEL_BUNDLE, from, "convertBundleEntryComponent"); - - } - - public static void dealWithV2ExceptionCasesPostProcessing(ClassOrInterfaceDeclaration classOrInterfaceDeclaration, String version) { - String from = "2";//version.substring(0, version.indexOf('_')); - String to = version.substring(version.indexOf('_') + 1, version.indexOf('_') + 2); - - Optional advisorOptional = classOrInterfaceDeclaration.getFields().stream() - .map(FieldDeclaration::getVariables) - .flatMap(Collection::stream) - .filter(v -> v.getNameAsString().equals(ADVISOR_VARIABLE)) - .findFirst(); - - if (advisorOptional.isPresent()) { - VariableDeclarator advisorVariable = advisorOptional.get(); - Type advisorType = advisorVariable.getType(); - advisorOptional.get().getParentNode().ifPresent(Node::remove); - - modifyConvertResourceCalls(classOrInterfaceDeclaration, from, to, to, MODEL_RESOURCE, "convertResource"); - modifyConvertResourceCalls(classOrInterfaceDeclaration, to, from, to, MODEL_RESOURCE, "convertResource"); - - addAdvisorToMethodCalls(classOrInterfaceDeclaration, "convertResource", MODEL_RESOURCE, from, "convertBundle"); - addAdvisorToMethodCalls(classOrInterfaceDeclaration, "convertResource", MODEL_RESOURCE, from, "convertValueSet"); - addAdvisorToMethodCalls(classOrInterfaceDeclaration, "convertResource", MODEL_RESOURCE, to, "convertValueSet"); - - classOrInterfaceDeclaration.getConstructors().forEach(Node::remove); - - System.out.println(); -// classOrInterfaceDeclaration.addMethod(); - - } - - System.out.println(); - } - - public static void modifyConvertResourceCalls(ClassOrInterfaceDeclaration classOrInterfaceDeclaration, - String parameterVersionNo, - String typeVersionNo, - String convertorVersionNumber, - String typeFormat, - String methodName) { - MethodDeclaration oldConvertResource = getConvertResourceMethodForVersion(classOrInterfaceDeclaration, methodName, typeFormat, typeVersionNo); - oldConvertResource.addParameter(String.format(VERSION_CONVERTOR, convertorVersionNumber), ADVISOR_VARIABLE); - - MethodDeclaration newConvertResource = classOrInterfaceDeclaration.addMethod(methodName); - newConvertResource.setModifier(Modifier.Keyword.PUBLIC, true); - newConvertResource.setModifier(Modifier.Keyword.STATIC, true); - newConvertResource.setType(convertPath(typeFormat, typeVersionNo)); - newConvertResource.setThrownExceptions(oldConvertResource.getThrownExceptions()); - newConvertResource.addParameter(convertPath(typeFormat, parameterVersionNo), "src"); - newConvertResource.setBody(new BlockStmt().addStatement("return " + methodName + "(src, null);")); - } - - public static void addAdvisorToMethodCalls(ClassOrInterfaceDeclaration classOrInterfaceDeclaration, - String parentMethodName, - String modelType, - String version, - String subMethodCall) { - - Optional methodDeclaration = classOrInterfaceDeclaration.getMethods().stream() - .filter(md -> md.getNameAsString().equals(parentMethodName)) - .filter(md -> md.getType().toString().equals(convertPath(modelType, version))) - .findAny(); - - methodDeclaration.ifPresent(declaration -> declaration.accept(new ModifierVisitor() { - @Override - public Visitable visit(MethodCallExpr n, Void arg) { - super.visit(n, arg); - if (n.getNameAsString().contains(subMethodCall)) { - n.addArgument("advisor"); - } - return n; - } - }, null)); - - } - - public static MethodDeclaration getConvertResourceMethodForVersion(ClassOrInterfaceDeclaration classOrInterfaceDeclaration, - String methodName, - String modelType, - String version) { - Optional methodDeclaration = classOrInterfaceDeclaration.getMethods().stream() - .filter(md -> md.getNameAsString().equals(methodName)) - .filter(md -> md.getType().toString().equals(convertPath(modelType, version))) - .findAny(); - - if (methodDeclaration.isPresent()) { - return methodDeclaration.get(); - } else { - System.out.println("Cannot find method " + methodName + " that returns type " + convertPath(modelType, version)); - System.exit(0); - } - return null; - } - - public static void modifySourceFile(CompilationUnit compilationUnit, - ClassOrInterfaceDeclaration classOrInterfaceDeclaration, - String srcFilePathWithExtension, - HashMap> generatedTopLevelMethodMap, - HashMap> generatedStaticFieldMappings, - String version) { - - - List listOfParsableMethodCalls = getListOfParsableTypes(classOrInterfaceDeclaration).stream() - .map(methodCallExpr -> methodCallExpr.getName().toString()) - .sorted(Comparator.comparing(Function.identity())) - .distinct() - .collect(Collectors.toList()); - - modifyMainFile(compilationUnit, - classOrInterfaceDeclaration, - generatedTopLevelMethodMap.get(COMMON_FILENAME), - generatedTopLevelMethodMap.keySet().stream() - .filter(key -> !key.equals(COMMON_FILENAME)) - .map(generatedTopLevelMethodMap::get) - .flatMap(Collection::stream) - .collect(Collectors.toList()), - listOfParsableMethodCalls, - generatedStaticFieldMappings.keySet().stream() - .filter(key -> !key.equals(COMMON_FILENAME)) - .map(generatedStaticFieldMappings::get) - .flatMap(Collection::stream) - .collect(Collectors.toList()), - generatedStaticFieldMappings.keySet().stream() - .filter(key -> key.equals(COMMON_FILENAME)) - .map(generatedStaticFieldMappings::get) - .flatMap(Collection::stream) - .collect(Collectors.toList()), - version); - - deleteFile(srcFilePathWithExtension); - - try { - writeStringToFile(compilationUnit.toString(), srcFilePathWithExtension); - } catch (IOException e) { - e.printStackTrace(); - } - } - - public static void modifyMainFile(CompilationUnit compilationUnit, - ClassOrInterfaceDeclaration classOrInterfaceDeclaration, - List methodsToExpose, - List methodsToDelete, - List methodsToAddStaticAccess, - List fieldsToDelete, - List fieldsToExpose, - String versionCode) { - - compilationUnit.getAllContainedComments().stream() - .filter(Comment::isLineComment) - .forEach(Comment::remove); - - compilationUnit.accept(new MethodDeleter(methodsToDelete), null); - compilationUnit.accept(new MethodExposer(methodsToExpose), null); - - compilationUnit.addImport("org.hl7.fhir.convertors." + String.format(DEST_DIRECTORY_FORMAT, versionCode), false, true); - - fieldsToDelete.forEach(classOrInterfaceDeclaration::remove); - classOrInterfaceDeclaration.getFields().stream() - .filter(NodeWithStaticModifier::isStatic) - .filter(fieldsToExpose::contains) - .forEach(fd -> { - fd.setModifier(Modifier.Keyword.PRIVATE, false); - fd.setModifier(Modifier.Keyword.PUBLIC, true); - }); - - List listOfClassMethods = getListOfClassMethods(KEYWORD_GOD_METHOD, classOrInterfaceDeclaration); - listOfClassMethods.forEach(md -> { - md.accept(new MethodStaticCallAdder(methodsToAddStaticAccess, versionCode), null); - }); - - //Deal with the old, non static access convertors (1-3, 1-4, 1-5) - compilationUnit.accept(new ModifierVisitor() { - @Override - public MethodDeclaration visit(MethodDeclaration md, Void arg) { - super.visit(md, arg); - - md.setModifier(Modifier.Keyword.PRIVATE, false); - md.setModifier(Modifier.Keyword.STATIC, true); - md.setModifier(Modifier.Keyword.PUBLIC, true); - - return md; - } - }, null); - - classOrInterfaceDeclaration.accept(new ModifierVisitor() { - @Override - public ClassOrInterfaceDeclaration visit(ClassOrInterfaceDeclaration n, Void arg) { - super.visit(n, arg); - if (!n.getNameAsString().equals(String.format(SRC_FILE_FORMAT, versionCode))) { - n.setModifier(Modifier.Keyword.PRIVATE, false); - n.setModifier(Modifier.Keyword.STATIC, true); - n.setModifier(Modifier.Keyword.PUBLIC, true); - n.accept(new ModifierVisitor() { - @Override - public FieldDeclaration visit(FieldDeclaration md, Void arg) { - super.visit(md, arg); - md.setModifier(Modifier.Keyword.PRIVATE, false); - md.setModifier(Modifier.Keyword.STATIC, false); - md.setModifier(Modifier.Keyword.PUBLIC, true); - return md; - } - }, null); - } - return n; - } - }, null); - - if (versionCode.contains("10")) dealWithV2ExceptionCasesPostProcessing(classOrInterfaceDeclaration, versionCode); - - } - - public static void createJavaFiles(ClassOrInterfaceDeclaration classOrInterfaceDeclaration, - HashMap> generatedTopLevelMethodMap, - HashMap> generatedStaticFieldMappings, - String filename, - String packageDeclaration, - NodeList imports, - String outputDirectoryPath, - List externalClassNames, - String version) { - System.out.println("==================== Create Java Files ====================\n"); - - generatedTopLevelMethodMap.keySet().stream() - .filter(s -> !s.equals(COMMON_FILENAME)) - .forEach(s -> { - String generatedCode = generateFileContents(classOrInterfaceDeclaration, - filename, - s + version, - packageDeclaration, - imports, - generatedStaticFieldMappings.get(s), - generatedStaticFieldMappings.get(COMMON_FILENAME), - generatedTopLevelMethodMap.get(s).stream() - .sorted(Comparator.comparing(methodDeclaration -> methodDeclaration.getName().toString())) - .collect(Collectors.toList()), - externalClassNames, - version); - - try { - String filePath = outputDirectoryPath + s + version + ".java"; - System.out.println("Attempting to write file -> " + filePath); - writeStringToFile(generatedCode, filePath); - } catch (IOException e) { - e.printStackTrace(); - } - }); - } - - public static void writeStringToFile(String string, String filepath) throws IOException { - BufferedWriter writer = new BufferedWriter(new FileWriter(filepath)); - writer.write(string); - writer.close(); - } - - public static String generateFileContents(ClassOrInterfaceDeclaration oldInterfaceDec, - String commonMethodClassName, - String className, - String packageDeclaration, - NodeList imports, - List fieldDeclarations, - List externalFieldDeclarations, - List methods, - List externalClassNames, - String version) { - - CompilationUnit cu = new CompilationUnit(); - - - cu.setPackageDeclaration(packageDeclaration); - cu.setImports(imports); - cu.addImport("org.hl7.fhir.convertors." + String.format(SRC_FILE_FORMAT, version)); - cu.addImport("org.hl7.fhir.convertors.VersionConvertorConstants"); - if (version.contains("10")) - cu.addImport(String.format(VERSION_CONVERTOR_IMPORT, version.substring(version.indexOf('_') + 1, version.indexOf('_') + 2))); - - ClassOrInterfaceDeclaration generatedClass = cu.addClass(className); - if (fieldDeclarations != null) { - fieldDeclarations.forEach(generatedClass::addMember); - } - - methods.forEach(method -> { - - MethodDeclaration methodDeclaration = generatedClass.addMethod(method.getNameAsString()); - - if (method.getBody().isPresent()) { - BlockStmt blockStmt = method.getBody().get(); - if (externalFieldDeclarations != null) { - blockStmt.accept(new VarAccessChanger(externalFieldDeclarations.stream() - .map(fd -> fd.getVariable(0).getNameAsString()) - .collect(Collectors.toList()), String.format(SRC_FILE_FORMAT, version)), null); - } - List allCalledMethods = getAllCalledMethods(oldInterfaceDec, method); - - allCalledMethods.stream() - .filter(md -> !methods.contains(md)) - .map(NodeWithSimpleName::getNameAsString) - .distinct() - .forEach(methodName -> { - List methodCallExprs = new ArrayList<>(); - blockStmt.accept(new MethodCallVisitor(methodName, true), methodCallExprs); - methodCallExprs.stream() - .distinct() - .forEach(methodCallExpr -> { - methodCallExpr.setName(commonMethodClassName + "." + methodCallExpr.getNameAsString()); - }); - }); - methodDeclaration.setBody(blockStmt); - - } - - methodDeclaration.setParameters(method.getParameters()); - methodDeclaration.setModifiers(method.getModifiers()); - methodDeclaration.addModifier(Modifier.Keyword.STATIC); - methodDeclaration.setModifier(Modifier.Keyword.PRIVATE, false); - methodDeclaration.setModifier(Modifier.Keyword.PUBLIC, true); - methodDeclaration.setThrownExceptions(method.getThrownExceptions()); - methodDeclaration.setType(method.getType()); - methodDeclaration.setTypeParameters(method.getTypeParameters()); - }); - - - generatedClass.walk(node -> { - String identifier = ""; - if (node instanceof NodeWithIdentifier) - if (externalClassNames.contains(((NodeWithIdentifier) node).getIdentifier())) { - ((NodeWithIdentifier) node).setIdentifier(String.format(SRC_FILE_FORMAT, version) + "." + ((NodeWithIdentifier) node).getIdentifier()); - } - }); - - return cu.toString(); - } - - public static Predicate distinctByKey(Function keyExtractor) { - Set seen = ConcurrentHashMap.newKeySet(); - return t -> seen.add(keyExtractor.apply(t)); - } - - private static void recursiveSearchAndAdd(ClassOrInterfaceDeclaration cd, - HashMap methodDeclarationMap, - HashMap fieldDeclarationMap, - List globalStaticFields, - MethodDeclaration key, - String value) { - if (methodDeclarationMap.containsKey(key) && (methodDeclarationMap.get(key).equals(COMMON_FILENAME) || methodDeclarationMap.get(key).equals(value))) - return; - if (key.getName().toString().equals("convertResource")) return; - - addMethodDeclarationToMap(methodDeclarationMap, value, key); - searchAndSortMethodFields(key, value, fieldDeclarationMap, globalStaticFields); - - getAllCalledMethods(cd, key).forEach(md -> { - recursiveSearchAndAdd(cd, methodDeclarationMap, fieldDeclarationMap, globalStaticFields, md, value); - }); - - } - - private static void searchAndSortMethodFields(MethodDeclaration md, - String classKey, - HashMap fieldToClassMap, - List fieldDeclarations) { - - List collector = new ArrayList<>(); - md.accept(new MethodFieldVisitor(), collector); - - md.accept(new VoidVisitorAdapter() { - @Override - public void visit(VarType n, Void arg) { - super.visit(n, arg); - } - }, null); - - List staticFieldLabels = fieldDeclarations.stream() - .map(fd -> fd.getVariable(0).getName().asString()) - .collect(Collectors.toList()); - - collector.stream() - .filter(ne -> staticFieldLabels.contains(ne.getNameAsString())) - .map(ne -> fieldDeclarations.stream() - .filter(fd -> fd.getVariable(0).getName().asString().equals(ne.getNameAsString())) - .findFirst() - .get()) - .forEach(fd -> { - if (!fieldToClassMap.containsKey(fd)) { - fieldToClassMap.put(fd, classKey); - } else if (!fieldToClassMap.get(fd).equals(classKey)) { - fieldToClassMap.put(fd, COMMON_FILENAME); - } - }); - } - - - private static void createDirectory(String path) { - File file = new File(path); - //Creating the directory - boolean bool = file.mkdir(); - if (bool) { - System.out.println("Directory created successfully"); - } else { - System.out.println("Sorry couldn’t create specified directory"); - } - } - - /** - * Attempts to delete the file at the given path.) - * - * @param path - */ - public static void deleteFile(String path) { - File file = new File(path); - if (file.delete()) { - System.out.println("File <" + path + "> deleted successfully"); - } else { - System.out.println("Failed to delete the file <" + path + ">"); - } - } - - /** - * Finds the god method in the given convertor, and parses out all the method calls that method makes. - * - * @param classOrInterfaceDeclaration - * @return - */ - protected static List getListOfParsableTypes(ClassOrInterfaceDeclaration classOrInterfaceDeclaration) { - List listOfClassMethods = getListOfClassMethods(KEYWORD_GOD_METHOD, classOrInterfaceDeclaration); - List calledMethods = new ArrayList<>(); - listOfClassMethods.forEach(md -> md.accept(new MethodCallVisitor(KEYWORD_CONVERT), calledMethods)); - return calledMethods; - } - - /** - * Pulls all internal conversion method calls out of the passed in method and maps those calls to the corresponding - * {@link MethodDeclaration} and returns those as a list. - * - * @param classOrInterfaceDeclaration - * @param method - * @return List of all {@link MethodDeclaration} - */ - public static List getAllCalledMethods(ClassOrInterfaceDeclaration classOrInterfaceDeclaration, MethodDeclaration method) { - List result = new ArrayList<>(); - - List methodCallExprs = new ArrayList<>(); - method.accept(new VoidVisitorAdapter>() { - @Override - public void visit(MethodCallExpr methodCallExpr, List collector) { - collector.add(methodCallExpr); - super.visit(methodCallExpr, collector); - } - }, methodCallExprs); - - Set methodExpressionNames = methodCallExprs.stream() - .filter(methodCallExpr -> !methodCallExpr.getScope().isPresent()) - .map(me -> me.getName().toString()) - .collect(Collectors.toSet()); - - classOrInterfaceDeclaration.getMethods().stream() - .filter(e -> methodExpressionNames.contains(e.getName().toString())) - .collect(Collectors.toCollection(() -> result)); - - return result; - } - - /** - * Searches the passed in {@link ClassOrInterfaceDeclaration} for any method declaration matching any of the method - * names in the passed in List. - * - * @param classOrInterfaceDeclaration {@link ClassOrInterfaceDeclaration} to search - * @param methodNames {@link List} of method names - * @return {@link List } containing any of the keywords - */ - protected static List getTopLevelMethods(ClassOrInterfaceDeclaration classOrInterfaceDeclaration, List methodNames) { - List toReturn = new ArrayList<>(); - methodNames.stream() - .map(s -> getListOfClassMethods(s, classOrInterfaceDeclaration)) - .flatMap(List::stream) - .collect(Collectors.toCollection(() -> toReturn)); - return toReturn; - } - - /** - * Searched the generated declaration map for the matching {@link MethodDeclaration}, if it already exists within the - * map and is not currently pointing the class label we pass in, it will mark it with the {@link Parser#COMMON_FILENAME} - * - * @param className {@link String} class label we want to associate the method with - * @param methodDeclaration {@link MethodDeclaration} - */ - protected static void addMethodDeclarationToMap(HashMap map, - String className, MethodDeclaration methodDeclaration) { - if (!map.containsKey(methodDeclaration)) { - map.put(methodDeclaration, className); - } else if (!map.get(methodDeclaration).equals(className)) { - map.put(methodDeclaration, COMMON_FILENAME); - } - } - - /** - * Returns a list of all java files within the passed in directory path, without extension. - * - * @param path {@link String} filepath - * @return {@link List < String >} of all filenames - */ - protected static List listAllJavaFilesInDirectory(String path) { - List result = new ArrayList<>(); - - try (Stream walk = Files.walk(Paths.get(path))) { - walk.map(Path::toString) - .filter(f -> f.endsWith(".java")) - .map(Parser::pullFileNameFromPath) - .collect(Collectors.toCollection(() -> result)); - } catch (IOException e) { - e.printStackTrace(); - } - - return result; - } - - /** - * Takes the passed in file path and extracts the filename without extension. - * - * @param path - * @return - */ - protected static String pullFileNameFromPath(String path) { - int lastSlashIndex = path.lastIndexOf('/'); - int lastPeriodIndex = path.lastIndexOf('.'); - return path.substring(lastSlashIndex + 1, lastPeriodIndex); - } - - /** - * The parser works by listing method calls within the individual resource conversion methods as - * {@link MethodCallExpr}. To extract the information we need to refactor the code, - * such as method body, references, signature, etc, we rely on the javaparser {@link TypeSolver} to parse the code - * library and convert the expressions to concrete {@link MethodDeclaration}. - *

- * NB. The more source files in the directory you pass in (this will search recursively), the longer the - * MethodDeclaration lookups will take. Be smart, choose S-Mart. - * - * @param rootProjectDirectory - * @param projectDirectory {@link String} path to the directory that contains the souce files we want to be available for - */ - public static void initializeResolver(String rootProjectDirectory, String projectDirectory) throws IOException { - System.out.println("Initializing resolver against the following root directory:\n" + rootProjectDirectory); - System.out.println("Project codebase located here:\n" + projectDirectory); - - TypeSolver myTypeSolver = new CombinedTypeSolver( - new ReflectionTypeSolver(), - new JavaParserTypeSolver(new File(rootProjectDirectory + "/org.hl7.fhir.convertors/src/main/java/")), - new JavaParserTypeSolver(new File(rootProjectDirectory + "/org.hl7.fhir.utilities/src/main/java/")), - new JavaParserTypeSolver(new File(rootProjectDirectory + "/org.hl7.fhir.dstu2/src/main/java/")), - new JavaParserTypeSolver(new File(rootProjectDirectory + "/org.hl7.fhir.dstu3/src/main/java/")), - new JavaParserTypeSolver(new File(rootProjectDirectory + "/org.hl7.fhir.dstu2016may/src/main/java/")), - new JavaParserTypeSolver(new File(rootProjectDirectory + "/org.hl7.fhir.r4/src/main/java/")), - new JavaParserTypeSolver(new File(rootProjectDirectory + "/org.hl7.fhir.r5/src/main/java/")), - new JarTypeSolver("/Users/markiantorno/.m2/repository/ca/uhn/hapi/fhir/hapi-fhir-structures-r4/4.1.0/hapi-fhir-structures-r4-4.1.0.jar"), - new JarTypeSolver("/Users/markiantorno/.m2/repository/ca/uhn/hapi/fhir/hapi-fhir-base/4.1.0/hapi-fhir-base-4.1.0.jar") - ); - - JavaSymbolSolver symbolSolver = new JavaSymbolSolver(myTypeSolver); - StaticJavaParser.getConfiguration().setSymbolResolver(symbolSolver); - } - - /** - * Initializes the parser and runs it against the file located at the passed in path. - * - * @param path {@link String} path to the file. - * @return {@link Optional } - */ - public static Optional initializeParser(String path) { - System.out.println("Initializing parser, and parsing the following file:\n" + path); - CompilationUnit compilationUnit = null; - try { - compilationUnit = StaticJavaParser.parse(new File(path)); - } catch (FileNotFoundException e) { - e.printStackTrace(); - } - return Optional.ofNullable(compilationUnit); - } - - /** - * Loads a class using the {@link CompilationUnit} passed in and returns the resulting declaration for parsing. This - * class must exist within the directory parsed originally in {@link #initializeParser(String)} - * - * @param cu {@link CompilationUnit} - * @param classname {@link String} The name of the class to load. - * @return {@link Optional } for the named class. - */ - protected static Optional loadClass(CompilationUnit cu, String classname) { - return cu.getClassByName(classname); - } - - /** - * Takes a given {@link MethodCallExpr} and uses the initialized {@link JavaSymbolSolver} to search the source code - * for the appropriate {@link MethodDeclaration}. - * - * @param methodCallExpr {@link MethodCallExpr} - * @return An {@link Optional}, containing the corresponding {@link MethodDeclaration} - */ - protected static Optional resolveMethodDeclaration(MethodCallExpr methodCallExpr) { - MethodDeclaration wrappedDeclaration = null; - ResolvedMethodDeclaration correspondingDeclaration = methodCallExpr.resolve(); - - if (correspondingDeclaration instanceof JavaParserMethodDeclaration) { - JavaParserMethodDeclaration declaration = (JavaParserMethodDeclaration) correspondingDeclaration; - Node wrappedNode = declaration.getWrappedNode(); - wrappedDeclaration = (MethodDeclaration) wrappedNode; - System.out.println(); - } - - return Optional.ofNullable(wrappedDeclaration); - } - - /** - * Takes the content {@link String} passed in, and writes it to a java file with the provided name, in the provided - * directory location. - * - * @param filename Name of the file, including extension, ex: "Book.java" - * @param directory Path to directory to create the file - * @param content {@link String} content of the file - * @throws IOException - */ - public static void writeJavaCodeToFile(String filename, String directory, String content) throws IOException { - BufferedWriter writer = new BufferedWriter(new FileWriter(directory + filename)); - writer.write(content); - writer.close(); - } - - /** - * Returns the list of class methods. - * - * @param classOrInterfaceDeclaration {@link ClassOrInterfaceDeclaration} - * @return {@link List} of all {@link MethodDeclaration} - */ - protected static List getListOfClassMethods(ClassOrInterfaceDeclaration classOrInterfaceDeclaration) { - return getListOfClassMethods("", classOrInterfaceDeclaration); - } - - /** - * Returns the list of class methods containing the passed in method name. - * - * @param methodName {@link String} method name to search for - * @param classOrInterfaceDeclaration {@link ClassOrInterfaceDeclaration} - * @return {@link List} of all matching {@link MethodDeclaration} - */ - protected static List getListOfClassMethods(String methodName, ClassOrInterfaceDeclaration classOrInterfaceDeclaration) { - List result = new ArrayList<>(); - classOrInterfaceDeclaration.getMethods().stream() - .filter(method -> method.getName().toString().equals(methodName)) - .collect(Collectors.toCollection(() -> result)); - return result; - } - - private static List generateCommentReportData(String filepath) throws FileNotFoundException { - - CompilationUnit cu = StaticJavaParser.parse(new File(filepath)); - - return cu.getAllContainedComments().stream() - .filter(Comment::isOrphan) - .filter(Comment::isLineComment) - .map(p -> new CommentReportEntry(filepath.substring(filepath.lastIndexOf('/') + 1), - p.getClass().getSimpleName(), p.getContent(), p.getRange().get().begin.line, - !p.getCommentedNode().isPresent())) - .collect(Collectors.toList()); - } - - /** - * Class that visits all method calls within a given method and returns the results as a list. - */ - public static class MethodCallVisitor extends VoidVisitorAdapter> { - - private final String keyword; - private final boolean strict; - - public MethodCallVisitor(String keywords) { - super(); - this.keyword = keywords; - this.strict = false; - } - - public MethodCallVisitor(String keywords, boolean strict) { - super(); - this.keyword = keywords; - this.strict = strict; - } - - @Override - public void visit(MethodCallExpr methodCallExpr, List collector) { - if (strict) { - if (methodCallExpr.getName().asString().equals(keyword)) { - collector.add(methodCallExpr); - } - } else { - if (methodCallExpr.getName().asString().contains(keyword)) { - collector.add(methodCallExpr); - } - } - super.visit(methodCallExpr, collector); - } - } - - /** - * Class that visits all method calls within a given method and returns the results as a list. - */ - public static class MethodFieldVisitor extends VoidVisitorAdapter> { - - public MethodFieldVisitor() { - super(); - } - - @Override - public void visit(NameExpr fieldAccessExpr, List collector) { - super.visit(fieldAccessExpr, collector); - collector.add(fieldAccessExpr); - } - } - - /** - * Class that visits all method calls within a given method and returns the results as a list. - */ - public static class VarAccessChanger extends ModifierVisitor { - - private final List varsToAccessInMainFile; - private final String parentClassName; - - public VarAccessChanger(List varsToAccessInMainFile, String parentClassName) { - super(); - this.varsToAccessInMainFile = varsToAccessInMainFile; - this.parentClassName = parentClassName; - } - - @Override - public NameExpr visit(NameExpr nameExpr, Void arg) { - super.visit(nameExpr, arg); - if (varsToAccessInMainFile.contains(nameExpr.getNameAsString())) { - nameExpr.setName(parentClassName + "." + nameExpr.getNameAsString()); - } - return nameExpr; - } - } - - /** - * Class that visits all methods and deletes them if they are in the list of passed in MethodDeclarations - */ - public static class MethodDeleter extends ModifierVisitor { - - private List toDelete; - - public MethodDeleter(List toDelete) { - this.toDelete = toDelete; - } - - @Override - public MethodDeclaration visit(MethodDeclaration md, Void arg) { - super.visit(md, arg); - if (toDelete.contains(md)) { - return null; - } - return md; - } - } - - /** - * Class that visits all methods and deletes them if they are in the list of passed in MethodDeclarations - */ - public static class MethodExposer extends ModifierVisitor { - - private List toModify; - - public MethodExposer(List toModify) { - this.toModify = toModify; - } - - @Override - public MethodDeclaration visit(MethodDeclaration md, Void arg) { - super.visit(md, arg); - if (toModify.contains(md)) { - md.setModifier(Modifier.Keyword.PRIVATE, false); - md.setModifier(Modifier.Keyword.STATIC, true); - md.setModifier(Modifier.Keyword.PUBLIC, true); - } - return md; - } - } - - /** - * Class that visits all calls in calls and changes the access to an external class if it matches one of the passed - * in labels. - */ - public static class MethodStaticCallAdder extends ModifierVisitor { - - private List methodNames; - private String versionCode; - - public MethodStaticCallAdder(List methodNames, String versionCode) { - this.methodNames = methodNames; - this.versionCode = versionCode; - } - - @Override - public MethodCallExpr visit(MethodCallExpr methodCallExpr, Void arg) { - super.visit(methodCallExpr, arg); - if (methodNames.contains(methodCallExpr.getNameAsString())) { - //eg. convertPatient -> Patient30_50.convertPatient - methodCallExpr.setName(methodCallExpr.getNameAsString().replace(KEYWORD_CONVERT, "") - + versionCode + "." + methodCallExpr.getNameAsString()); - } - return methodCallExpr; - } - } - - private static class CommentReportEntry { - public String filename; - public String type; - public String text; - public int lineNumber; - public boolean isOrphan; - - CommentReportEntry(String filename, String type, String text, int lineNumber, - boolean isOrphan) { - this.filename = filename; - this.type = type; - this.text = text; - this.lineNumber = lineNumber; - this.isOrphan = isOrphan; - } - - @Override - public String toString() { - return filename + " | " + lineNumber + " | " + type + " | " + text.replaceAll("\\n", "").trim(); - } - } - - // ------------- Version String Manipulation Stuff - - public static final String MODEL_IMPORT_PATH = "org.hl7.fhir.%1$s.model.%2$s"; - public static final String MODEL_ABSOLUTE_PATH = "/org.hl7.fhir.%1$s/src/main/java/org/hl7/fhir/%1$s/model/%2$s.java"; - public static final String MODEL_PATH_WITHOUT_IMPORT = "/org.hl7.fhir.%1$s/src/main/java/"; - - public static String getVersionString(String version) { - switch (version) { - case ("10"): - return "dstu2"; - case ("14"): - return "dstu2016may"; - case ("30"): - return "dstu3"; - case ("40"): - return "r4"; - case ("50"): - return "r5"; - default: - throw new IllegalArgumentException("Passed in version " + version + ", no such mapping exists..."); - } - } - - public static String getModelAbsolutePathFromVersion(String convertorClassName) { - String projectDirectory = new File("").getAbsolutePath(); - String version = getFromVersion(convertorClassName); - return projectDirectory + String.format(MODEL_ABSOLUTE_PATH, getVersionString(version), extractName(convertorClassName)); - } - - public static String getModelAbsolutePathToVersion(String convertorClassName) { - String projectDirectory = new File("").getAbsolutePath(); - String version = getToVersion(convertorClassName); - return projectDirectory + String.format(MODEL_ABSOLUTE_PATH, getVersionString(version), extractName(convertorClassName)); - } - - public static String importStatementToAbsolutePath(String importStatement) { - String projectDirectory = new File("").getAbsolutePath(); - - String placeholder = null; - if (importStatement.contains("dstu2016may")) { - placeholder = "dstu2016may"; - } else if (importStatement.contains("dstu2")) { - placeholder = "dstu2"; - } else if (importStatement.contains("dstu3")) { - placeholder = "dstu3"; - } else if (importStatement.contains("r4")) { - placeholder = "r4"; - } else if (importStatement.contains("r5")) { - placeholder = "r5"; - } - - return projectDirectory + String.format(MODEL_PATH_WITHOUT_IMPORT, placeholder) + importStatement.replace('.', '/') + ".java"; - } - - private static String extractName(String convertorClassName) { - return convertorClassName.substring(0, convertorClassName.length() - 5); - } - - public static String getModelImportToVersion(String convertorClassName) { - String version = getToVersion(convertorClassName); - return String.format(MODEL_IMPORT_PATH, getVersionString(version), extractName(convertorClassName)); - } - - public static String getModelImportFromVersion(String convertorClassName) { - String version = getFromVersion(convertorClassName); - return String.format(MODEL_IMPORT_PATH, getVersionString(version), extractName(convertorClassName)); - } - - public static String getFromVersion(String className) { - String version = className.substring(className.length() - 5); - return version.substring(0, version.indexOf('_')); - } - - public static String getToVersion(String className) { - String version = className.substring(className.length() - 5); - return version.substring(version.indexOf('_') + 1, version.indexOf('_') + 3); - } - - public static String getLowerVersionAbsPathFromAbsPath(String type1Path, String type2Path, String version) { - String lowVersionString = getVersionString(version.substring(0, version.indexOf('_'))); - if (type1Path.contains(lowVersionString)) { - return type1Path; - } else { - return type2Path; - } - } - - public static String getDirectoryOfOppositeModel(String importStatement, String version) { - String lowVersionString = getVersionString(version.substring(0, version.indexOf('_'))); - String highVersionString = getVersionString(version.substring(version.indexOf('_') + 1, version.indexOf('_') + 3)); - - if (importStatement.contains(lowVersionString)) { - String temp = String.format(MODEL_IMPORT_PATH, highVersionString, ""); - return temp.substring(0, temp.lastIndexOf("model.") + "model.".length()); - } else { - String temp = String.format(MODEL_IMPORT_PATH, lowVersionString, ""); - return temp.substring(0, temp.lastIndexOf("model.") + "model.".length()); - } - } - - public static String getLowerVersionAbsPathFromImportStatement(String type1ImportStatement, String type2ImportStatement, String version) { - String type1Path = importStatementToAbsolutePath(type1ImportStatement); - String type2Path = importStatementToAbsolutePath(type2ImportStatement); - return getLowerVersionAbsPathFromAbsPath(type1Path, type2Path, version); - } - - public static String getHigherVersionAbsPath(String type1ImportStatement, String type2ImportStatement, String version) { - String type1Path = importStatementToAbsolutePath(type1ImportStatement); - String type2Path = importStatementToAbsolutePath(type2ImportStatement); - - String lowVersionString = getVersionString(version.substring(0, version.indexOf('_'))); - if (type1Path.contains(lowVersionString)) { - return type2Path; - } else { - return type1Path; - } - } -} - diff --git a/org.hl7.fhir.convertors/src/test/java/org/hl7/fhir/convertors/parser/ParserTest.java b/org.hl7.fhir.convertors/src/test/java/org/hl7/fhir/convertors/parser/ParserTest.java deleted file mode 100644 index 5a38c98da..000000000 --- a/org.hl7.fhir.convertors/src/test/java/org/hl7/fhir/convertors/parser/ParserTest.java +++ /dev/null @@ -1,12 +0,0 @@ -package org.hl7.fhir.convertors.parser; - -import org.junit.Test; - -import static org.junit.Assert.*; - -public class ParserTest { - - @Test - public void parseAllTheCodes() { - } -} \ No newline at end of file