miracum / fhir-pseudonymizer

A REST service to pseudonymize and anonymize FHIR® resources.
MIT License
15 stars 2 forks source link

Breaking changes in gPAS 1.11.0 (and maybe earlier) #39

Closed makampf closed 2 years ago

makampf commented 2 years ago

https://simplifier.net/guide/ttp-fhir-gateway-ig/pseudonymizeAllowCreate

Afaik, the following changes were made in gPAS TTP GW:

and maybe more...

jabberwoc commented 2 years ago

Can confirm those changes with ttp-fhir-gateway 2.0.0 and gpas 1.10.2.

Response parameters have changed too. The pseudonym parameter's value is now of type valueIdentifier. E.g.:

{
          "name": "pseudonym",
          "valueIdentifier": {
            "system": "https://ths-greifswald.de/gpas",
            "value": "123456"
          }
        }
chgl commented 2 years ago

There's a note about different gPAS versions for the GPAS__VERSION setting at https://github.com/miracum/fhir-pseudonymizer#configuration. If the version is lower than 1.10.2 (https://github.com/miracum/fhir-pseudonymizer/blob/v2.11.0/src/FhirPseudonymizer/GPasFhirClient.cs#L68), then HTTP GET is used and the parameter is called domain (see https://github.com/miracum/fhir-pseudonymizer/blob/v2.11.0/src/FhirPseudonymizer/GPasFhirClient.cs#L131). If the version is greater or equal to 1.10.2, then HTTP POST is used, the parameter is called target, and the response object is parsed differently (https://github.com/miracum/fhir-pseudonymizer/blob/v2.11.0/src/FhirPseudonymizer/GPasFhirClient.cs#L150). This is the combination of versions used internally @makampf as far as I am aware. Unfortunately there is no all-in-one container with gpas @1.10.2 and any version of the ttp-fhir-gateway or it would've been useful to include it in the CI for e2e tests.

Now, apparently, there is a third version, where the operation names are turned camelCase (which I find unfortunate) and the result object looks different as well. We should still support the second version described above as it is in production use, but should add a third implementation of GetOriginalValueFor with the new API described by @jabberwoc. I guess it should be used if GPAS__VERSION >= 1.10.3 (maybe?).

Describing APIs in Markdown is really not great and the industry standard OpenAPI should strongly be encouraged instead, as should API-versioning and explicitely marking breaking changes.

jabberwoc commented 2 years ago

@chgl I'm aware of the GPAS__VERSION setting but assumed it was a bug or preliminary information of how the ttp-fhir-gateway v2 was goint to be implemented.

There is actually quite a bit of confusion concerning these changes as the release notes for gPAS 1.10.2 differ in ReleaseNotes-gPAS-1.10.3-inkl-TTP-FHIR-Gateway-2.0.0.pdf and gpas-1-11-0-ReleaseNotes.pdf. I was told the changes @makampf and I noticed were made in ttp-fhir-gateway version 2.0.0 but I never managed to succefully test this with the 1.10.2 gPAS docker image from MIRACUM Harbor and a mysql db (which I successfully did with 1.10.3).

However, I was not aware the current implementation is in (production) use with gPAS 1.10.2 which proves those changes were made after 1.10.2. I totally agree we should keep supporting this, as it would not be a bug of the current implementation.

I will add the changes I made to a GPAS__VERSION >= 1.10.3 setting in the pull request.

jabberwoc commented 2 years ago

To further add to the confusion: The documentation of gPAS 1.10.2 (gpas_anwenderhandbuch_1-10-2.pdf) actually lists the camel case operation names.

Just for the record.

miracum-bot commented 2 years ago

:tada: This issue has been resolved in version 2.12.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: