tgt.setType(src.getDifferential().getElement().get(0).getPath().substring(0, src.getDifferential().getElement().get(0).getPath().indexOf("."))); tgt.setBaseDefinition(src.getBase()); tgt.setDerivation(src.hasConstrainedType() ? org.hl7.fhir.dstu3.model.StructureDefinition.TypeDerivationRule.CONSTRAINT : org.hl7.fhir.dstu3.model.StructureDefinition.TypeDerivationRule.SPECIALIZATION); tgt.setSnapshot(convertStructureDefinitionSnapshotComponent(src.getSnapshot())); tgt.setDifferential(convertStructureDefinitionDifferentialComponent(src.getDifferential())); tgt.getDifferential().getElementFirstRep().getType().clear(); if (tgt.getKind() == StructureDefinitionKind.PRIMITIVETYPE && !tgt.getType().equals(tgt.getId())) { tgt.setDerivation(TypeDerivationRule.SPECIALIZATION); tgt.setBaseDefinition("http://hl7.org/fhir/StructureDefinition/"+tgt.getType());
if (src.hasBaseDefinition()) tgt.setBaseDefinition(src.getBaseDefinition()); tgt.setDerivation(convertTypeDerivationRule(src.getDerivation())); if (src.hasSnapshot()) { tgt.setSnapshot(convertStructureDefinitionSnapshotComponent(src.getSnapshot()));
profile.setDerivation(TypeDerivationRule.CONSTRAINT); profile.setType(type); profile.setBaseDefinition(prop.getBaseProperty().getStructure().getUrl());
tgt.setType(src.getDifferential().getElement().get(0).getPath().substring(0, src.getDifferential().getElement().get(0).getPath().indexOf("."))); tgt.setBaseDefinition(src.getBase()); tgt.setDerivation(src.hasConstrainedType() ? org.hl7.fhir.dstu3.model.StructureDefinition.TypeDerivationRule.CONSTRAINT : org.hl7.fhir.dstu3.model.StructureDefinition.TypeDerivationRule.SPECIALIZATION); tgt.setSnapshot(convertStructureDefinitionSnapshotComponent(src.getSnapshot())); tgt.setDifferential(convertStructureDefinitionDifferentialComponent(src.getDifferential())); tgt.getDifferential().getElementFirstRep().getType().clear(); if (tgt.getKind() == StructureDefinitionKind.PRIMITIVETYPE && !tgt.getType().equals(tgt.getId())) { tgt.setDerivation(TypeDerivationRule.SPECIALIZATION); tgt.setBaseDefinition("http://hl7.org/fhir/StructureDefinition/"+tgt.getType());
if (src.hasBaseDefinition()) tgt.setBaseDefinition(src.getBaseDefinition()); tgt.setDerivation(convertTypeDerivationRule(src.getDerivation())); if (src.hasSnapshot()) { tgt.setSnapshot(convertStructureDefinitionSnapshotComponent(src.getSnapshot()));