Code Monkey home page Code Monkey logo

Comments (6)

chgl avatar chgl commented on July 19, 2024 1

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 #103.

from fhir-pseudonymizer.

Hanrepo avatar Hanrepo commented on July 19, 2024

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

from fhir-pseudonymizer.

chgl avatar chgl commented on July 19, 2024

@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.

from fhir-pseudonymizer.

Hanrepo avatar Hanrepo commented on July 19, 2024

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

  • path: Patient.birthDate
    method: generalize
    cases: $this.replaceMatches('(?\d{2,4})-(?\d{1,2})-(?\d{1,2})\b', '${year}-${month}')
    base the guidelines from FHIR-anonymization.md. However, it seems like it's not working. Could you please assist me with this?

from fhir-pseudonymizer.

Hanrepo avatar Hanrepo commented on July 19, 2024

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:

  • "8089:8080"
    environment:
    PseudonymizationService: "gPAS"
    UseSystemTextJsonFhirSerializer: "true"
    AnonymizationEngineConfigPath: "/etc/anonymization.yaml"
    gPAS__URL: ""
    gPAS__Version: "2023.1.0"
    gPAS__Auth__Basic__Username: ""
    gPAS__Auth__Basic__Password: ""
    SSL_CERT_FILE: "/etc/certs/nginx-selfsigned.crt"
    SSL_KEY_FILE: "/etc/certs/nginx-selfsigned.key"

volumes:
- /opt/fhir-pseudonymizer-master/anonymization.yaml:/etc/anonymization.yaml
- /opt/fhir-pseudonymizer-master/certs/nginx-selfsigned.crt:/etc/certs/ngi>
- /opt/fhir-pseudonymizer-master/certs/nginx-selfsigned.key:/etc/certs/ngi>
command:
--sslcert /certs/nginx-selfsigned.crt
--sslkey /certs/nginx-selfsigned.key
networks:
- mynet
mem_limit: 4g
memswap_limit: 4g

networks:
mynet:
external: true
name:

'

.yaml sieht so aus.

from fhir-pseudonymizer.

chgl avatar chgl commented on July 19, 2024

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 :).

from fhir-pseudonymizer.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.