Stream: shorthand
Topic: ModiferExtension
Nathan Davis (Apr 16 2020 at 15:17):
I need to create a couple of modifier extensions. When I try to use the ModifierExtension key word FSH doesn't recognize it. Has support for this been implemented? If so, what am I doing wrong?
Jean Duteau (Apr 16 2020 at 15:27):
there is no ModifierExtension. modifier extensions are just regular extensions that are declared in the modifierExtension array. So:
- modifierExtension contains text 1..1 MS
- modifierExtension[text].value[x] only string
Chris Moesel (Apr 16 2020 at 15:37):
@Jean Duteau is correct -- "modifier extensions" are defined in the modifierExtension
element where they are used, and that should be enough. That said, the FHIR documentation on Use of ElementDefinition in Extension Definitions also indicates that you can set the isModifier
flag on the root element of an Extension definition. So you could also do this to indicate that the extension is always a modifier:
Extension: MyModifierExtension // ... other metadata * . ^isModifier = true
I haven't personally seen this approach used, but as noted above, the spec seems to imply it can be used this way. That said, when you actually use the extension in a profile, you still must use it in the modifierExtension
element of the profile (or element).
Jean Duteau (Aug 18 2020 at 18:58):
Okay, resurrecting this thread because I'm now trying to use an extension in a modifierExtension array and I'm getting publisher arrays because the extension isn't defined as a modifier extension, so I think that we need to do the ^isModifier = true thing.
Chris Moesel (Aug 20 2020 at 19:00):
Good to know, @Jean Duteau. If this is a requirement of the publisher, then we could potentially put an error-check in SUSHI so this type of thing is discovered before you invoke the publisher.
Chris Moesel (Aug 20 2020 at 19:14):
Logged: https://github.com/FHIR/sushi/issues/576
David Hay (Oct 13 2020 at 20:37):
@Jean Duteau - did you get all that working? I'm having issues with modifierExtensions in examples - I have an example in the input folder containing a modifierExtension (actually in a nested PlanDefinition.action.action element), but the IGPublisher seems to remove them when it publishes - no obvious reason why (yet)...
Jean Duteau (Oct 13 2020 at 20:56):
Yes, I did get it working.
Profile: PASClaimUpdate
Parent: PASClaim
Id: profile-claim-update
Title: "PAS Claim Update"
Description: "PAS constraints on Claim resource when submitting an update to a previous PAS prior authorization request"
- supportingInfo.modifierExtension contains InfoCancelledFlag named infoCancelledFlag 0..1
- item.modifierExtension contains InfoCancelledFlag named infoCancelledFlag 0..1
Extension: InfoCancelledFlag
Id: modifierextension-infoCancelled
Description: "A flag indicating whether the piece of information was cancelled."
- . ^isModifier = true
- . ^isModifierReason = "Indicates that this piece of information is not to be used."
- value[x] only boolean
Instance: ClaimSubmitHomecareDifferentialExample
InstanceOf: PASClaimUpdate
Title: "Submit Claim Update Differential Example"
Description: "An example of a Claim resource updating a prior authorization."
- item[0].sequence = 2
- item[0].modifierExtension[infoCancelledFlag].valueBoolean = true
- item[0].productOrService = http://www.ama-assn.org/go/cpt#B4184
David Hay (Oct 13 2020 at 21:01):
and it all published ok? I can get the instance from sushi, but it doesn't make it into the Ig (at least the modifierExtensions are removed). I am using a complex extension, so that may complicate things...
Jean Duteau (Oct 13 2020 at 21:02):
Yes. http://build.fhir.org/ig/HL7/davinci-pas/Claim-ClaimSubmitHomecareUpdateExample.json.html
David Hay (Oct 13 2020 at 21:10):
ta. something I'm doing then. sigh.
Jose Costa Teixeira (Oct 13 2020 at 21:41):
@David Hay which sushi version?
David Hay (Oct 13 2020 at 22:25):
0.16.0
David Hay (Oct 14 2020 at 18:03):
looks like an IG Publisher issue....
Juan Manuel Caputo (Feb 17 2022 at 11:11):
Hi Guys,
Im experience a problem with modifiers extensions in the last version of SUSHI, it giving this error:
error Cannot create healthProblem extension; unable to locate extension definition for: OHCHealthProblemConditionExtension.
I think it's the definition of he extension, that must be ModifierExtension, but i don't know how to do this, can anyone give a hand?. The extension defintion is this :
Extension: OHCHealthProblemConditionExtension
Id: ohc-health-problem-condition-extension
Title: "OHC-health-problem-condition-extension"
Description: "Extension for indicating if a condition, diagnosis, is a Health Problem"
// publisher, contact, and other metadata could be defined here using caret syntax (omitted)
- value[x] only boolean
Thank in advance.
Regard Juanello.
Chris Moesel (Feb 17 2022 at 13:57):
Hi @Juan Manuel Caputo. If the extension definition should be a modifier extension, then you need to set the isModifier
flag to true
on the extension definition's root element. It's also good to set isModifierReason
in these cases too. You can do this in FSH like this:
Extension: OHCHealthProblemConditionExtension
Id: ohc-health-problem-condition-extension
Title: "OHC-health-problem-condition-extension"
Description: "Extension for indicating if a condition, diagnosis, is a Health Problem"
* . ^isModifier = true
* . ^isModifierReason = "Modifies the meaning of..."
* value[x] only boolean
BUT the extension described above does not sound like it should be a modifier extension to me. It does not fundamentally change the meaning of the thing that is is applied to. So... you might want to reconsider if this really needs to be a modifier extension.
Chris Moesel (Feb 17 2022 at 13:59):
All that said, I don't see how or why this would cause the error you described ("Cannot create healthProblem extension"). It is more likely the the issue is w/ the FSH that includes the extension into a profile. Is the profile definition where you are trying to include this extension in the same FSH project (IG) as the extension definition?
Juan Manuel Caputo (Feb 21 2022 at 16:21):
Chris finally we tried your solution, and it worked!. We putted this new attributes in the extension definition. I think this hasn't be included in the main guide, do you think that this can be included?.
Thank you very much.
Regards
Last updated: Apr 12 2022 at 19:14 UTC