tgt.addContext(t.getValue()); if (src.hasConstrainedType()) tgt.setType(src.getConstrainedType()); 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("."))); 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.setType(tgt.getId());
profiles.add(profile); profile.setDerivation(TypeDerivationRule.CONSTRAINT); profile.setType(type); profile.setBaseDefinition(prop.getBaseProperty().getStructure().getUrl()); profile.setName("Profile for "+profile.getType()+" for "+sliceName);
tgt.addContext(t.getValue()); if (src.hasConstrainedType()) tgt.setType(src.getConstrainedType()); 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("."))); 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.setType(tgt.getId());