Stream: tooling
Topic: IG publisher
Nick George (Mar 25 2020 at 20:23):
I'm still pretty blocked on this publisher error - I started working off of the sample-ig, which works and which I can modify and see results, but if I try to swap out a xml structure definition for a json one, I get
org.hl7.fhir.exceptions.FHIRFormatError: Unknown type ElementDefinition at org.hl7.fhir.r4.formats.XmlParser.parseType(XmlParser.java:24274) at org.hl7.fhir.r4.formats.XmlParserBase.parseType(XmlParserBase.java:133) at org.hl7.fhir.r4.formats.ParserBase.parseType(ParserBase.java:92) at org.hl7.fhir.r4.formats.ParserBase.parseType(ParserBase.java:83) at org.hl7.fhir.igtools.publisher.Publisher$TypeParserR4.parseType(Publisher.java:437) at org.hl7.fhir.r5.utils.NarrativeGenerator.parseType(NarrativeGenerator.java:1061) at org.hl7.fhir.r5.utils.NarrativeGenerator$BaseWrapperMetaElement.getBase(NarrativeGenerator.java:625) at org.hl7.fhir.r5.utils.NarrativeGenerator.renderLeaf(NarrativeGenerator.java:1426) at org.hl7.fhir.r5.utils.NarrativeGenerator.addColumnValues(NarrativeGenerator.java:1365) at org.hl7.fhir.r5.utils.NarrativeGenerator.generateByProfile(NarrativeGenerator.java:1239) at org.hl7.fhir.r5.utils.NarrativeGenerator.generate(NarrativeGenerator.java:1144) at org.hl7.fhir.igtools.publisher.Publisher.generateNarratives(Publisher.java:929) at org.hl7.fhir.igtools.publisher.Publisher.loadConformance(Publisher.java:3341) at org.hl7.fhir.igtools.publisher.Publisher.createIg(Publisher.java:805) at org.hl7.fhir.igtools.publisher.Publisher.execute(Publisher.java:666) at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:6933)
Nick George (Mar 25 2020 at 20:25):
Is there somewhere I need to specify that it is json and not XML?
Jose Costa Teixeira (Mar 25 2020 at 20:28):
can I see your json?
Nick George (Mar 25 2020 at 20:34):
Seems the parser is hardcoded to XML? is it not possible to use the publisher on json resources? https://github.com/HL7/fhir-ig-publisher/blob/master/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/publisher/Publisher.java#L438
Nick George (Mar 25 2020 at 23:13):
@Jose Costa Teixeira The resource Json? I just copied the US-core patient profile and updated the url
Nick George (Mar 25 2020 at 23:13):
which worked when I copied the US Core xml, but not json
Nick George (Mar 25 2020 at 23:14):
(the structure definition is quite large but you can see it here: https://build.fhir.org/ig/HL7/US-Core-R4/StructureDefinition-us-core-patient.json.html
Jose Costa Teixeira (Mar 25 2020 at 23:30):
json artifacts also work. I tested with this json and it builds ok
Jose Costa Teixeira (Mar 25 2020 at 23:31):
do you have a repo or other way to look at your ig?
Grahame Grieve (Mar 26 2020 at 02:07):
is this an R4 IG?
Nick George (Mar 26 2020 at 22:22):
Sorry for the spam, I'm making progress here. Not sure what that ElementDefinition was, but it's gone now. Current issue: is there guidance somewhere for how to specify dependencies? E.g., how do I pull in UsCore?
Nick George (Mar 26 2020 at 22:24):
ah just found https://confluence.hl7.org/display/FHIR/IG+Publisher+Documentation#IGPublisherDocumentation-DependencyList - looks like that's out of date, but the dependsOn property of implementationguide seems to work
Nick George (Mar 27 2020 at 18:59):
Gonna keep posting questions here as I find them, to give a sense of pain-points:
There are a number of errors in qa.html that it's not obvious what they mean to me.
Nick George (Mar 27 2020 at 18:59):
Unable to find name for the resource StructureDefinition/Patient. Names are mandatory to allow proper population of the artifact list.
I don't know what name it's looking for here - the name field on the structure definitions is populated
Nick George (Mar 27 2020 at 19:01):
a million errors like
The link 'background.html' for "Background" cannot be resolved
I have a background.xml but it doesn't seem to generate an html
Nick George (Mar 27 2020 at 19:15):
[edit, deleted one that I figured out, my mistake]
Jose Costa Teixeira (Mar 27 2020 at 19:29):
The name missing seems to be in the implementationguide resource. Implementationguide.definition.resource.name
Grahame Grieve (Mar 27 2020 at 19:29):
you should ask questions about IG creation in #IG creation - I and others check this thread much less often
Grahame Grieve (Mar 27 2020 at 19:30):
Unable to find name for the resource StructureDefinition/Patient
looks like an error in the template @Lloyd McKenzie
Nick George (Mar 27 2020 at 19:49):
ack, thanks Grahame.
Nick George (Mar 27 2020 at 19:51):
Do I need to list the names of all the resources in the implementation guide resource itself? I assumed that would just get pulled from the StructureDefinitions themselves
Nick George (Mar 27 2020 at 19:51):
oh I think I see the problem with my backgound.html links
Richard Townley-O'Neill (Jan 20 2021 at 05:22):
Publisher using wrong text for short and definition.
When a profile defines the types of an element, the IG Publisher replaces the short and definition of the element with values from the first mentioned type, rather than from the base definition.
For example, if PratitionerRole.identifier has its type set to Identifier, AUMedicareProviderNumber, the short is changed from "Business Identifiers that are specific to a role/location" to "An identifier intended for computation".
This can be managed by explicitly setting PractitionerRole.identifier.short to the value that it should inherit from PractitionerRole.
See http://build.fhir.org/ig/hl7au/au-fhir-base/StructureDefinition-au-practitionerrole.html
and https://github.com/hl7au/au-fhir-base/blob/master/resources/au-practitionerrole.xml
This has had the correct text added to the difference
Richard Townley-O'Neill (Jan 20 2021 at 07:17):
In AU Organization address shows the short which is not edited in the differential. It has the text from the Address data type instead of from the Organisation resource.
Richard Townley-O'Neill (Jan 27 2021 at 05:23):
Now in GitHub https://github.com/HL7/fhir-ig-publisher/issues/227
Grahame Grieve (Feb 04 2021 at 04:56):
@Richard Townley-O'Neill it's not clear to my why this is wrong
Richard Townley-O'Neill (Feb 04 2021 at 07:19):
Why use the short from the first listed type instead of from the base definition when more than one type is listed?
Richard Townley-O'Neill (Feb 04 2021 at 07:20):
Now I describe it it sounds like an enhancement.
Richard Townley-O'Neill (Feb 04 2021 at 07:20):
Or a complication.
Grahame Grieve (Feb 05 2021 at 02:17):
I don't understand. the short definition is specified in the differential, so that's what's used
Richard Townley-O'Neill (Feb 05 2021 at 07:19):
@Grahame Grieve I've created a rather better demo at http://build.fhir.org/ig/ci-collaborative/au-fhir-base-r4/branches/demo-of-inherited-test/StructureDefinition-au-practitionerrole.html
In the differential there is no short or definition for PractitionerRole.identifier, so I expect snapshot to inherit them from core PractitionerRole.
But, in the snapshot short and definition have values from the Identifier data type rather than from core PractitionerRole.
I want to keep the short and definition from core. To do that I have to include them in differential. That is counter intuitive to me.
Last updated: Apr 12 2022 at 19:14 UTC