Stream: implementers
Topic: FHIR Forge STU3 Profiling- Slicing between entry resources
Filipe Castro (Mar 18 2019 at 10:34):
Hello all,
Does anyone ca help with slicing between entry resources?
I've create on message bundle structure definition profile which have 4 entries. I've created slices but i don't know wath to put on discriminator of element sliced. i already try to put 'Profile' on Type field and 'resolve()' but returns incompatibility error for engine 'resolve()'.
Thanks on advance.
Lloyd McKenzie (Mar 18 2019 at 15:08):
Slicing by profile is tricky and isn't widely supported. Can you slice by entry.code instead? That's more typical.
Filipe Castro (Mar 18 2019 at 15:48):
Thanks for your help.
Humm, I'm not using 'code' in entries.
This is my profile:
MessageBundle.StructureDefinition.xml
This is my message to validate:
FHIR_MESSAGE_IN
This is my validation result:
MESSAGE_VALIDATION_RESULT
As you can see, the MessageHeader resource replicates his validation for all entries, maybe because is the only resource on my Bundle profile.
René Spronk (Mar 18 2019 at 16:19):
Well, you could define a profile for MessageHeader to have a 1..1 focus (Parameters, you could create a separate profile for Parameters and reference that instead of the core Parameters resource), a 1..1 sender and a 1..1 receiver. Only messages that have (at least) 4 resources will validate that profile. No need for slicing that way.
Filipe Castro (Mar 18 2019 at 16:29):
René thanks for your help. I already have this configuration on MessageHeader profile. The problem probably is because I have MessageHeader profile enforced on MessageBundle profile.
Grahame Grieve (Mar 18 2019 at 19:31):
not sure why that means you need to slice by profile.
Lloyd McKenzie (Mar 18 2019 at 20:00):
Sorry, I meant Composition.section.code. If you've got multiple entries in a single section, you could slice entry by resolve().code or even just slice by type on resolve().
Filipe Castro (Mar 19 2019 at 10:25):
@Lloyd McKenzie you mean change Bundle Resource for Composition ?
Filipe Castro (Mar 19 2019 at 10:37):
@Grahame Grieve thanks for you help. I only want to create one profile, thant enforce all the structure definitions of resources , to validate the fhir message in attatchment('FHIR_MESSAGE_IN'). At moment, I've tried slicing with discriminator configured on many ways, but always return that is an invalid discriminator, or unable to resolve discriminator.
Lloyd McKenzie (Mar 19 2019 at 15:17):
I was referring to slicing the Composition.section.entry, not the Bundle
Last updated: Apr 12 2022 at 19:14 UTC