Stream: shorthand
Topic: slicing datatypes
Catherine Hosage Norman (Mar 24 2022 at 03:31):
I do not get a Sushi error on this
Profile: DrugProductIngredient
Parent: Ingredient
Id: pqcmc-ingredient
Title: "Drug Product Ingredient"
Description: "The amount detais about the drug product ingredients in the batch. Use for Batch Formula."
- ^url = "https://hl7.org/fhir/pq-cmc/StructureDefinition/prf-pqcmc-ingredient"
- .extension contains pq-additional-info-extension named additional-info 0..1 MS
- .extension[additional-info] ^short = "Drug Product Ingredient Additional Information"
- substance.code.reference 1..1 MS
- substance.code.reference ^short = "Ingredient Substance"
- substance.code.reference only Reference(pqcmc-routine-drug-substance)
- substance.strength.extension contains pq-quantity-percent-extension named quantity-percent 1..1 MS
- substance.strength.extension[quantity-percent] ^short = "Quantity Percent"
- substance.strength.extension contains pq-overage-extension named overage 0..1 MS
- substance.strength.extension[overage] ^short = "Overage"
- substance.strength.concentration[x] 1..1 MS
- substance.strength.concentration[x] only Quantity
- substance.strength.concentrationQuantity ^short = "Component Quanty Per Batch"
- substance.strength.concentrationText 1..1 MS
- substance.strength.concentrationText ^short = "Strength Textual"
- substance.strength.concentrationText ^definition = """A written description of the strength of the ingredient.[Source: SME Defined]
Note: This is typically applicable to biologics
Example: International Units for Enzymes
"""
I get this from the build tool:
Caused by: org.hl7.fhir.exceptions.FHIRException: Invalid slicing: there is more than one type slice at Ingredient.substance.strength.concentrationQuantity, but one of them (concentrationQuantity) has min = 1, so the other slices cannot exist
However, that is exactly what I want. I want only Quantity. Don't want them to use ratio, explicitly, or codeable concept. I have tried explicitly setting the other to 0..0. What is the syntax for this?
Jean Duteau (Mar 24 2022 at 05:44):
The problem is the name of the second attribute 'concentrationText'. The publisher is confusing that as a slice on 'concentration[x]'. @Rik Smithies I think this has been raised as an issue before and it's the same with presentation[x] and presentationText.
Rik Smithies (Mar 24 2022 at 07:34):
@Jean Duteau I assume this is a bug in the publisher process rather than a problem with the model? I can see that the two attributes e.g. presentationText and presentation[x] could be confused, but 'text' is not a datatype, so I'm not sure why this is happening.
Lloyd McKenzie (Mar 24 2022 at 16:54):
You're not allowed to have a presentation[x] element and any other element that starts with 'presentation'
Lloyd McKenzie (Mar 24 2022 at 16:58):
Whether 'text' is a data type or not doesn't matter. (Kindling should actually be treating this as an error in the resource design - I've raised https://github.com/HL7/kindling/issues/68)
Brian Alper (Mar 24 2022 at 18:04):
@Lloyd McKenzie We just made a FHIR tracker today for EvidenceVariable (https://jira.hl7.org/browse/FHIR-36635) to simplify implementation by having definition[x], definitionTypeAndValue, and definitionCombination to help clarify there is 1 and only 1 approach to definition, though two of the options are not datatypes. Can/should we modify this to definition[x], defByTypeAndValue, and defByCombination? Or is this break another rule by using def instead of definition in the element name?
Brian Alper (Mar 24 2022 at 18:12):
@Lloyd McKenzie Should we consider a TypeAndValue datatype and Combination Datatype? Then it can all fit in definition[x].
Lloyd McKenzie (Mar 24 2022 at 19:29):
Definitely don't want a type & value data type. (We don't generally like name-value pairs because they're just extension by another mechanism.) There's no issue with using 'def' if that's the best solution you can come up with.
Rik Smithies (Apr 05 2022 at 15:49):
@Jean Duteau if this is breaking profiles we could rename these from concentrationText and presentationText to textConcentration and textPresentation
Jean Duteau (Apr 05 2022 at 16:04):
yeah, it will be a problem in profiles, but more importantly, I think it's a rule in FHIR (as Lloyd noted above) that you can't have a choice attribute and another attribute named the same.
Last updated: Apr 12 2022 at 19:14 UTC