Does anyone know what the
foreignKey attribute of
PatientAttributeType is supposed to be? It’s not documented: PersonAttributeType (OpenMRS 2.5.0-SNAPSHOT API).
The Initializer documentation is more helpful, but still leaves questions unanswered:
Does it restrict the values of the attribute? Presumably it works quite differently for e.g. format
Concept vs format
Provider vs format
Encounter—how does it work in each case?
“the foreign key in the database that this PersonAttributeType references” -wiki
There’s a little more here:
“Foreign Key: The only time a foreign key value is needed is when you are using a separate table for the answers. A good example of this is the Civil Status attribute that links to the concept civil status for its possible answers, see here on how to implement it.”
Nice, thanks @burke , I think that tells me what I was looking for. I didn’t think to look in the Wiki.