FHIR Chat · Put example in ImplementationGuide · IG creation

Stream: IG creation

Topic: Put example in ImplementationGuide


view this post on Zulip Brian Reinhold (Oct 23 2018 at 23:57):

I am quite confused how I can get a JSON example into my implementation Guide structure. Everything I try causes the build to throw some kind of exception. I am using Lloyd's build procedure. As a twist, the example is actually a Bundle containing several resources, all used in the PHD profile.

view this post on Zulip Lloyd McKenzie (Oct 23 2018 at 23:59):

The source for your examples is JSON rather than XML? That's atypical, so it's possible there's a tooling bug that causes an issue. (Usually we source the examples as XML and use the IGPublisher to generate the XML and RDF variants. That allows us to use XML schemas when authoring the instances. Have you tried seeing whether an XML instance works?

view this post on Zulip Grahame Grieve (Oct 24 2018 at 06:30):

json should be fine.

view this post on Zulip Grahame Grieve (Oct 24 2018 at 06:30):

what's the error?

view this post on Zulip Brian Reinhold (Oct 24 2018 at 08:44):

The source for your examples is JSON rather than XML? That's atypical, so it's possible there's a tooling bug that causes an issue. (Usually we source the examples as XML and use the IGPublisher to generate the XML and RDF variants. That allows us to use XML schemas when authoring the instances. Have you tried seeing whether an XML instance works?

@Lloyd McKenzie These examples are being generated in code by a PHG uploader working with real medical devices. xml is too resource-demanding thus the JSON. It would be a big job to convert that Bundle to xml by hand; never mind the chance for error. Of course there might be a tool to do that but xml is often full of attributes so its hard to know how to do in general I would assume.

I am wondering if it is the Bundle that's the problem....

view this post on Zulip Grahame Grieve (Oct 24 2018 at 08:46):

btw @Lloyd McKenzie json resources are not atypical

view this post on Zulip Brian Reinhold (Oct 24 2018 at 09:03):

what's the error?

@Grahame Grieve I have reverted back to what it was (I removed the example and extension I was trying to put in). But I am still getting an error and from what I can tell its trying to parse the Implementation Guide resource. This is the end of the stack trace

Load Terminology Cache from E:\Ruby25-x64\IG_Publisher\PHD_IG\src-generated\txcache (10.0088sec)
     [java]     at org.hl7.fhir.r4.formats.XmlParser.parseImplementationGuideImplementationGuideDefinitionComponent(XmlParser.java:11924)
     [java] Connect to Terminology Server at http://tx.fhir.org                              (10.0090sec)
     [java]     at org.hl7.fhir.r4.formats.XmlParser.parseImplementationGuideContent(XmlParser.java:11857)
     [java]     at org.hl7.fhir.r4.formats.XmlParser.parseImplementationGuide(XmlParser.java:11810)
     [java]     at org.hl7.fhir.r4.formats.XmlParser.parseResource(XmlParser.java:23900)

From that it looks like it is complaining about the guide. Has the build tool changed? I have not run in a couple of weeks.

view this post on Zulip Grahame Grieve (Oct 24 2018 at 09:20):

the format of the IG resource changed - you need to update it, looks like

view this post on Zulip Brian Reinhold (Oct 24 2018 at 09:40):

the format of the IG resource changed - you need to update it, looks like

@Grahame Grieve Oh...It looks like 'package' and 'packageId' has changed to 'grouping' and 'groupingId'. Thanks for the heads up.

view this post on Zulip Grahame Grieve (Oct 24 2018 at 09:41):

np

view this post on Zulip Brian Reinhold (Oct 24 2018 at 09:57):

np

That solved the build problem. I also see that the spelling error in Device.property.valueQuanity was fixed to Device.property.valueQuantity. That spelling error cost me a day! I could NOT figure out what I was doing wrong. Now I am going to have to go back and re-fix all my spellings! (Will point out it take 3:50 to build!!)

view this post on Zulip Lloyd McKenzie (Oct 25 2018 at 03:44):

I didn't say JSON resources were atypical, just maintaining the source for examples that way. However, if that's not the issue, great :)


Last updated: Apr 12 2022 at 19:14 UTC