Stream: implementers
Topic: Multiple Observation Components
Ma Sk (Aug 22 2019 at 00:39):
Hey guys,
i want to do something like this
ddd-t44.PNG
But i can´t get my head around how to set a component in an observation or multiple components.
At first i used something like this because i just sent one chunk of data:
observation.setValue(
new SampledData()
.setOrigin(new Quantity()
.setUnit(unit)
.setSystem(messageData.getUnitSystem())
.setCode(unit))
.setData(value));
Now i need to put multiple data chunks in one Fhir bundle and therefore i need multiple components, right?
Thanks in advance
Lloyd McKenzie (Aug 22 2019 at 01:57):
Components are used when everything was captured at a single point in time - multiple chunks sounds like multiple Observations.
Ma Sk (Aug 22 2019 at 02:15):
I already have all data that i need. I just have to put it inside a bundle and send it to the server.
What i mean with multiple chunks is, that i have for example multiple brain wave data from one EEG scan.
I want to send everything at once but i need to know which value is from which brain wave.
Ma Sk (Aug 22 2019 at 02:19):
The output should look like this
sdfdse.PNG
adsfdsfe.PNG
Lloyd McKenzie (Aug 22 2019 at 02:23):
Ok - if you have multiple waves from the same sample period, component is reasonable if they're typically sent/interpreted together. Why do you need Bundle if you just have a single Observation with multiple components?
Ma Sk (Aug 22 2019 at 02:29):
I use a bundle because i have more information, for example patient data and so on.
Do you know how to get this done with multiple components? It would be nice to have a small example.
Lloyd McKenzie (Aug 22 2019 at 02:31):
You should be able to do a .addComponent or do a .setComponent to a typed collection you can then add to.
Ma Sk (Aug 22 2019 at 02:51):
Okay, adding ".addComponent()" did the trick. Thank you very much
observation.addComponent() .setValue( new SampledData().setOrigin(new Quantity() .setUnit(unit) .setSystem(messageData.getUnitSystem()) .setCode(unit)) .setData(value));
Lloyd McKenzie (Aug 22 2019 at 03:49):
Note that you're going to need to set a code for the component too - to identify which waveform you're representing
Last updated: Apr 12 2022 at 19:14 UTC