Obs and Person mapping

Tags: #<Tag:0x00007ff4b9be40f0> #<Tag:0x00007ff4b9be4028> #<Tag:0x00007ff4bd24fef0> #<Tag:0x00007ff4bd24fe28>

The Obs class has always relied on a Person rather than a Patient as the subject of the observation. In my mind, this seems like the wrong mapping. Surely all Obs are used to store observations related to patients, rather than the other entities that might be represented by the Person object. However, I was unsure if there are any good use cases for Obs that refer to non-Patient Persons, so I thought I’d ask here if there are any reasons to keep this mapping around.

The anticipated workflows to register observations for persons, did not really kick off. Person to Patient

Obs started out (pre-2008) pointing to patient and – sometime prior to 2008 – was changed to point to person. I think it was to accommodate the ability to capture some data about relatives or perhaps PIH’s accompagnateur.

We’d be better aligned with FHIR if we allowed observations to be made for a patient or cohort. But we’d have to convince PIH and have a better idea of what existing code would break if obs were limited to patients.

Not sure if at PIH we ever use obs outside of a patient… I don’t believe we do in our “PIH EMR” distro, but it’s possible we do in Rwanda or Malawi, do you know @mseaton?

I’m not aware of a strong use of this at PIH. I wasn’t aware that we were the one’s who advocated for this, if that’s @burke’s recollection. Regardless of PIH usage, the reason to keep this around is for backwards compatibility at this stage. Certainly we could try to make this change for 3.0 if we find it valuable. Is the mapping to Person causing problems @ibacher? . If we use Obs for this at all, it wouldn’t likely be for anything that couldn’t be replaced by a module-added feature and a straightforward migration.

@mseaton It doesn’t really cause any issues per se, especially if no one is using it. It just means I need to figure out what to return is someone requests a Obs through the FHIR API that’s not linked to a patient (since FHIR Observation.subject doesn’t really support a reference to a Person resource.