Stream: IG creation
Topic: fixed
David Hay (Jul 13 2020 at 00:36):
I'm getting this error:
Unsupported fixed pattern type for discriminator(system) for slice Location.identifier:HpifacId: org.hl7.fhir.r5.model.UriType
Here's a snippet from the SD: (I've tried both pattern and value discriminators)
{
"id": "Location.identifier",
"path": "Location.identifier",
"slicing": {
"discriminator": [
{
"type": "value",
"path": "use"
},
{
"type": "value",
"path": "system"
}
],
"rules": "openAtEnd"
}
},
{
"id": "Location.identifier:HpifacId",
"path": "Location.identifier",
"sliceName": "HpifacId",
"short": "The current Facility id for this location",
"min": 0,
"max": "1",
"mustSupport": true
},
{
"id": "Location.identifier:HpifacId.use",
"path": "Location.identifier.use",
"min": 1,
"fixedCode": "official"
},
{
"id": "Location.identifier:HpifacId.system",
"path": "Location.identifier.system",
"min": 1,
"patternUri": "https://standards.digital.health.nz/ns/hpi-facility-id"
},
{
David Hay (Jul 13 2020 at 00:39):
FWIW: Here's the FSH I used: (and tried with and without the (exactly) keyword
* identifier ^slicing.discriminator.type = #value
* identifier ^slicing.discriminator.path = "use"
* identifier ^slicing.discriminator[1].type = #value
* identifier ^slicing.discriminator[1].path = "system"
* identifier ^slicing.rules = #openAtEnd
* identifier contains
HpifacId 0..1 MS and
dormantHpiFacId 0..* MS and
MOHFacId 0..1 MS
* identifier[HpifacId].system = "https://standards.digital.health.nz/ns/hpi-facility-id"
* identifier[HpifacId].use = #official (exactly)
* identifier[HpifacId] ^short = "The current Facility id for this location"
Grahame Grieve (Jul 13 2020 at 00:44):
it's unusual to have a pattern value for a primitive
Grahame Grieve (Jul 13 2020 at 00:53):
but, sure, I'll add support for it in the next release
David Hay (Jul 13 2020 at 01:04):
Is that not value?
David Hay (Jul 13 2020 at 01:05):
ie where's the pattern coming from?
Grahame Grieve (Jul 13 2020 at 01:09):
the profile, presumably
David Hay (Jul 13 2020 at 01:19):
I did set the discriminator type to 'value' - not 'pattern' - (see snippet above) so a bit confused TBH. Never mind, as long as it's not a show stopper error...
Keith Boone (Jul 16 2020 at 00:11):
Did you try: * identifier[HpifacId].system = "https://standards.digital.health.nz/ns/hpi-facility-id" (exactly)
David Hay (Jul 16 2020 at 19:06):
pretty sure I did - but will confirm...
David Hay (Jul 16 2020 at 19:19):
Actually - that fixed it! Thanks @Keith Boone It actually needed (exactly) on both system and use:
* identifier[HpifacId].system = "https://standards.digital.health.nz/ns/hpi-facility-id" (exactly)
* identifier[HpifacId].use = #official (exactly)
* identifier[HpifacId] ^short = "The current Facility id for this location"
Chris Moesel (Jul 16 2020 at 20:11):
Grahame Grieve said:
it's unusual to have a pattern value for a primitive
Actually, I think @Lloyd McKenzie convinced me this was the best approach, otherwise you are denying implementors the opportunity to apply an extension
or id
to the primitive value.
Grahame Grieve (Jul 16 2020 at 23:59):
I think that you generally do want to do that
Grahame Grieve (Jul 16 2020 at 23:59):
but not always, I agree
Keith Boone (Jul 17 2020 at 12:13):
Good to hear. I was having a VERY similar problem, and thanks to you, was able to track it back to the fixed/pattern discussions eslewhere, so in a way, you helped me too!
Last updated: Apr 12 2022 at 19:14 UTC