FHIR Chat · Having trouble binding a parameter to a valueset · shorthand

Stream: shorthand

Topic: Having trouble binding a parameter to a valueset


view this post on Zulip Matt Jenks (Oct 19 2021 at 00:17):

Hi. I'm trying to use fsh to define a simple operation where a parameter is bound to a valueset. I don't understand how to set the BindingBackbone to a valueset that I have created and make the strength required. I am receiving the error "Sushi: error Cannot find definition for Instance: SCTConditionVS. Skipping rule."

Here's my fsh that I am trying to create ...

Alias: $SCT = http://snomed.info/sct

ValueSet: SCTConditionVS
Id: sct-conditions
Title: "SNOMED Conditions"
Description: "The list of possible condition codes from SNOMED"

  • $SCT#44054006 "Diabetes mellitus type 2 (disorder)"

Instance: GuidanceResponse-Evaluate
InstanceOf: OperationDefinition
Description: "Retrieve all recommendations for a patient"
Usage: #definition

  • name = "Find_NBAs_patient"
  • title = "Obtain the recommendations for a patient"
  • status = #draft
  • kind = #operation
  • code = #evaluate
  • system = false
  • type = true
  • instance = false
  • resource[0] = #GuidanceResponse

// Parameter: Condition Code

  • parameter[+].name = #condition_code
  • parameter[=].use = #in
  • parameter[=].min = 0
  • parameter[=].max = "1"
  • parameter[=].documentation = "The condition code to look for guidance on"
  • parameter[=].type = #code
  • parameter[=].binding.strength = #required
  • parameter[=].binding.valueSet = SCTConditionVS

Any guidance would be appreciated in setting the binding. Thanks.

view this post on Zulip Chris Moesel (Oct 19 2021 at 12:06):

Hi @Matt Jenks. OperationDefinition.parameter.binding.valueSet is a canonical type. As such, you need to use the Canonical(...) operator in FSH like so:

* parameter[=].binding.valueSet = Canonical(SCTConditionVS)

This signals that you're not putting the whole value set inline, but rather just its canonical URL.


Last updated: Apr 12 2022 at 19:14 UTC