FHIR Chat · Example resources without id/meta.profile · IG creation

Stream: IG creation

Topic: Example resources without id/meta.profile


view this post on Zulip Max Masnick (Jul 08 2021 at 20:19):

For the SHC Vaccination IG, we instruct implementers to not include Resource.id, Resource.meta, and Resource.text in resources. Does anyone know how to include examples without these elements using the IG publisher?

Our concern is that implementers will be confused if our examples contain elements that we explicity say should not be included due to payload size constraints.

view this post on Zulip Lloyd McKenzie (Jul 08 2021 at 22:09):

We have a request in for a means to suppress adding 'text' (presumably an extension). I don't think it's been actioned yet. In the meantime, what we've done is add this for narrative:

"text": {
    "status": "empty",
    "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p>This resource is not supposed to have a 'text' element at all.  One is included here only for publishing purposes.  When tooling supports, it will be removed entirely.  In conformant instances, the text element must be omitted entirely.</p></div>"
  },

I guess you could do something similar with id:
"id": "this-id-should-be-omitted"

view this post on Zulip Lloyd McKenzie (Jul 08 2021 at 22:10):

Though if your examples blow your payload constraints, that's not gonna help...

view this post on Zulip Max Masnick (Jul 09 2021 at 10:41):

Thanks Lloyd!

What we're doing for now is linking out to GitHub for the examples -- you can see this in action if you click the Examples tab on http://build.fhir.org/ig/dvci/vaccine-credential-ig/branches/reorganize/StructureDefinition-shc-covid19-laboratory-result-observation-dm.html

This approach is a bit of a hack, but it does get us what we need to avoid confusion for implementers.

I'd like to bring the examples back into the normal IG publisher workflow, but I believe this would require changes to both SUSHI and the IG publisher -- which I'm not necessarily advocating since our IG is an edge case in this regard. (I do think it would be generally good to be able to suppress Resource.text though, so glad to hear that's on your radar.)

view this post on Zulip Jose Costa Teixeira (Jul 09 2021 at 11:23):

did you profile those elements out to see where it breaks?

view this post on Zulip Max Masnick (Jul 09 2021 at 12:36):

Jose Costa Teixeira said:

did you profile those elements out to see where it breaks?

Not sure what you mean by this. If you're interested in looking at it, I can set up a sample branch.

view this post on Zulip Lloyd McKenzie (Jul 09 2021 at 13:43):

It's not a profile issue. The publisher requires examples to have ids because it can't resolve links to them otherwise. But Max doesn't want them to show up in the rendered version. The publisher also automatically injects narrative where it's missing. Max doesn't want that for certain examples.

view this post on Zulip Lloyd McKenzie (Jul 09 2021 at 13:43):

@Max Masnick can you submit a Git issue against the publisher?

view this post on Zulip Max Masnick (Jul 09 2021 at 13:44):

Sure, thanks!

view this post on Zulip Max Masnick (Jul 09 2021 at 14:08):

Logged as https://github.com/HL7/fhir-ig-publisher/issues/293

view this post on Zulip Grahame Grieve (Jul 13 2021 at 20:20):

I don't understand this issue. Firstly, the IGpublisher is never going to handle resources that don't have IDs

view this post on Zulip Grahame Grieve (Jul 13 2021 at 20:20):

If that task is asking to change that, then I'm afraid that's not going to happen. Otherwise, I don't know what the task is actually asking for

view this post on Zulip Lloyd McKenzie (Jul 13 2021 at 22:27):

The source is going to have ids. But the request is that the rendered examples don't include the id element. I.e. when you look at the XML, JSON, etc., the id would have been stripped.

view this post on Zulip Lloyd McKenzie (Jul 13 2021 at 22:27):

That should, presumably, be possible. We might need to put the id back in for the package - or strip examples without ids from the publication package.

view this post on Zulip Max Masnick (Jul 21 2021 at 14:17):

Thanks Lloyd, that's exactly what we're asking for -- we want a page like this in a built IG to not include id, text, etc. in the JSON.

(That example is from mCODE, not the SMART Health Card IG because the SHC IG doesn't have example pages now to avoid confusion around this issue.)

view this post on Zulip Max Masnick (Jul 21 2021 at 14:19):

@Grahame Grieve the problem we're trying to solve for is implementer confusion: if we say in the IG "don't populate Resource.text" but all our examples have Resource.text, that's potentially very confusing.

Our work-around for now is to link to files on GitHub instead of using the normal IG example pages, which isn't a great experience but at least isn't confusing. We would like to be able to use the example pages generated by the IG publisher instead, if there's a way to work around this.


Last updated: Apr 12 2022 at 19:14 UTC