Git Product home page Git Product logo

Comments (10)

Cam2337 avatar Cam2337 commented on May 3, 2024

Interesting, yes a code sample would be fantastic!

...An older version works fine for me, however the latest results in...

Just so I'm clear, you're saying an older Synthea works o.k.? What's the version that was working for you?

Thanks for bringing it to our attention!

from fhir.

gitpushdashf avatar gitpushdashf commented on May 3, 2024

Yeah, an older one works fine. Synthea wasn't tagging releases for over a year and the only (easy) option was downloading the .jar made from master.

https://github.com/synthetichealth/synthea/releases

Now it turns out that in September they made releases, but those releases seem to be build for openjdk12 and not openjdk8... synthetichealth/synthea#813

Anyway, here's a snippet of the new output.

            "who": {
              "reference": "Practitioner?identifier=http://hl7.org/fhir/sid/us-npi%7C9999948299",
              "display": "Dr. Dorothea248 Huel628"
            },
            "onBehalfOf": {
              "reference": "Organization?identifier=https://github.com/synthetichealth/synthea%7Cde004a50-64ca-37eb-bf70-d5589fa7999f",
              "display": "PCP149816"
            }
          },
          {
            "type": {
              "coding": [
                {
                  "system": "http://hl7.org/fhir/us/core/CodeSystem/us-core-provenance-participant-type",
                  "code": "transmitter",
                  "display": "Transmitter"
                }
              ],
              "text": "Transmitter"
            },
            "who": {
              "reference": "Practitioner?identifier=http://hl7.org/fhir/sid/us-npi%7C9999948299",
              "display": "Dr. Dorothea248 Huel628"
            },
            "onBehalfOf": {
              "reference": "Organization?identifier=https://github.com/synthetichealth/synthea%7Cde004a50-64ca-37eb-bf70-d5589fa7999f",
              "display": "PCP149816"
            }
          }
        ]
      },
      "request": {
        "method": "POST",
        "url": "Provenance"
      }
    }
  ]
}

Thanks for getting back to me. Let me come up with a code snippet.

from fhir.

gitpushdashf avatar gitpushdashf commented on May 3, 2024

Ok, hopefully this helps. I made/activated a virtualenv, pip3 installed google-fhir and requests, then ran the script in an empty directory.

synthea.py.txt

Thanks!

from fhir.

gitpushdashf avatar gitpushdashf commented on May 3, 2024

I'm having some weird behavior. If I use just the old Synthea JAR file, it seems to generate good output. If I switch to the latest one, it breaks. If I switch back, it's still broken, maybe for hours. It's like Synthea caches something that's throwing it off.

from fhir.

gitpushdashf avatar gitpushdashf commented on May 3, 2024

e5545c13-98db-083f-f580-b22157aa82a8.json.txt

Here's one generated that I'm having issues with.

from fhir.

gitpushdashf avatar gitpushdashf commented on May 3, 2024

Ok, the old .jar actually does work fine -- I was screwing up. But the new jar does produce output that google-fhir can't handle.

I need to find somewhere to host that file.

from fhir.

gitpushdashf avatar gitpushdashf commented on May 3, 2024

Here's a Synthea version that is working.

https://github.com/gitpushdashf/synthea/releases/tag/v2.5.9

from fhir.

Cam2337 avatar Cam2337 commented on May 3, 2024

Thanks for the details! I believe that these patterns started being introduced in Synthea with SHA: b262437bce35bfec4e485e150832242b5a68581a (link).

Since Uri has a really permissive pattern (\S*; source), it seems like we're potentially being too strict in references.py if we're unable to split the relative reference.

Will look into correcting this behavior so that we're taking appropriate action.

from fhir.

Cam2337 avatar Cam2337 commented on May 3, 2024

Circling back on this -- the change was trivial but it required additional work to some things downstream. I have a fix internally now that's going through review.

In the meantime as we discussed you should be able to avoid any problematic Synthea by sticking to versions earlier than b262437bce35bfec4e485e150832242b5a68581a. Additionally, as a temporary workaround I believe you can instruct Synthea to not use transaction_bundle, which should avoid these logical Reference URLs, e.g.:

~/synthea$ ./run_synthea Massachusetts -p 10
~/synthea$ grep -R '"reference":' ./output/fhir/ | grep -E '[A-Z][a-z]+\?.*' | wc -l
6010
~/synthea$ rm ./output/fhir/*

~/synthea$ ./run_synthea Massachusetts --exporter.fhir.transaction_bundle false -p 10
~/synthea$ grep -R '"reference":' ./output/fhir/ | grep -E '[A-Z][a-z]+\?.*' | wc -l
0

See more at: https://github.com/synthetichealth/synthea/blob/master/src/main/resources/synthea.properties#L18

Appreciate the patience and help in identifying this! :)

from fhir.

gitpushdashf avatar gitpushdashf commented on May 3, 2024

Thank you! That's good to know.

from fhir.

Related Issues (20)

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.