FHIR Chat · example of a panel · shorthand

Stream: shorthand

Topic: example of a panel


view this post on Zulip Nathan Davis (Dec 07 2021 at 01:48):

I'm trying to create an example of a panel and keep getting the error element SARScoronavirus2AbIgGAcncPtSerPlasQnIALabObsExample matches more than one slice I get this error for each hasMember slice. What am I doing wrong?
Here's the panel in FSH:

Profile:  SARScoronavirus2AbIgGandIgMpanelPtSerPlasQnIALabObs
Parent:   LaboratoryObservationPanelBase
Title: "SARS-CoV-2 (COVID19) IgG and IgM panel - Serum or Plasma by Immunoassay"
Description: "SARScoronavirus2AbIgGandIgMpanelPtSerPlasQnIALabObs is a collection of quantitative tests for SARS-CoV-2 (COVID19) antibodies, IgG and IgM. LOINC code 94504-8."
* code = LNC#94504-8
* value[x] 0..0
* hasMember contains
    SARScoronavirus2AbIgGAcncPtSerPlasQnIALabObs 0..1 and
    SARScoronavirus2AbIgGPrThrPtSerPlasOrdIALabObs 0..1

And here's the example:

Instance: SARScoronavirus2AbIgGandIgMpanelPtSerPlasQnIALabObsExample
InstanceOf: SARScoronavirus2AbIgGandIgMpanelPtSerPlasQnIALabObs
Description: "An example of the SARS-CoV-2 (COVID-19) Ab panel - Serum or Plasma by Immunoassay test."
Usage: #example
* status = #final
* category = ObsCat#laboratory
* code = LNC#94504-8 "SARS-CoV-2 (COVID-19) Ab panel - Serum or Plasma by Immunoassay"
* subject = Reference(patient-anyperson-mary)
* effectiveDateTime = "2021-09-21"
* hasMember[0] = Reference(SARScoronavirus2AbIgGAcncPtSerPlasQnIALabObsExample)
* hasMember[1] = Reference(SARScoronavirus2AbIgGPrThrPtSerPlasOrdIALabObsExample)

view this post on Zulip Chris Moesel (Dec 07 2021 at 13:23):

Are you constraining those slices? This line just defines what the slice names and cardinalities are:

* hasMember contains
    SARScoronavirus2AbIgGAcncPtSerPlasQnIALabObs 0..1 and
    SARScoronavirus2AbIgGPrThrPtSerPlasOrdIALabObs 0..1

After that, you need to actually constrain each one so it is unique according to the discriminator. In this case, I am assuming that the slicing metadata is defined in the parent and slices hasMember using the #profile type and $this.resolve() path. If that's the case, then after the contains statement, you need:

* hasMember[SARScoronavirus2AbIgGAcncPtSerPlasQnIALabObs] only SARScoronavirus2AbIgGAcncPtSerPlasQnIALabObs
* hasMember[SARScoronavirus2AbIgGPrThrPtSerPlasOrdIALabObs] only SARScoronavirus2AbIgGPrThrPtSerPlasOrdIALabObs

view this post on Zulip Chris Moesel (Dec 07 2021 at 13:25):

BTW -- it's up to you, but the slice names don't have to match the profile names. So you could use shorter slice names if you wish.


Last updated: Apr 12 2022 at 19:14 UTC