What is the suggested best-practice for using person attributes vs identifiers in MCH, especially in the case the ANC identifiers in connection to a pregnancy - these are Antenatal (ANC), maternity (for labor and delivery) and post natal (PNC).
The MCH numbers tend to have the following common characteristics:
Usually sequential and tend to get repeated at the beginning of a year (ANC and PNC), each month (Maternity)
A mother can have more than one MCH number across multiple years, a different one for each pregnancy
Are these better defined as identifiers (without uniqueness) or as person attributes? since a person can have one or more of these?
I think the key thing here that needs to be clear is to figure out what qualifies something to be an identifier vs a person attribute. In theory an identifier is something you can use to âuniquelyâ identify a single patient from the system in a given context, I know we have uniqueness behavior to allow duplication but this needs to be carefully used e.g it makes sense to allow duplicates in a context of say a location but the underlying concept stays that an identifier will still remain unique in a given context from the APIâs perspective much as it would be a duplicate in the DB. On the other hand person attributes most likely have a different side to them, person attributes are intended to be used to âextendâ a core table to add custom columns/fields that a given implementation wishes to collect.
Applying this to what youâre trying to solve, Iâm inclined towards identifiers but having them unique because much as itâs the same mother there is value in being able to differentiate the babies/pregancies, if you were to identify a mother with a given MCH related identifier that is duplicated then how do you quickly know which baby/pregnancy it was if the mother has had multiple pregnancies from the same facility? I personally think that one way you can implement this as follows:
Define a patient identifier type specific to MCH purposes e.g you can name it âMCH Identifierâ
When a baby has just been born and no patient record has been created for them, you assign the mother an MCH identifier to them that is unique among all MCH identifiers, you could allow duplicates across different mothers but there is no way to actually implement this kind uniqueness behavior in our current API.
After a patient record is created for the baby, transfer the same MCH identifier value to the baby but with a different identifier type to still maintain uniqueness within each identifier type.
With the above approach it means there is a way you can inspect the childâs or mumâs record to get to which baby is linked to a given pregnancy.
@ssmusoke, I didnât comment before because I donât have an intelligent opinion.
Broadly I would tend to use a patient_identifier if you typically use this for looking up patients, and a person_attribute if itâs merely a data point to show on some screen.
If you were representing MCH/pregnancy as a program enrollment, then this could be a good use case for program identifiers (though we donât actually have these in OpenMRS). I believe Bahmni has implemented program attributes in a module, and I think thereâs the intention to harvest this into openmrs-core, but nobody is actively working on that AFAIK.
I think Darius is on the right track. These are not identifiers of persons or patients; rather, a counter for specific treatment programs (antenatal care, maternity, and postnatal care). As such, the closest we have in OpenMRS is program enrollments (i.e., patient_program). FYI â I believe TW is actively working on adding patient-program attributes (i.e., enrollment attributes) which could accommodate these ANC, Maternity, and PNC identifiers.
While patient program attributes (perhaps evolving into a new core patient_program.identifier attribute) seems like the better fit, an alternative would be to use observations, since these are not unique (âidentifiersâ are re-used each year) and can be attributed to patients multiple times over multiple pregnancies.
Patient identifiers are meant to be ways to uniquely identify patients, which doesnât seem to be the case here. And, while you could make person attributes work, I generally think of these as virtually adding columns to the person table, which seems less fitting that program enrollment identifiers.
If program identifiers and attributes were in core, I agree that patient programs would be a good fit because then the child that was born in relation to the maternity program can be associated to it as a patient program attribute.