miracum / fhir-pseudonymizer

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

Plans for the next major release (v3) #98

Open chgl opened 1 year ago

chgl commented 1 year ago
Hanrepo commented 1 year ago

Could you add the certificate path as an environment variable? We had problems because of SSL to connect gPAS server.

chgl commented 1 year ago

@Hanrepo sure! If you have a self-signed certificate you should be able to just mount it inside the container's /etc/ssl/certs/ directory. That's not specific to this app. There's also SSL_CERT_FILE and SSL_CERT_DIR from the internal openssl used that should work.

Hanrepo commented 1 year ago

Thank you for your prompt response. I'm facing another issue while configuring the anonymization.yaml settings. I attempted to pseudonymize birthdates with

chgl commented 12 months ago

Looks like GitHub is messing up the formatting a bit, but I believe what you want is:

fhirVersion: R4
fhirPathRules:
  - path: Patient.birthDate
    method: generalize
    cases:
      "$this": "$this.toString().replaceMatches('(?<year>\\\\d{2,4})-(?<month>\\\\d{2})-(?<day>\\\\d{2})\\\\b', '${year}-${month}')"
    otherValues: redact

You're running into the intricacies of YAML string escaping unfortunately - so \\d becomes \\\\d. An alternative syntax would be [0-9]{2,4}. It also seems like the example in the docs is missing a closing ) and toString() seems to be required as well.

I've added a snapshot test for this config as an example https://github.com/miracum/fhir-pseudonymizer/pull/103.

Hanrepo commented 11 months ago

hi, we meet a new problem, "Failed to create CoreCLR, HRESULT: 0x8007000E", by setting mem_limit: 4g in Compose.yaml still not help.


` #version: '3' services: pseudonymizer: image: ghcr.io/miracum/fhir-pseudonymizer:v2.20.0 ports:

networks: mynet: external: true name:

'

.yaml sieht so aus.

chgl commented 11 months ago

Not sure the mem_limit is still used in current compose versions. It should use the deploy: section instead: https://docs.docker.com/compose/compose-file/deploy/#memory - you can check whether the limits were set using docker stats. If your machine has a lot of CPUs, you might want to limit the available CPUs as well: each one increases the size of required memory by the application. It might be easier to create a dedicated issue for better tracking in the future :).