Skip to content
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

Issue #1128 - add snapshot option to FshToFhir #1465

Merged
merged 4 commits into from
Jun 4, 2024

Conversation

joepaquette
Copy link
Contributor

Issue #1128 - Enable sushiClient (FshToFhir) to create StructureDefinitions with the snapshot data element

…efinitions with the snapshot data element
Copy link
Member

@cmoesel cmoesel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, Joe! I've left one question I'd like your opinion about.

test/run/FshToFhir.test.ts Outdated Show resolved Hide resolved
src/run/FshToFhir.ts Show resolved Hide resolved
Copy link
Member

@cmoesel cmoesel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, Joe! This looks great. I did a manual test with the following code and confirmed it is working as expected.

import { sushiClient } from '.';

// Example usage with options
sushiClient
  .fshToFhir(
    `
Profile: MyPatient
Parent: Patient
* name 1..* MS

Profile: MyCondition
Parent: Condition
* subject only Reference(Patient)
`,
    {
      canonical: 'http://example.com',
      version: '1.2.3',
      fhirVersion: '4.0.1',
      snapshot: true
    }
  )
  .then(results => {
    console.log('FHIR', JSON.stringify(results.fhir, null, 2));
    console.log('WARNINGS', JSON.stringify(results.warnings, null, 2));
    console.log('ERRORS', JSON.stringify(results.errors, null, 2));
  })
  .catch(err => {
    console.error('Woah, Nellie!', err);
  });

As you know, we require two code reviews in order to merge, so I'll have someone from the team take a look next week. In the mean time, perhaps you can click the Update Branch button to sync this up with the master branch?

Copy link
Collaborator

@jafeltra jafeltra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @joepaquette! This PR looks good to me as well. I tested it out and looked through the code, and it all looks good to me!

Thanks for addressing this long-standing issue!

@jafeltra jafeltra merged commit 54bdd4e into FHIR:master Jun 4, 2024
7 checks passed
@joepaquette joepaquette deleted the sushiClient-snapshot-issue1128 branch June 4, 2024 18:55
KaelynJefferson pushed a commit that referenced this pull request Jun 14, 2024
* Issue #1128 - Enable sushiClient (FshToFhir) to create StructureDefinitions with the snapshot data element

* Issue #1128 - add comment about use of snapshot option

* Issue #1128 - update tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants