Stream: IG creation
Topic: Unknown resource Measure
Christopher Schuler (Sep 05 2019 at 20:06):
Getting an error in the latest publisher: java.lang.Exception:
org.hl7.fhir.exceptions.FHIRException: Unknown resource Measure
at org.hl7.fhir.convertors.VersionConvertor_30_50.convertResource(VersionConvertor_30_50.java:22383)
Looking at the convertResource method in the converter (https://github.com/hapifhir/org.hl7.fhir.core/blob/master/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/VersionConvertor_30_50.java), Measure appears to be missing.
Grahame Grieve (Sep 05 2019 at 20:15):
Indeed it is. I'll have to find time to write a conversion, unless someone else wants to
Lloyd McKenzie (Sep 05 2019 at 20:20):
Why would Measure even be converted? I thought conversion was only for the infrastructure resources?
Grahame Grieve (Sep 05 2019 at 20:24):
not sure. what's the stack?
Christopher Schuler (Sep 05 2019 at 20:24):
Stack Dump (for debugging): (13.0624sec)
java.lang.Exception: Error parsing /Users/christopherschuler/Documents/workspace/dcg/repos/draft-measures/resources/measure/measure-exm124-FHIR: Unknown resource Measure
at org.hl7.fhir.igtools.publisher.Publisher.load(Publisher.java:3427)
at org.hl7.fhir.igtools.publisher.Publisher.loadConformance(Publisher.java:3026)
at org.hl7.fhir.igtools.publisher.Publisher.createIg(Publisher.java:717)
at org.hl7.fhir.igtools.publisher.Publisher.execute(Publisher.java:606)
at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:6402)
Caused by: org.hl7.fhir.exceptions.FHIRException: Unknown resource Measure
at org.hl7.fhir.convertors.VersionConvertor_30_50.convertResource(VersionConvertor_30_50.java:22383)
at org.hl7.fhir.igtools.publisher.Publisher.parseContent(Publisher.java:3720)
at org.hl7.fhir.igtools.publisher.Publisher.parse(Publisher.java:3775)
at org.hl7.fhir.igtools.publisher.Publisher.load(Publisher.java:3424)
... 4 more
Exception in thread "main" java.lang.NullPointerException
at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:6412)
Grahame Grieve (Sep 05 2019 at 20:37):
sigh. it's complicated. Basically, if it has a canonical URL, the IG publisher has to have it loaded natively
Christopher Schuler (Sep 05 2019 at 21:44):
I am happy to take a stab at including the logic for Measure conversion.
Grahame Grieve (Sep 05 2019 at 21:44):
great
Christopher Schuler (Sep 05 2019 at 22:28):
https://github.com/hapifhir/org.hl7.fhir.core/pull/74
Grahame Grieve (Sep 05 2019 at 22:31):
you only did the metadata, not any of the actual content?
Christopher Schuler (Sep 05 2019 at 22:32):
I used the existing Library conversion logic as an example, which only seems to include the meta. I am happy to go deeper.
Christopher Schuler (Sep 05 2019 at 22:34):
My bad. I will complete that
Grahame Grieve (Sep 05 2019 at 22:34):
Library does it all:
for (org.hl7.fhir.dstu3.model.RelatedArtifact t : src.getRelatedArtifact()) tgt.addRelatedArtifact(convertRelatedArtifact(t)); for (org.hl7.fhir.dstu3.model.ParameterDefinition t : src.getParameter()) tgt.addParameter(convertParameterDefinition(t)); for (org.hl7.fhir.dstu3.model.DataRequirement t : src.getDataRequirement()) tgt.addDataRequirement(convertDataRequirement(t)); for (org.hl7.fhir.dstu3.model.Attachment t : src.getContent()) tgt.addContent(convertAttachment(t));
Christopher Schuler (Sep 05 2019 at 22:34):
I just noticed
Grahame Grieve (Sep 05 2019 at 22:34):
I worry that doing only part of the resource will catch someone out...
Christopher Schuler (Sep 05 2019 at 22:34):
Yep, I'll add the rest
Christopher Schuler (Sep 06 2019 at 16:04):
https://github.com/hapifhir/org.hl7.fhir.core/pull/75
Christopher Schuler (Oct 22 2019 at 21:27):
@Grahame Grieve
The logic I added had a few issues. Issued a new PR:
https://github.com/hapifhir/org.hl7.fhir.core/pull/97
Christopher Schuler (Oct 30 2019 at 17:11):
@Grahame Grieve Anything I can do to expedite the merging of the following PR: https://github.com/hapifhir/org.hl7.fhir.core/pull/97 ?
I noticed that the Travis CI build for my PR has a test failure, but I am not sure if the failure is caused by my code. Thanks!
Grahame Grieve (Oct 31 2019 at 11:11):
reminding me was enough. I'm seriously behind - I put everything aside to push the technical correction over the line, which was why I hadn't got to it yet
Christopher Schuler (Oct 31 2019 at 20:28):
Much appreciated! I have downloaded the latest publisher from https://fhir.github.io/latest-ig-publisher/org.hl7.fhir.publisher.jar, but I am not seeing any change in the resulting Measure resources. Is the publisher updated with the latest code from the FHIR core project or is that pending?
Grahame Grieve (Oct 31 2019 at 23:12):
I haven't done a build yet - sometime today
Last updated: Apr 12 2022 at 19:14 UTC