What is the best way to save raw data in fhir? For example, I want to save the heart rate data of a patient which is obtained by monitoring the patient for 10 hours a day, every day of the week.
Do I have to create for each measurement from an observation
or is there any more convenient method to store the data ?
So far I have tried to save the data through Observation:
Observation observation = new Observation
{
Status = ObservationStatus.Final,
Code = new CodeableConcept($"http://loinc.org", "12345-6"),
Subject = new ResourceReference($"Patient/{measurementData.PatientId}"),
Value = new FhirString(measurementData.Value), // Example value and unit
Issued = DateTime.Now
};
Truly 'raw' data would be stored using Binary - which can store anything with a mime type. However, Binary is opaque from a FHIR search perspective. If you want 'concise' representation of a large volume of data in a single Observation, you can also look at the SampledData data type. It allows storing data captured at regularly sampled intervals in a pretty concise format in a single Observation.