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

I am trying to generate some dataset which contains bodySite in Condition (Condition.bodySite) #1459

Open
jegaths opened this issue May 14, 2024 · 1 comment

Comments

@jegaths
Copy link

jegaths commented May 14, 2024

Requested Feature

I am trying to generate some dataset which contains bodySite in condition. But I cannot find a way to do it.

https://www.hl7.org/fhir/condition.html -> It is mentioned here that we can have bodySite inside condition and I need that for a filter I am working on. But am not able to generate that.

These are the properties am using

exporter.fhir.export = true
exporter.fhir.transaction_bundle = true
exporter.metadata.export = false
generate.default_population = 2

This is the command I am using

java -jar synthea-with-dependencies.jar -c ./synthea.properties

Is there any way to add Condition.bodySite?

@dehall
Copy link
Contributor

dehall commented May 14, 2024

There's no simple flag or configurations setting that can be set to make the exported data contain Condition.bodySite, however you can use the Flexporter to add it. Instructions on using the flexporter are here: https://github.com/synthetichealth/synthea/wiki/Flexporter

Essentially what you can do with the flexporter is define a set of rules that add the field when some condition is met. If you don't care whether the bodySite is logically consistent with the Condition resource and just need it to be present, you could add a very simple rule along the lines of "add this to all Conditions". Or if there is a specific Condition you are interested in, you could add it to only those Conditions, based on the code. Two sample flexporter mappings are below, hopefully these are enough to get you started but feel free to ask if you have further questions:

Add a bodysite to all Conditions:

---
name: Add BodySite

applicability: true

actions:
 - set_values:
     - applicability: Condition
       fields:
         - location: Condition.bodySite[0].coding
           value:
               system: http://snomed.info/sct
               code: "23416004"
               display: "Bone structure of ulna (body structure)"

Add a bodysite to Conditions with code 65966004 (Fracture of forearm)

---
name: Add BodySite

applicability: true

actions:
 - set_values:
     - applicability: Condition.code.coding.where($this.code = '65966004')
       fields:
         - location: Condition.bodySite[0].coding
           value:
               system: http://snomed.info/sct
               code: "23416004"
               display: "Bone structure of ulna (body structure)"

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

2 participants