FHIR Chat · Build errors slicing CodeableConcept.coding · IG creation

Stream: IG creation

Topic: Build errors slicing CodeableConcept.coding


view this post on Zulip Corey Spears (Nov 07 2021 at 16:31):

I have an IG where we are looking to require 2 codes be provided from the same CodeSystem on a CodeableConcept element with a base cardinality of 1..1. We want to require the granular code (in or use case it is an RxNorm code that includes ingredient, strength, and form) and a less granular code (RxNorm ingredient and form) in order to allow for searching across strengths.
The way I am trying to address this is to slice the CodeableConcept with a pattern match on code with each slice bound to a different ValueSet. Both of these use the RxNorm codeSystem, but have different non-overlapping properties.

I am getting a build error: Slicing cannot be evaluated: Could not match discriminator ([code]) for slice MedicationKnowledge.code.coding:semantic-drug-form-group in profile http://hl7.org/fhir/us/davinci-drug-formulary/StructureDefinition/usdf-FormularyDrug - the discriminator [code] does not have fixed value, binding or existence assertions

What am I doing wrong here?

Profile: http://build.fhir.org/ig/HL7/davinci-pdex-formulary/StructureDefinition-usdf-FormularyDrug.html
Granular VS: http://build.fhir.org/ig/HL7/davinci-pdex-formulary/ValueSet-SemanticDrugVS.html
General VS: http://build.fhir.org/ig/HL7/davinci-pdex-formulary/ValueSet-SemanticDrugFormGroupVS.html
QA report: http://build.fhir.org/ig/HL7/davinci-pdex-formulary/branches/master/MedicationKnowledge-FormularyDrug-1541228.html

view this post on Zulip Richard Townley-O'Neill (Nov 08 2021 at 07:32):

I do not know if these are the cause of your problem, but
1/ System and code are optional in both slices, so an instance with neither will satisfy both slices.
2/ In the slice semantic-drug you bind the coding.code and in the other slice you bind the coding. That looks strange.

view this post on Zulip Corey Spears (Nov 08 2021 at 18:59):

Thanks @Richard Townley-O'Neill, That got me part of the way there.
It looks like my issue now is not with slicing, but with a valueSet binding on RxNorm with property TTY. I have been working with Lloyd on this and he said this might be an issue to raise with Grahame.

@Grahame Grieve, have you seen this problem?
I have a simple binding of MedicationKnowledge.code (CodeableConcept) to a ValueSet with RxNorm code with a matching property requirement. The ValueSet expeansion has the code "753532" in it, but when I include it in the example it fails validation stating None of the codings provided are in the value set http://hl7.org/fhir/us/davinci-drug-formulary/ValueSet/SemanticDrugVS (http://hl7.org/fhir/us/davinci-drug-formulary/ValueSet/SemanticDrugVS), and a coding from this value set is required) (codes = http://www.nlm.nih.gov/research/umls/rxnorm#753532)

QA error here: http://build.fhir.org/ig/HL7/davinci-pdex-formulary/branches/master/qa.html#_scratch_ig-build-temp-6ONJIC_repo_fsh-generated_resources_MedicationKnowledge-FormularyDrug-1541228

view this post on Zulip Grahame Grieve (Nov 09 2021 at 05:17):

the answer is that you've referred directly to a vsac value set, and the server doesn't have access to that vsac value set definition. And it's part of the generally 'vsac is broken' problem that's on my todo list, but it's a big problem

view this post on Zulip Corey Spears (Nov 09 2021 at 06:54):

Unfortunately that is not the case. I had removed use of that ValueSet before starting to work on this. I see the vsac dependency was still listed. It is now removed. Still not able to determine that it is in the VS.

view this post on Zulip Grahame Grieve (Nov 09 2021 at 06:55):

where's the value set defined?

view this post on Zulip Corey Spears (Nov 09 2021 at 14:37):

I went ahead and simplified the examples and binding in order to remove other possible variables. It now has a regular (non-sliced) binding, and I only include 1 example.
VS Definition: http://build.fhir.org/ig/HL7/davinci-pdex-formulary/ValueSet-SemanticDrugVS.html
Example: https://build.fhir.org/ig/HL7/davinci-pdex-formulary/MedicationKnowledge-FormularyDrug-993804.json.html

view this post on Zulip Grahame Grieve (Nov 10 2021 at 00:47):

bug in the server - will be fixed by this time tomorrow

view this post on Zulip Corey Spears (Nov 10 2021 at 02:58):

Sorry we did not find this earlier. It just was identified as a requirement on Friday.


Last updated: Apr 12 2022 at 19:14 UTC