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())); if (tgt.hasSnapshot())
tgt.setDerivation(convertTypeDerivationRule(src.getDerivation())); if (src.hasSnapshot()) { tgt.setSnapshot(convertStructureDefinitionSnapshotComponent(src.getSnapshot())); tgt.getSnapshot().getElementFirstRep().getType().clear();
derived.setSnapshot(new StructureDefinitionSnapshotComponent());
public void setIds(StructureDefinition sd, boolean checkFirst) throws DefinitionException { if (!checkFirst || !sd.hasDifferential() || hasMissingIds(sd.getDifferential().getElement())) { if (!sd.hasDifferential()) sd.setDifferential(new StructureDefinitionDifferentialComponent()); generateIds(sd.getDifferential().getElement(), sd.getName()); } if (!checkFirst || !sd.hasSnapshot() || hasMissingIds(sd.getSnapshot().getElement())) { if (!sd.hasSnapshot()) sd.setSnapshot(new StructureDefinitionSnapshotComponent()); generateIds(sd.getSnapshot().getElement(), sd.getName()); } }
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())); if (tgt.hasSnapshot())
tgt.setDerivation(convertTypeDerivationRule(src.getDerivation())); if (src.hasSnapshot()) { tgt.setSnapshot(convertStructureDefinitionSnapshotComponent(src.getSnapshot())); tgt.getSnapshot().getElementFirstRep().getType().clear();