synthea icon indicating copy to clipboard operation
synthea copied to clipboard

Use location instead of organization

Open citizenrich opened this issue 6 years ago • 4 comments

I would like to use Synthea to generate data that references Location resources (for facilities) rather than Organization resources. Thoughts on what a PR would require to support it and if the maintainers would accept it?

citizenrich avatar Jun 10 '18 17:06 citizenrich

Hmm... well, a straight-forward PR would require changing four different exporters: fhir (STU3), fhir_dstu2 (DSTU2), hospital.fhir (STU3), and hospital.fhir_dstu2 (DSTU2).

Those exporters can be found in src/main/java/org/mitre/synthea/export.

However, I don't think we'd accept a PR that just made a one-for-one swap... well, maybe we would (I'm open to persuasion), but that would might just need to be changed again. Perhaps where we want to go is to have both Organization and Location together once we add clinicians as Practitioner resources and we can generate synthetic data suitable for a Provider Directory, e.g. http://www.fhir.org/guides/argonaut/pd/index.html

@citizenrich what is your use-case for Location? Provider Directory? What advantage do you see Location having over Organization?

I'd be interested in having others comment on this issue. Adding clinicians/practitioners, and locations could be a big chunk of work.

jawalonoski avatar Jun 11 '18 11:06 jawalonoski

Indeed, thanks for the discussion. It would seem like quite a bit of work. I'm happy to have it discussed and learn what you all think.

The use case is to try to match what we (a global health NGO) see in resource-constrained countries and Location resources are more accurate for such contexts. So, imagine creating a synthetic dataset that includes immunizations for vaccine-preventable diseases in Liberia where most facilities are government-led and small. Hospitals as Organizations aren't a terribly accurate representation (edit: Perhaps a more clear way to say that is imagine if a blood test -- where does it come from? An organization or from a facility? I should think facility). But, I could be wrong.

citizenrich avatar Jun 11 '18 18:06 citizenrich

OK, I see the issue. One organization with many locations. Another example: a big chain Pharmacy. One organization, but many locations where you can pick up your prescription, get a flu shot, etc. Makes sense when I think of it that way.

So, I think I would be more open to this change after your comment. In some cases, the organization and locations will be 1 to 1, in most others not so much.

Simple way to implement this change would be to add Location to the four exporters listed above and change all the Reference(Organization | Location) references in FHIR to be Location -- where that Location.managingOrganization reference points to the Organization resource we're exporting now. If that makes any sense.

I'd be happy to take a PR for that. Let's discuss more if you're interested. Still open to thoughts from others.

jawalonoski avatar Jun 12 '18 01:06 jawalonoski

Just updating this issue to note that there's now an international locations repository to support Synthea: https://github.com/synthetichealth/synthea-international

citizenrich avatar Aug 04 '20 20:08 citizenrich