Skip to content

Commit

Permalink
Merge branch 'master' into instance-id-type-safety
Browse files Browse the repository at this point in the history
  • Loading branch information
mint-thompson authored Oct 10, 2024
2 parents 2b848c1 + bfbd966 commit 0260c34
Show file tree
Hide file tree
Showing 4 changed files with 32 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
12 changes: 12 additions & 0 deletions test/utils/Processing.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,18 @@ describe('Processing', () => {
expect(config.fhirVersion).toEqual(['4.5.0']);
});

it('should allow FHIR R6 prerelease', () => {
const input = path.join(__dirname, 'fixtures', 'fhir-r6-prerelease');
const config = readConfig(input);
expect(config.fhirVersion).toEqual(['6.0.0-ballot2']);
});

it('should allow FHIR R6 full release', () => {
const input = path.join(__dirname, 'fixtures', 'fhir-r6');
const config = readConfig(input);
expect(config.fhirVersion).toEqual(['6.0.0']);
});

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-prerelease/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
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
copyrightYear: 2020+
releaseLabel: Build CI
template: hl7.fhir.template#0.0.5

0 comments on commit 0260c34

Please sign in to comment.