Stream: dotnet
Topic: Creating slices
Lisa Andersen (Apr 19 2021 at 10:29):
Hello,
I am quite new at this and probably overseeing something. I posted in the Google Groups Forum, however I do not know how active it is. https://groups.google.com/g/fhir-dotnet/c/ACx7R27xw8A
I would like to slice the note element in Observation, however I cannot find any examples on how to slice with .NET SDK.
Any help is greatly appreciated.
Michele Mottini (Apr 20 2021 at 12:51):
To slice you need to use an element as the discriminator, but Annotation does not really have anything suitable for that: it has author[x], time and text - none of those can hold a SNOMED code (or anything else really) that can be used to slice
Lisa Andersen (Apr 21 2021 at 06:30):
Thank you @Michele Mottini. We were not sure if it was possible to use the code all elements have to define their meaning as a discriminator. We will most likely be slicing Observation.component element instead and the using component.code as the discriminator. Would you be able to help us with an example?
Michele Mottini (Apr 21 2021 at 13:02):
Something like this then:
var obs = new Observation
{
Component = new List<Observation.ComponentComponent>
{
new Observation.ComponentComponent
{
Code = new CodeableConcept( "http://snomed.info/sct", "<the code>", "<the code text>" ),
Value = new FhirString("Note regarding patient's symptom")
}
}
};
Lisa Andersen (Apr 22 2021 at 10:25):
Thank you. It might be me that is missing something obvious, but the example looks like it creates several instances of Observation.ComponentComponent and not slicing. We want to assign a specific code to each slice to represent different dataelements, where the code is a fixed value derived from the profile we have made.
Michele Mottini (Apr 22 2021 at 13:16):
That is slicing - use items in a list in some pre-defined way, but the FHIR structure is still the same list and you add elements to it as normal
Lisa Andersen (Apr 23 2021 at 04:55):
Okay, thank you very much!
Joe Mundi (May 17 2021 at 20:41):
(deleted)
Last updated: Apr 12 2022 at 19:14 UTC