GoogleCloudPlatform / healthcare-data-harmonization

This is an engine that converts data of one structure to another, based on a configuration file which describes how. There is an accompanying syntax to make writing mappings easier and more robust.
https://cloud.google.com/solutions/healthcare-life-sciences
Apache License 2.0
198 stars 64 forks source link

Is there a way to direct output to a field named after contents of a variable? #35

Open torstees opened 2 years ago

torstees commented 2 years ago

I'd like to aggregate all records associated with a given patient together so that they can be bundled together inside a single bundle. So, to do that, the target field would need to be something like

out record.patient_id : ProcessPatient(...) out record.patient_id: ProcessObservations(...)

and at the end of the run, each ID would contain the Patient, ResearchSubject, all Observations, all Conditions, etc. Then, inside post-processing I would translate each of those ID lists into separate bundles

Obviously the example above wouldn't work since all patient data would end up inside record.patient_id instead of the actual ID associated with each of the records' patient but I'm not seeing anything in the docs that jumps out as a way to do this in whistle itself.