Stream: committers
Topic: Trying to reference another element within a DataType
Khalid Shahin (Jun 10 2020 at 22:16):
So I see that some resources have the ability to nest elements within themselves like with Parameters.parameter.part where it has all the elements of Parameters.parameter: http://build.fhir.org/parameters.html
I was able to successfully do this with another resource EvidenceReport.section.section: http://build.fhir.org/evidencereport.html
And I want to do that with the Statistic DataType: http://build.fhir.org/statistic.html
But when I try doing this with a Statistic.attributeEstimate.attributeEstimate the build fails with this error message at the end:
[java] ...page statistic.html 0.007 574sec 1959MB
[java] This was a Full Build 0.013 574sec 1959MB
[java] FHIR build failure @ Wed, Jun 10, 2020 18:11-0400 2.804 577sec 1959MB
[java] Error: null
[java] java.lang.NullPointerException
[java] at org.hl7.fhir.definitions.generators.specification.SvgGenerator.getItemForPath(SvgGenerator.java:968)
[java] at org.hl7.fhir.definitions.generators.specification.SvgGenerator.drawClass(SvgGenerator.java:933)
[java] at org.hl7.fhir.definitions.generators.specification.SvgGenerator.drawClass(SvgGenerator.java:931)
[java] at org.hl7.fhir.definitions.generators.specification.SvgGenerator.drawElement(SvgGenerator.java:782)
[java] at org.hl7.fhir.definitions.generators.specification.SvgGenerator.generate(SvgGenerator.java:195)
[java] at org.hl7.fhir.tools.publisher.PageProcessor.umlForDt(PageProcessor.java:2575)
[java] at org.hl7.fhir.tools.publisher.PageProcessor.processPageIncludes(PageProcessor.java:690)
[java] at org.hl7.fhir.tools.publisher.PageProcessor.processPageIncludes(PageProcessor.java:660)
[java] at org.hl7.fhir.tools.publisher.PageProcessor.processPageIncludes(PageProcessor.java:656)
[java] at org.hl7.fhir.tools.publisher.Publisher.producePage(Publisher.java:5263)
[java] at org.hl7.fhir.tools.publisher.Publisher.produceSpec(Publisher.java:2437)
[java] at org.hl7.fhir.tools.publisher.Publisher.produceSpecification(Publisher.java:2217)
[java] at org.hl7.fhir.tools.publisher.Publisher.execute(Publisher.java:626)
[java] at org.hl7.fhir.tools.publisher.Publisher.main(Publisher.java:487)
BUILD FAILED
C:\Users\Khalid\Documents\GitHub\fhir\build.xml:30: The following error occurred while executing this line:
C:\Users\Khalid\Documents\GitHub\fhir\tools\java\org.hl7.fhir.tools.core\build.xml:70: Java returned: 1
Is it failing because you can't reference another element within a DataType? If so, what should we do instead?
Lloyd McKenzie (Jun 10 2020 at 22:57):
Can you show exactly what you're trying to do?
Khalid Shahin (Jun 11 2020 at 01:10):
Sure, I attached the Statistic DataType spreadsheet. It's row 21 "Statistic.attributeEstimate.attributeEstimate" statistic.xml
And we're replacing Statistic.attributeEstimate.estimateQualifier with Statistic.attributeEstimate.attributeEstimate so that it can be nested indefinitely such as Statistic.attributeEstimate.attributeEstimate.attributeEstimate
I'm trying to nest the attributeEstimate inside of itself so you can have an any number of nesting of attributeEstimates. For example, you have a a Statistic of "-4.60" on Statistic.quantity and that's coded as "Mean Difference" on the Statistic.statisticType. But that Mean Difference also has more attribute estimate (or can be called precision estimate) about it like the p-value, I-squared, or Cochran's Q statistic stored under Statistic.attributeEstimate. And that Cochran's Q statistic could have an attributeEstimate about it like a Confidence interval which would be captured under Statistic.attributeEstimate.attributeEstimate.
So all together the Statistic would look something like. (I made this example up)
{
"statisticType": {
"coding": [
{
"code": "0000457",
"display": "Mean Difference"
}
]
},
"quantity": -4.6,
"attributeEstimate": [
{
"type": {
"coding": [
{
"code": "0000419",
"display": "Cochran's Q statistic"
}
]
},
"quantity": 7.36,
"attributeEstimate": [
{
"type": {
"coding": [
{
"code": "C53324",
"display": "Confidence interval"
}
]
},
"range": {
"low": 7.06,
"high": 8.12
}
}
]
}
]
}
And the StatisticAttributeEstimateType codesystem: http://build.fhir.org/valueset-attribute-estimate-type.html
Would making attributeEstimate a DataType allow us to nest an attributeEstimate inside of itself?
Lloyd McKenzie (Jun 11 2020 at 02:03):
@Grahame Grieve
Khalid Shahin (Jun 11 2020 at 19:04):
And another example could be I-squared instead of "Cochran's Q statistic" if you're more familiar with that.
Khalid Shahin (Jun 24 2020 at 16:50):
@Grahame Grieve @Lloyd McKenzie
I believe this could be a bug in the publisher.bat because it was a null pointer error.
Grahame Grieve (Jun 24 2020 at 20:18):
it's on my todo list, but not close to the top :frown:
Last updated: Apr 12 2022 at 19:14 UTC