private PropertyWithType createProfile(StructureMap map, List<StructureDefinition> profiles, PropertyWithType prop, String sliceName, Base ctxt) throws FHIRException { if (prop.getBaseProperty().getDefinition().getPath().contains(".")) throw new DefinitionException("Unable to process entry point"); String type = prop.getBaseProperty().getDefinition().getPath(); String suffix = ""; if (ids.containsKey(type)) { profile.setDerivation(TypeDerivationRule.CONSTRAINT); profile.setType(type); profile.setBaseDefinition(prop.getBaseProperty().getStructure().getUrl()); profile.setName("Profile for "+profile.getType()+" for "+sliceName); profile.setUrl(map.getUrl().replace("StructureMap", "StructureDefinition")+"-"+profile.getType()+suffix); profile.setCopyright(map.getCopyright()); profile.setFhirVersion(FHIRVersion.fromCode(Constants.VERSION)); profile.setKind(prop.getBaseProperty().getStructure().getKind()); profile.setAbstract(false); ElementDefinition ed = profile.getDifferential().addElement();
Property element = prop.getBaseProperty().getChild(prop.types.getType(), src.getElement()); if (element == null) throw new Exception("Rule \""+ruleId+"\": Unknown element name "+src.getElement());
private PropertyWithType createProfile(StructureMap map, List<StructureDefinition> profiles, PropertyWithType prop, String sliceName, Base ctxt) throws FHIRException { if (prop.getBaseProperty().getDefinition().getPath().contains(".")) throw new DefinitionException("Unable to process entry point"); String type = prop.getBaseProperty().getDefinition().getPath(); String suffix = ""; if (ids.containsKey(type)) { profile.setDerivation(TypeDerivationRule.CONSTRAINT); profile.setType(type); profile.setBaseDefinition(prop.getBaseProperty().getStructure().getUrl()); profile.setName("Profile for "+profile.getType()+" for "+sliceName); profile.setUrl(map.getUrl().replace("StructureMap", "StructureDefinition")+"-"+profile.getType()+suffix); profile.setCopyright(map.getCopyright()); profile.setFhirVersion(FHIRVersion.fromCode(Constants.VERSION)); profile.setKind(prop.getBaseProperty().getStructure().getKind()); profile.setAbstract(false); ElementDefinition ed = profile.getDifferential().addElement();
Property element = prop.getBaseProperty().getChild(prop.types.getType(), src.getElement()); if (element == null) throw new Exception("Rule \""+ruleId+"\": Unknown element name "+src.getElement());