-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow 6.x versions of FHIR #1517
Conversation
FHIR version 6 is currently in balloting stages. It does not appear that any code changes are needed yet for allowing an R6 IG. The usual warning about prerelease versions will be shown when one of the ballot versions is used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, that was easier than expected! I tested it out by creating an R6 IG and profiling an element that doesn't exist in R5. It worked! I was even able to run the IG Publisher after.
One of the reasons this is so simple now is that past us thought ahead to this moment and added this:
sushi/src/utils/FHIRVersionUtils.ts
Lines 61 to 75 in 04b9d7b
// Supported Future Pre-Releases and Releases (well, we'll try) | |
{ | |
regex: /^6\.\d+\.\d+$/, | |
name: 'R6', | |
packageId: 'hl7.fhir.r6.core', | |
isPreRelease: false, | |
isSupported: true | |
}, | |
{ | |
regex: /^6\.\d+\.\d+-\S+$/, | |
name: 'R6', | |
packageId: 'hl7.fhir.r6.core', | |
isPreRelease: true, | |
isSupported: true | |
}, |
Anyway, nice job!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just left one question about a test, but I might be getting ahead of myself, so let me know what you think.
test/utils/Processing.test.ts
Outdated
it('should allow FHIR R6', () => { | ||
const input = path.join(__dirname, 'fixtures', 'fhir-r6'); | ||
const config = readConfig(input); | ||
expect(config.fhirVersion).toEqual(['6.0.0-ballot2']); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know what the difference is, but I was also able to use just 6.0.0
as a fhirVersion
already. Is it worth adding a test for that? SUSHI recognizes it as a non-preRelease version, thanks to the snippet of code Chris linked.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Getting a package downloaded for 6.0.0
right now is not so good, but either way, I can add a test for when that version is specified.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Re-approving!
Description:
FHIR version 6 is currently in balloting stages. It does not appear that any code changes are needed yet for allowing an R6 IG. The usual warning about prerelease versions will be shown when one of the ballot versions is used.
Testing Instructions:
The main question here is whether supporting R6 is actually as simple as I think it is. Having looked over information about the R6 ballot changes, I don't think there's anything that will need special handling.
The new datatype RelativeTime is complex enough that it doesn't make sense to try to support assigning it in a single rule. But, it may be worth considering if we want to support checking its invariants. rlt-1 is a very simple check, and rlt-2 isn't too much more complicated. We do something like this for Extensions for their ext-1 invariant.
Related Issue:
#1485