FHIR Chat · My slices aren't working on AuditEvent · shorthand

Stream: shorthand

Topic: My slices aren't working on AuditEvent


view this post on Zulip Keith Boone (Feb 25 2020 at 08:32):

I'm trying to create slices on agent in audit event, where the slices are on the values of role and requestor.

First I set up the discriminators thus:

  • agent ^slicing.discriminator[0].type = #pattern
  • agent ^slicing.discriminator[0].path = "role"
  • agent ^slicing.discriminator[1].type = #pattern
  • agent ^slicing.discriminator[1].path = "requestor"
  • agent ^slicing.description = "Slicing is based on role and requestor."
  • agent ^slicing.ordered = false
  • agent ^slicing.rules = #open

Then I declare use of three slices in the profile:

  • agent contains Source 1..1 and HumanRequestor 0..* and Destination 1..1

Then I describe constraints on each slice inline, including on the discriminator fields:

The produced StructureDefinition doesn't include discriminators for agent at all.

view this post on Zulip Chris Moesel (Feb 25 2020 at 13:36):

Hi @Keith Boone. That's odd. We'll take a look.

view this post on Zulip Chris Moesel (Feb 25 2020 at 13:39):

Logged here: https://github.com/FHIR/sushi/issues/254

view this post on Zulip Nick Freiter (Feb 25 2020 at 14:19):

@Keith Boone do you have the full FSH file? I tried to replicate this by just copying and pasting those rules:

Profile: MyAuditEvent
Parent: AuditEvent
* agent ^slicing.discriminator[0].type = #pattern
* agent ^slicing.discriminator[0].path = "role"
* agent ^slicing.discriminator[1].type = #pattern
* agent ^slicing.discriminator[1].path = "requestor"
* agent ^slicing.description = "Slicing is based on role and requestor."
* agent ^slicing.ordered = false
* agent ^slicing.rules = #open
* agent contains Source 1..1 and HumanRequestor 0..* and Destination 1..1
* agent[Source].role = http://dicom.nema.org/resources/ontology/DCM#110153 "Source"
* agent[Source].requestor = false
* agent[Source].altId 1..1
* agent[Source].name 1..1
* agent[HumanRequestor].requestor = true
* agent[HumanRequestor].role 0..*
* agent[HumanRequestor].altId 1..1
* agent[HumanRequestor].name 1..1
* agent[Destination].role = http://dicom.nema.org/resources/ontology/DCM#110152 "Destination"
* agent[Destination].requestor = false
* agent[Destination].altId 1..1
* agent[Destination].name 1..1

And this did produce output with discriminators on the AuditEvent.agent element. So there may be a cause outside these rules alone.


Last updated: Apr 12 2022 at 19:14 UTC