FHIR Chat · Are codeableconcepts limited to one value set in the case of · IG creation

Stream: IG creation

Topic: Are codeableconcepts limited to one value set in the case of


view this post on Zulip Catherine Hosage Norman (Apr 03 2022 at 20:42):

What is the proper technique to handle attaching multiple code list to many condable concepts? In rearchStudy the condition element is 0..*. I needed to add 3 types of conditions. Each has a different code list. First I tried repeating the condition.coding and assigning the different value sets. Result - last value set was assigned.

Next I tried slicing even thought there was no [x]. This did not work.

  • condition.coding MS
  • condition.coding ^slicing.discriminator.type = #value
  • condition.coding ^slicing.discriminator.path = "code.condition.coding.display"
  • condition.coding ^slicing.rules = #closed
  • condition.coding contains
    substudytype 1..1 and
    storage 1..1 and
    orientation 0..1

  • condition.coding[substudytype] ^short = "Sub-Study Type"

  • condition.coding[substudytype].code from PqcmcStudyTypeTerminology
  • condition.coding[substudytype].code.display = "Sub-Study Type" (exactly)

  • condition.coding[storage] ^short = "Storage Conditions Temp.RH"

  • condition.coding[storage].code from PqcmcStorageConditionsTerminology
  • condition.coding[storage].code.display = "Storage Conditions" (exactly)

  • condition.coding[orientation] ^short = "Container Orientation"

  • condition.coding[orientation].code from PqcmcContainerOrientationTerminology
  • condition.coding[orientation].code.display = "Orientation" (exactly)

Having a hard fast deadline I wrote and extension:

Extension: ConditionsExtension
Id: pq-condtions-extension
Title: "SubStudy Conditions"
Description: """Three values lists for substudy characterizaiton"""

  • extension MS
  • extension contains
    substudytype 0..1 and
    storage 0..1 and
    orientation 0..1

  • extension[substudytype].value[x] only CodeableConcept

  • extension[substudytype].value[x] ^short = "Sub-Study Type"
  • extension[substudytype].value[x] ^definition = """A categorization of studies that identifies whether there are single or multiple phases of the study sometimes simulating the periods of use. [Source: SME Defined]
    Examples: Standard, Cycled-simple.
    """

  • extension[substudytype].value[x] from PqcmcStudyTypeTerminology

  • extension[storage].value[x] only CodeableConcept
  • extension[storage].value[x] ^short = "Storage Conditions Temp.RH"
  • extension[storage].value[x] ^definition = "The temperature and the relative humidity under which the study was performed. [Source: SME Defined]"
  • extension[storage].value[x] from PqcmcStorageConditionsTerminology
  • extension[orientation].value[x] only CodeableConcept
  • extension[orientation].value[x] ^short = "Container Orientation"
  • extension[orientation].value[x] ^definition = """The placement of a container during storage to understand the interactions between the product and the closure. [Source: SME Defined]
    Examples: horizontal, upright.
    """

  • extension[orientation].value[x] from PqcmcContainerOrientationTerminology

view this post on Zulip Lloyd McKenzie (Apr 03 2022 at 21:21):

First, you should never slice by 'display'. Display is not computable. Second, when slicing, the path is relative to where you are. So if you're already at Condition.code, you'll be slicing on "coding". The slicing will be done by 'value' and you'll declare a 'required' value set on each slice

view this post on Zulip Chris Moesel (Apr 04 2022 at 13:09):

In this case, I think @Catherine Hosage Norman said she is working with ResearchStudy.condition, which is 0..* -- so that's what she actually wants to slice. So as Lloyd noted, you'd want to slice by value and apply required value set bindings to each slice (assuming the value sets are non-overlapping) -- but you want to slice on $this, since it's the condition array itself that you are slicing.

It should look something like this:

* condition ^slicing.discriminator.type = #value
* condition ^slicing.discriminator.path = "$this"
* condition ^slicing.rules = #open // or #closed if you don't want other concepts
* condition contains
    substudytype 1..1 and
    storage 1..1 and
    orientation 0..1
* condition[substudytype] ^short = "Sub-Study Type"
* condition[substudytype] from PqcmcStudyTypeTerminology
* condition[storage] ^short = "Storage Conditions Temp.RH"
* condition[storage] from PqcmcStorageConditionsTerminology
* condition[orientation] ^short = "Container Orientation"
* condition[orientation] from PqcmcContainerOrientationTerminology

See it on FSH Online

view this post on Zulip Catherine Hosage Norman (Apr 05 2022 at 00:28):

That worked great. Thanks. Ther is no example on FHS school play with fsh. Maybe you can put this there,


Last updated: Apr 12 2022 at 19:14 UTC