Stream: Profiling Academy
Topic: Dosage as an Extension Value
Larry Shields (Mar 24 2020 at 12:51):
I'm working on creating an extension for capturing some addition information for our Immunization records and the Dosage Data Type seems to fit the bill for the information we are trying to capture. I'm seeing errors/warnings however when I attempt to set the datatype in the Extension to use the Type of Dosage when using the Forge application for STU3. Is there a rule against using Dosage in extensions as the Value type?
Ward Weistra (Mar 25 2020 at 08:03):
Hi @Larry Shields, I'm not sure on the specific question you're asking, but can you share what errors you're getting?
Larry Shields (Mar 25 2020 at 15:46):
@Ward Weistra There error is: Invalid element type constraint for type = 'Dosage', profile = 'http://hl7.org/fhir/StructureDefinition/Dosage'. May only further constrain base resource types. I'm guessing this is because the Dosage type is one of the special purpose data types and only specific data types are available in this instance. Since it's an Open Type though, I would expect that Dosage would be supported based on the definition of Open Types.
Ward Weistra (Mar 25 2020 at 17:37):
Can you share the extension you are working on? I seem to be able to select Dosage as the data type for a custom extension without issues. Thanks!
Ward Weistra (Mar 25 2020 at 17:37):
@Larry Shields
Larry Shields (Mar 25 2020 at 20:12):
@Ward Weistra I'm creating a new one from scratch in Forge for STU3. It doesn't stop me from doing this, I think it's more of a FHIR validation warning that I'm concerned will pop up when we try to do any sort of validation of the resources.
Ward Weistra (Mar 27 2020 at 08:57):
I can't reproduce the errors/warnings you're getting @Larry Shields, so if you're able to share (an anonymized version of) the extension where you get these errors that would help.
Matthijs van der Wielen (Mar 27 2020 at 09:47):
Hi @Larry Shields , I can reproduce your error in STU3. You are correct in your assumption that there is a rule against using Dosage in extensions. This is only for STU3 as you can see in the spec here: http://hl7.org/fhir/stu3/extensibility.html .
In R4 the use of Dosage in extensions is allowed: http://hl7.org/fhir/extensibility.html . In R4 I can select Dosage (see image.png) as type without having to add a new Type like in STU3.
Larry Shields (Mar 27 2020 at 13:33):
Thanks @Matthijs van der Wielen and @Ward Weistra . I'll work around this for now in STU3 and we can move to using Dosage when we migrate this project to R4.
Last updated: Apr 12 2022 at 19:14 UTC