FHIR Chat · CodeSystem and ValueSets · IG creation

Stream: IG creation

Topic: CodeSystem and ValueSets


view this post on Zulip Patrick Werner (Aug 20 2019 at 20:03):

1. If you create a CS/VS in the profiling spreadsheet the created CS/VS resources don't include the publisher element. Which then throws an error during the validation of the IG during the IG build process. Is this a known problem or did we something wrong?
2. Defining CS/VS as code lists in the IG works fine when you use it to bind to a value. If you are using patterns, therefore not include the code list in the Binding sheet the validator fails as the CS/VS isn't created.
The only workaround is to create these CS/VS manually, right?

view this post on Zulip Grahame Grieve (Aug 20 2019 at 21:06):

#1 - you put the publisher on the metadata tab?
#2 - what do you mean 'if you are using patterns'?

view this post on Zulip Lloyd McKenzie (Aug 20 2019 at 21:07):

In general we're nudging people away from spreadsheet definition of vocabulary, but it should still work.

view this post on Zulip Kevin Power (Aug 20 2019 at 22:34):

#1 - what field in the metadata tab would be used to populate the Publisher element?
#2 - we use the 'Pattern' column of the spreadsheets to indicate what should be used - in this case, we have a pattern defined for Observation.code like this:
{"coding":[{"system":"http://hl7.org/fhir/uv/genomics-reporting/CodeSystem/TBD-codes","code":"grouper"}]}

view this post on Zulip Kevin Power (Aug 20 2019 at 22:37):

I will add this made me re-read the FHIR Spreadsheet Authoring page again: https://wiki.hl7.org/index.php?title=FHIR_Spreadsheet_Authoring#Structure_Tab
I happen to notice that Pattern says this: "Pattern: This specifies a set of elements and values that must be present in the instance. It should only be present for complex data types and is expressed as XML. Additional elements and values not specified in the pattern are still permitted."

I noticed that says 'expressed as XML' and we express it in JSON.

view this post on Zulip Patrick Werner (Aug 21 2019 at 10:14):

In general we're nudging people away from spreadsheet definition of vocabulary, but it should still work.

re-did this, using CodeSystem and ValueSets defined in XML

view this post on Zulip Patrick Werner (Aug 21 2019 at 10:21):

still getting:
Unknown Code System http://hl7.org/fhir/uv/genomics-reporting/CodeSystem/TBD-codes

view this post on Zulip Patrick Werner (Aug 21 2019 at 10:37):

oh! obviously i have to include the vocab resources as resources into the ImplementationGuide.xml

view this post on Zulip Patrick Werner (Aug 21 2019 at 10:39):

If you do a ValueSet in xml -> add a binding in the spreadsheet, the VS is added automatically during the build process.

view this post on Zulip Patrick Werner (Aug 21 2019 at 10:40):

as this isn't a binding but a fixed value expressed through a pattern you need to add the Vocab Resources to the IG manually

view this post on Zulip Patrick Werner (Aug 21 2019 at 10:41):

Only weird thing: i had to set an ID on the ValueSet Resource, otherwise the build fails:

 Error doing replacements - no id defined in resource: ValueSet/null
     [java]     at org.hl7.fhir.igtools.publisher.IGKnowledgeProvider.doReplacements(IGKnowledgeProvider.

view this post on Zulip Grahame Grieve (Aug 21 2019 at 14:38):

a fixed or pattern value won't prompt the loading of the vs/cs from the spreadsheet; only a binding will do that


Last updated: Apr 12 2022 at 19:14 UTC