public boolean addProfile(List<ValidationMessage> errors, String profile, boolean error, String path, Element element) { String effectiveProfile = profile; String version = null; if (profile.contains("|")) { effectiveProfile = profile.substring(0, profile.indexOf('|')); version = profile.substring(profile.indexOf('|')+1); } StructureDefinition sd = context.fetchResource(StructureDefinition.class, effectiveProfile); if (warningOrError(error, errors, IssueType.INVALID, element.line(), element.col(), path, sd != null, "StructureDefinition reference \"{0}\" could not be resolved", profile)) { if (rule(errors, IssueType.STRUCTURE, element.line(), element.col(), path, version==null || (sd.getVersion()!=null && sd.getVersion().equals(version)), "Referenced version " + version + " does not match found version " + sd.getVersion() + " for profile " + sd.getUrl(), profile)) { if (rule(errors, IssueType.STRUCTURE, element.line(), element.col(), path, sd.hasSnapshot(), "StructureDefinition has no snapshot - validation is against the snapshot, so it must be provided")) { if (!profiles.containsKey(sd)) { profiles.put(sd, new ProfileUsage(sd)); addAncestorProfiles(sd); return true; } } } } return false; }
public boolean addProfile(List<ValidationMessage> errors, String profile, boolean error, String path, Element element) { String effectiveProfile = profile; String version = null; if (profile.contains("|")) { effectiveProfile = profile.substring(0, profile.indexOf('|')); version = profile.substring(profile.indexOf('|')+1); } StructureDefinition sd = context.fetchResource(StructureDefinition.class, effectiveProfile); if (warningOrError(error, errors, IssueType.INVALID, element.line(), element.col(), path, sd != null, "StructureDefinition reference \"{0}\" could not be resolved", profile)) { if (rule(errors, IssueType.STRUCTURE, element.line(), element.col(), path, version==null || (sd.getVersion()!=null && sd.getVersion().equals(version)), "Referenced version " + version + " does not match found version " + sd.getVersion() + " for profile " + sd.getUrl(), profile)) { if (rule(errors, IssueType.STRUCTURE, element.line(), element.col(), path, sd.hasSnapshot(), "StructureDefinition has no snapshot - validation is against the snapshot, so it must be provided")) { if (!profiles.containsKey(sd)) { profiles.put(sd, new ProfileUsage(sd)); addAncestorProfiles(sd); return true; } } } } return false; }
for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(convertIdentifier(t)); tgt.setVersion(src.getVersion()); tgt.setName(src.getName()); tgt.setDisplay(src.getTitle());
tgt.addIdentifier(convertIdentifier(t)); if (src.hasVersion()) tgt.setVersion(src.getVersion()); tgt.setName(src.getName()); if (src.hasTitle())
for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(convertIdentifier(t)); tgt.setVersion(src.getVersion()); tgt.setName(src.getName()); tgt.setDisplay(src.getTitle());
tgt.addIdentifier(convertIdentifier(t)); if (src.hasVersion()) tgt.setVersion(src.getVersion()); tgt.setName(src.getName()); if (src.hasTitle())