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

Update version of firely SDK for R4 standard #175

Closed
christopher-watanabe-snkeos opened this issue Jun 23, 2022 · 2 comments
Closed

Update version of firely SDK for R4 standard #175

christopher-watanabe-snkeos opened this issue Jun 23, 2022 · 2 comments

Comments

@christopher-watanabe-snkeos
Copy link
Contributor

Hi all,

I've just noticed that the version used for the FHIR R4 standard is relatively old, version 3.4.0 released nearly a year ago. I'm wondering if it would be beneficial to look into updating this version? Since release, quite a few issues have been closed, so it might be beneficial to update this.

An initial check I've run is to update the version to the most recent v.4.0.0 and running the R4.Core.UnitTests and R4.Core.FunctionalTests tests. The following tests fail:

  1. Several AttributeValidatorTests in the R4.Core.UnitTests fail due to updated firely error messages.
  2. GivenAStu3OnlyResource_WhenAnonymizing_ExceptionShouldBeThrown(testFile: "Stu3OnlyResource/ProcessResponse.json", ResourceName: "ProcessResponse") fails due to a failure to throw an exception. I assume the Firely SDK now handles the previous situation that caused an exception.
  3. GivenAStu3OnlyResource_WhenAnonymizing_ExceptionShouldBeThrown(testFile: "Stu3OnlyResource/ProcessRequest.json", ResourceName: "ProcessRequest") fails due to a failure to throw an exception. I assume the Firely SDK now handles the previous situation that caused an exception.

The test failure due to changed error messages is a relatively quick fix. The GivenAStu3OnlyResource_WhenAnonymizing_ExceptionShouldBeThrown failures would have to be research to understand how the Stu3OnlyResource is handled in the updated firely SDK.

What do you think? If this is a benefit, I could create a PR for it. Seems like relatively little work to get the latest/greatest.

@christopher-watanabe-snkeos
Copy link
Contributor Author

Just an update: after looking further into it, the trickier of the failing unit tests is 2. and 3. in the list of failing tests in my original post. It seems that no exceptions are thrown on type casting the Stu3 resources ProcessResponse and ProcessRequest when parsing the json to TypedElement within the AnonymizeJson method of the AnonymizerEngine.

I don't know how this can be, as the R4 standard continues to not contain definitions for these resources, as far as I can tell. Interestingly, the test passes for the DeviceComponent.json file, meaning that the library cannot parse this json into an appropriate class object. Perhaps in the newest release, definitions for these resources have somehow landed in the R4 standard, when technically they are not defined. I'll continue to look into this, but any help or suggestions would be appreciated!

@christopher-watanabe-snkeos
Copy link
Contributor Author

Further Update:

I've asked the firely devs in the git repo about this topic. Hopefully there will be an answer sooner than later!

FirelyTeam/firely-net-sdk#2147

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

No branches or pull requests

1 participant