Skip to content

Commit

Permalink
Allow 6.x versions of FHIR
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mint-thompson committed Sep 19, 2024
1 parent f6827cc commit caa59e7
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils/Processing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ export const AUTOMATIC_DEPENDENCIES: AutomaticDependency[] = [
];

export function isSupportedFHIRVersion(version: string): boolean {
// For now, allow current or any 4.x/5.x version of FHIR except 4.0.0. This is a quick check; not a guarantee. If a user passes
// For now, allow current or any 4.x/5.x/6.x version of FHIR except 4.0.0. This is a quick check; not a guarantee. If a user passes
// in an invalid version that passes this test (e.g., 4.99.0), it is still expected to fail when we load dependencies.
return version !== '4.0.0' && /^(current|[45]\.\d+.\d+(-.+)?)$/.test(version);
return version !== '4.0.0' && /^(current|[456]\.\d+.\d+(-.+)?)$/.test(version);
}

export function ensureInputDir(input: string): string {
Expand Down
6 changes: 6 additions & 0 deletions test/utils/Processing.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,12 @@ describe('Processing', () => {
expect(config.fhirVersion).toEqual(['4.5.0']);
});

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']);
});

it('should allow FHIR current', () => {
const input = path.join(__dirname, 'fixtures', 'fhir-current');
const config = readConfig(input);
Expand Down
9 changes: 9 additions & 0 deletions test/utils/fixtures/fhir-r6/sushi-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
id: fhir.us.minimal
canonical: http://hl7.org/fhir/us/minimal
name: MinimalIG
status: draft
version: 1.0.0
fhirVersion: 6.0.0-ballot2
copyrightYear: 2020+
releaseLabel: Build CI
template: hl7.fhir.template#0.0.5

0 comments on commit caa59e7

Please sign in to comment.