Java Code Examples for org.hl7.fhir.r4.model.StructureDefinition#getId()

The following examples show how to use org.hl7.fhir.r4.model.StructureDefinition#getId() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: StructureMapUtilities.java    From org.hl7.fhir.core with Apache License 2.0 5 votes vote down vote up
private String getActualType(StructureMap map, String statedType) throws FHIRException {
  // check the aliases
  for (StructureMapStructureComponent imp : map.getStructure()) {
    if (imp.hasAlias() && statedType.equals(imp.getAlias())) {
      StructureDefinition sd = worker.fetchResource(StructureDefinition.class, imp.getUrl());
      if (sd == null)
        throw new FHIRException("Unable to resolve structure "+imp.getUrl());
      return sd.getId(); // should be sd.getType(), but R2...
    }
  }
  return statedType;
}
 
Example 2
Source File: SnapShotGenerationTests.java    From org.hl7.fhir.core with Apache License 2.0 5 votes vote down vote up
@Override
public String getLinkForProfile(StructureDefinition profile, String url) {
  StructureDefinition sd = TestingUtilities.context().fetchResource(StructureDefinition.class, url);
  if (sd == null)
    return url + "|" + url;
  else
    return sd.getId() + ".html|" + sd.present();
}