set id when parsing StructureMap
This commit is contained in:
parent
f5e2d3405d
commit
137506f37f
|
@ -326,6 +326,7 @@ public class StructureMapUtilities {
|
||||||
lexer.token("map");
|
lexer.token("map");
|
||||||
StructureMap result = new StructureMap();
|
StructureMap result = new StructureMap();
|
||||||
result.setUrl(lexer.readConstant("url"));
|
result.setUrl(lexer.readConstant("url"));
|
||||||
|
result.setId(tail(result.getUrl()));
|
||||||
lexer.token("=");
|
lexer.token("=");
|
||||||
result.setName(lexer.readConstant("name"));
|
result.setName(lexer.readConstant("name"));
|
||||||
lexer.skipComments();
|
lexer.skipComments();
|
||||||
|
@ -344,9 +345,14 @@ public class StructureMapUtilities {
|
||||||
parseGroup(result, lexer);
|
parseGroup(result, lexer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private String tail(String url) {
|
||||||
|
return url.substring(url.lastIndexOf("/")+1);
|
||||||
|
}
|
||||||
|
|
||||||
private void parseConceptMap(StructureMap result, FHIRLexer lexer) throws FHIRLexerException {
|
private void parseConceptMap(StructureMap result, FHIRLexer lexer) throws FHIRLexerException {
|
||||||
lexer.token("conceptmap");
|
lexer.token("conceptmap");
|
||||||
ConceptMap map = new ConceptMap();
|
ConceptMap map = new ConceptMap();
|
||||||
|
|
|
@ -655,6 +655,7 @@ public class StructureMapUtilities {
|
||||||
lexer.token("map");
|
lexer.token("map");
|
||||||
StructureMap result = new StructureMap();
|
StructureMap result = new StructureMap();
|
||||||
result.setUrl(lexer.readConstant("url"));
|
result.setUrl(lexer.readConstant("url"));
|
||||||
|
result.setId(tail(result.getUrl()));
|
||||||
lexer.token("=");
|
lexer.token("=");
|
||||||
result.setName(lexer.readConstant("name"));
|
result.setName(lexer.readConstant("name"));
|
||||||
lexer.skipComments();
|
lexer.skipComments();
|
||||||
|
|
|
@ -712,6 +712,7 @@ public class StructureMapUtilities {
|
||||||
lexer.token("map");
|
lexer.token("map");
|
||||||
StructureMap result = new StructureMap();
|
StructureMap result = new StructureMap();
|
||||||
result.setUrl(lexer.readConstant("url"));
|
result.setUrl(lexer.readConstant("url"));
|
||||||
|
result.setId(tail(result.getUrl()));
|
||||||
lexer.token("=");
|
lexer.token("=");
|
||||||
result.setName(lexer.readConstant("name"));
|
result.setName(lexer.readConstant("name"));
|
||||||
lexer.skipComments();
|
lexer.skipComments();
|
||||||
|
|
Loading…
Reference in New Issue