opensrp / fhircore

FHIR Core / OpenSRP 2 is a Kotlin application for delivering offline-capable, mobile-first healthcare project implementations from local community to national and international scale using FHIR and WHO Smart Guidelines on Android.
https://smartregister.org
Apache License 2.0
54 stars 41 forks source link

[Quest/Malawi Core] - Failing to save attributes that are not part of the Patient resource #1367

Open KhumboLihonga opened 2 years ago

KhumboLihonga commented 2 years ago

For our project, we need to save the phone number of a patient. In addition, we also need to save the 'phone owner' i.e. the person the phone number belongs to.

For example, a wife can provide her sisters' phone number during registration and as a result, we need to know who that person is. Unfortunately, while the Patient resource does support a phone number object i.e. ContactPoint, it does not have a phone owner attribute.

The ContactPoint attribute is as follows:

{
"system" : "<code>", // C? phone | fax | email | pager | url | sms | other
  "value" : "<string>", // The actual contact point details
  "use" : "<code>", // home | work | temp | old | mobile - purpose of this contact point
  "rank" : "<positiveInt>", // Specify preferred order of use
  "period" : { Period } // Time period when the contact point was/is in use
}

We are saving the phone number in the value attribute but have no place to save phone owner attribute (it would be a string). How should we go about saving this attribute? We also need to be able to populate this attribute when updating the patient's details.

Gental-Giant commented 2 years ago

@KhumboLihonga Inside the patient.contact attribute we have a relationship attribute. This has a list of codable concepts we can use. They have the next-of-kin which is broad for the sister, brother e.t.c. Using the next of kin code will save you the complexity of trying to figure out the code to use from every answer.

Please refer for more details: http://hl7.org/fhir/valueset-patient-contactrelationship.html

KhumboLihonga commented 2 years ago

@Gental-Giant Thanks for this. I've had a look and we were actually thinking of using the patient.contact attribute for guardians (who are not on ART). We would record their first name, last name, relationship, etc.

However, this issue refers to just recording a phone number and the respective owner e.g. sister. This is because in our program, not every client is required to have a guardian i.e. only clients under the age of 15 must have at least one guardian. As a result, when registering clients over 15 who may not have a guardian, we just need to record who the phone number they provide, belongs to.

I was hoping for a simple fix but I think for this suggestion to work, we need to re-think how we were planning on doing this.