microsoft/iomt-fhir

Observations not being updated when new data arrives

dustinburson opened this issue · 1 comments

#161 introduced a defect where the updates don't occur when they should. Instead they are mistakenly treated as unchanged and the update is skipped.

The problem is due to mergedObservation and existingObservation being the same object. When existingObservation is passed to MergeObservation internally the same operation reference is modified. The return object is identical, so the subsequent check, if (mergedObservation.IsExactly(existingObservation)) always evaluates to true and the update is skipped.

Issue resolved with #185