FHIR Chat · warning about an instance · shorthand

Stream: shorthand

Topic: warning about an instance


view this post on Zulip Nathan Davis (Jan 14 2022 at 17:08):

I'm getting this warning...

warn  Instance xxx-example is not an instance of a resource, so it should only be used inline on other instances, and it will not be exported to a standalone
file. Specify "Usage: #inline" to remove this warning.

The profile that it is an example of is based on another profile (US Core).
Not sure how to fix this.

view this post on Zulip David Pyke (Jan 14 2022 at 17:08):

CAn you show us the code?

view this post on Zulip Nathan Davis (Jan 14 2022 at 17:11):

Sure. First the profile.

Profile: AverageBloodPressure
Parent: VitalSigns
Id: average-blood-pressure
Title: "Average Blood Pressure"

VitalSigns is an alias for ... http://hl7.org/fhir/StructureDefinition/vitalsigns
The example.

Instance: AverageBloodPressure-example
InstanceOf: average-blood-pressure
Description: "Average Blood Pressure example"
Usage: #example

view this post on Zulip Nathan Davis (Jan 14 2022 at 17:13):

I have a dependency in the config.yaml as
dependencies: hl7.fhir.us.core: 3.1.1

view this post on Zulip David Pyke (Jan 14 2022 at 17:14):

it looks like you're using an old version of sushi as config.yaml is deprecated for sushi-config.yaml.

view this post on Zulip David Pyke (Jan 14 2022 at 17:15):

(you also may want to move to us core 4.0)

view this post on Zulip Nathan Davis (Jan 14 2022 at 17:17):

Sorry, my config file is sushi-config.yaml. I abbreviated it. Also, I'm migrating an older IG to FSH and need to make a snapshot of a version based on USCore 3.1.1 before I can move to 4.0

view this post on Zulip Jean Duteau (Jan 14 2022 at 18:40):

Hmm, not sure why you're getting that. We'll need @Chris Moesel. With the following barebones, I get no errors:

Profile: AverageBloodPressure
Parent: http://hl7.org/fhir/StructureDefinition/vitalsigns
Id: average-blood-pressure
Title: "Average Blood Pressure"

Instance: AverageBloodPressure-example
InstanceOf: average-blood-pressure
Description: "Average Blood Pressure example"
Usage: #example
* status = #final
* code = http://loinc.org#39156-5
* subject = Reference(BPPatient)
* effectiveDateTime = "2021-10-01T12:45:03-05:00"

Instance: BPPatient
InstanceOf: Patient

view this post on Zulip Chris Moesel (Jan 14 2022 at 18:45):

Right. I would only expect that warning to occur if you are creating a standalone instance of a complex datatype like Address or HumanName. Since vitalsigns is a profile on Observation, you shouldn't be seeing that warning. The only thing I can think of is that this would happen if you redefined VitalSigns somewhere else to be a profile of something else.

view this post on Zulip Chris Moesel (Jan 14 2022 at 18:45):

Is there somewhere I can reproduce this?

view this post on Zulip John Moehrke (Jan 14 2022 at 21:17):

I suspect a typo in your FSH files. Can you share the github so we can help?

view this post on Zulip John Moehrke (Jan 14 2022 at 21:20):

I have an IG that does alot of profiling on us-core and on vital-signs. it is not throwing any warnings like that.

view this post on Zulip Nathan Davis (Jan 14 2022 at 22:29):

The repo is here. https://github.com/nrdavis1/vitals_fsh It's temporary and still under construction.

view this post on Zulip Jose Costa Teixeira (Jan 16 2022 at 22:57):

@Nathan Davis this repo is empty

view this post on Zulip Nathan Davis (Jan 18 2022 at 02:05):

Sorry, I though I had committed/pushed prior to the weekend. The content is now there

view this post on Zulip Jean Duteau (Jan 18 2022 at 04:31):

Your profiles all declare them to be complex types:

  • ^kind = #complex-type

BTW, you don't really need any of these:

* ^version = "0.2.0"
* ^status = #draft
* ^date = "2019-05-29"
* ^publisher = "Logica Health"
* ^jurisdiction = urn:iso:std:iso:3166#US
* ^kind = #complex-type
* . ^short = "Average Blood Pressure"
* . ^definition = "The average of a set of blood pressure measurements. The number of measurements and time period in which they are taken are determined by the institution or protocol."

SUSHI and the Publisher will set all of those correctly for you.

view this post on Zulip Nathan Davis (Jan 18 2022 at 13:57):

All of those lines were generated when I ran GoFSH from the current IG.
Do I need to use a different kind than "complex"?

view this post on Zulip Jean Duteau (Jan 18 2022 at 14:34):

I would remove all of those lines. As I said SUSHI and the publisher will set those correctly.

view this post on Zulip Chris Moesel (Jan 18 2022 at 14:38):

GoFSH is doing its best to reflect what was in the source input, even if it was wrong (at least in some cases). Setting ^kind to #complex-type clearly seems wrong, but my guess is that this is how it was in the source profile you fed GoFSH. That said, @Jean Duteau is correct that you should remove it. As for the other caret values (version, status, date, publisher, jurisdiction), if you remove those, then I think SUSHI (or IG Publisher, I forget which) will use your project values as the default (as @Jean Duteau also suggested).

view this post on Zulip Elliot Silver (Jan 18 2022 at 16:03):

Chris Moesel said:

As for the other caret values (version, status, date, publisher, jurisdiction), if you remove those, then I think SUSHI (or IG Publisher, I forget which) will use your project values as the default (as Jean Duteau also suggested).

Unless your project sets apply-version, apply-publisher, apply-jurisdiction flags to false.

view this post on Zulip Nathan Davis (Jan 18 2022 at 23:49):

Thank you all! This helped a ton. Not quite out of the woods with errors but at least this one is solved.

view this post on Zulip Nathan Davis (Jan 19 2022 at 00:02):

Now I'm seeing a new error that is quite cryptic.

Publishing Content Failed: -1                                                    (05:49.0340)
                                                                                 (05:49.0342)
Use -? to get command line help                                                  (05:49.0344)
                                                                                 (05:49.0346)
Stack Dump (for debugging):                                                      (05:49.0347)
java.lang.ArrayIndexOutOfBoundsException: -1
        at org.hl7.fhir.igtools.renderers.ValidationPresenter.determineCode(ValidationPresenter.java:304)
        at org.hl7.fhir.igtools.renderers.ValidationPresenter.<init>(ValidationPresenter.java:291)
        at org.hl7.fhir.igtools.publisher.Publisher.createIg(Publisher.java:961)
        at org.hl7.fhir.igtools.publisher.Publisher.execute(Publisher.java:794)
        at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:8942)

I have no idea about this one. Should I start a new topic stream for it? All changes pushed to the repo.

view this post on Zulip David Pyke (Jan 19 2022 at 00:30):

That's a publisher error, that's good for #IG creation

view this post on Zulip Nathan Davis (Jan 19 2022 at 00:48):

Thanks. I'll put it there.

view this post on Zulip Chris Moesel (Jan 19 2022 at 14:38):

For anyone reading along (and wanting to know the answer), this was resolved in IG creation here.


Last updated: Apr 12 2022 at 19:14 UTC