Stream: implementers
Topic: version conversion - VersionConvertor_40_50
Michael Lawley (Jul 21 2021 at 10:13):
https://www.hl7.org/fhir/versions.html#extensions describes how _"any element defined in any version of FHIR is automatically assigned an extension URL that uniquely identifies the element and can be used in the relevant FHIR version"_
So I've just used the VersionConvertor_40_50.convertResource to turn an R5 ValueSet into an R4 ValueSet and did not get what I expected:
Input:
{
"resourceType": "ValueSet",
"expansion": {
"contains": [ {
"system": "urn:abc-123",
"code": "dummy code",
"property": [ {
"code": "stringProp",
"valueString": "string value"
}, {
"code": "booleanProp",
"valueBoolean": true
}, {
"code": "decimalProp",
"valueDecimal": 3.1415926
} ]
} ]
}
}
Output:
{
"resourceType": "ValueSet",
"expansion": {
"contains": [ {
"system": "urn:abc-123",
"code": "dummy code"
} ]
}
}
Where has that add-in-R5 property
element gone? I was expecting that additional elements would be rendered as extensions on the older resource?
Lloyd McKenzie (Jul 21 2021 at 14:55):
The conversion code is manually written. Feel free to submit an issue, or better yet, a pull request :)
Michael Lawley (Jul 21 2021 at 21:27):
Fair enough :-)
When I see this:
// Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0
public class ValueSet40_50 extends VersionConvertor_40_50 {
what is it generated from and how?
Lloyd McKenzie (Jul 21 2021 at 21:44):
@Mark Iantorno
Mark Iantorno (Jul 21 2021 at 21:55):
It's not generated, it's manually written code.
Mark Iantorno (Jul 21 2021 at 21:56):
I'mk actually in the process of a giant overhaul right now of the convertors to include more controls for users
Michael Lawley (Jul 21 2021 at 22:03):
being able to override or otherwise intercept all those conversion methods would be a great option
Mark Iantorno (Jul 21 2021 at 22:11):
It is in the works right now
Mark Iantorno (Jul 21 2021 at 22:11):
but it is a MASSIVE overhaul
Mark Iantorno (Jul 21 2021 at 22:12):
right now the first stage will be to allow users to custom handle extensions based on path, in addition to providing the ability to override resource conversion altogether for certain types if they want
Mark Iantorno (Jul 21 2021 at 22:12):
there are a few open github issues on this
Mark Iantorno (Jul 21 2021 at 22:13):
I'm planning to close them all with one big commit
Last updated: Apr 12 2022 at 19:14 UTC