Stream: IG creation
Topic: Limiting the number of values in ValueSets HTML files
Meen Chul Kim (May 15 2020 at 01:07):
Hi,
Our resources refer to multiple ontologies including HPO. Each of these ontologies is often very large, so rather than creating CodeSystem
resources in our FHIR model , we have been trying to reference CodeSystem
s in an external terminology server (especially Ontoserver).
To this end, we've tried to point to Ontoserver for resources validation, executing the following command:
java -jar org.hl7.fhir.publisher.jar -ig site_root/ig.ini -tx https://r4.ontoserver.csiro.au/fhir
This command ended up running into java.lang.OutOfMemoryError: Java heap space
error when generating output HTML files. I talked to external collaborators and figured that the above command tries to load all values (referred by Ontoserver) in ValueSets into output HTML files. The HPO CodeSystem alone includes at least 20,000 concepts and is therefore huge. After looking into the ImplementationGuide
resource, it seems like using "expansion-parameter"
for "parameter"
under "definition"
may be a right way to control the numbers of values in ValueSet
s rendered in the output HTML files. So, as far as I understand, I may add the following snippets to our IG.json
:
{
...
"definition": {
"parameter": [
{
"code": "expansion-parameter",
"value": "some value"
}
]
}
...
}
Based on the documentation, the value for the "expansion-parameter"
code should be a "named type", and it is really hard to find some relevant examples for this implementation. I wonder if I am looking into a right resource to limit the number of ValueSet
's values rendered in an output HTML file. If so, can I get some advice to properly implement this?
Grahame Grieve (May 15 2020 at 01:09):
well, first we should talk about what you are doing and wanting to do.
Grahame Grieve (May 15 2020 at 01:09):
20000 isn't that much. We've had bigger. How much memory are you making available to the ig publisehr?
Natasha Singh (May 18 2020 at 16:40):
Hi Graham, I work with Meen ^. We don't explicitly set the JVM heap space arguments, but from the publisher logs it looks like 1.6 GB is available to the publisher. Do you have recommendations for JVM min/max heap size?
Grahame Grieve (May 18 2020 at 19:03):
that's plenty of memory. so that's not the issue. The parameter you need is path-expansion-params
documented here: https://confluence.hl7.org/display/FHIR/Implementation+Guide+Parameters
Grahame Grieve (May 18 2020 at 19:03):
though even then, I'm not sure that'll solve your problem.Can I reproduce this?
Meen Chul Kim (May 19 2020 at 15:01):
Thanks @Grahame Grieve!
What confuses me actually is that on the official FHIR documentation (as I've linked in the initial message), there is no parameter code "path-expansion-params"
, but "expansion-parameter"
, and the latter is repeating whereas the former is said not to be repeating on Confluence. And "expansion-parameter"
should have a "value"
which is a named type (according to the documentation. I am not sure how it actually works though) while "path-expansion-params"
has a path to a parameter resource as a "value"
. When running validation with these two cases, "path-expansion-params"
returns a build error, so it seems deprecated. So, I wonder if the use of "expansion-parameter"
is the right use case for limiting the number of rendered values in an output HTML file. If so, I also wonder about how to set "value"
.
Grahame Grieve (May 19 2020 at 19:13):
When running validation
So you're not talking about publishing an IG?
Natasha Singh (May 20 2020 at 14:25):
We use the publisher for both validation of conformance resources and publishing the IG
Grahame Grieve (May 20 2020 at 20:33):
the IG Publisher can be started in one of 2 ways :
- ig.json (deprecated): Specific parameters supported:
sct-edition
andactiveOnly
- ig.ini (preferred): only
path-expansion-params
is supported
Grahame Grieve (May 20 2020 at 20:33):
"path-expansion-params" returns a build error
What's the issue?
Meen Chul Kim (May 29 2020 at 07:51):
In our IG, I tried:
{
"code": "path-expansion-params",
"value": "input/resources/terminology/Parameters-kfdrc-ontoserver.json"
}
But, the publisher returns the following error:
java.io.FileNotFoundException: input/resources/terminology/Parameters-kfdrc-ontoserver.json (No such file or directory)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(FileInputStream.java:195)
at java.io.FileInputStream.<init>(FileInputStream.java:138)
at org.hl7.fhir.utilities.TextFile.fileToBytes(TextFile.java:199)
at org.hl7.fhir.r4.formats.FormatUtilities.loadFile(FormatUtilities.java:166)
at org.hl7.fhir.igtools.publisher.Publisher.initializeFromIg(Publisher.java:1701)
at org.hl7.fhir.igtools.publisher.Publisher.initialize(Publisher.java:1322)
at org.hl7.fhir.igtools.publisher.Publisher.execute(Publisher.java:690)
at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:7383)
When not including the above parameter, all other resources are loaded fine and the validation passes.
Meen Chul Kim (May 29 2020 at 07:52):
And "input/resources/terminology/Parameters-kfdrc-ontoserver.json"
is like:
{
"resourceType": "Parameters",
"id": "kfdrc-ontoserver",
"parameter": [
{
"name": "count",
"valueInteger": 100
}
]
}
Grahame Grieve (May 29 2020 at 20:42):
hmm. evidently no one has tried to do this before, because the code is clearly wrong here
Grahame Grieve (May 29 2020 at 21:17):
this will work next release (and the relative path will be relative to the ig resource)
Meen Chul Kim (Jun 01 2020 at 16:33):
Thanks @Grahame Grieve! Looking forward to the next release!
Grahame Grieve (Jun 01 2020 at 19:51):
it's now done. Track releases on #tooling/releases
Last updated: Apr 12 2022 at 19:14 UTC