Core Apps: Extend the demographics section of the patient page

Hi all,

In the context of our project we record the ethnicity of the patient during registration, and we would like this to be displayed somewhere in the demographics on the patient page:

So I was looking at patient.gsp and, because of this statement:

${ ui.includeFragment("coreapps", "patientHeader", [ patient: patient.patient, activeVisit: activeVisit, appContextModel: appContextModel ]) }

I headed to patientHeader.gsp. At first sight, it seems that I have to fork openmrs-module-coreapps and customise this view and its controller, but maybe am I wrong and there is a way to insert more data through some configuration?

Also there is something I just don’t understand regarding the address & telephone number. I see contactInfoInline.gsp being included:

${ ui.includeFragment("coreapps", "patientdashboard/contactInfoInline", [ patient: config.patient, contextModel: appContextModel ]) }

But I never see contactInfo.gsp being included anywhere! However it is that one that actually provides the patient’s address and phone number (contactInfoInline.gsp in fact seems to just contain the labels). There is really something I am missing here.

Note that it is including patientdashboard/contactInfoInline and there is a contactInfoInline.gsp file

I know you can add more question sections to the edit patient contact form to capture more data but i doubt if they actually get displayed in the header, you can put in a feature request for it to be supported.

Yes it is including contactInfoInline.gsp (cfr the snippet I pasted) but, if you look at that GSP file, you will see that it just holds the style and the labels for ‘Address’ and ‘Phone number’.

The actual name & phone number data should come from contactInfo.gsp. But that one is never included anywhere! I did a grep on the sources for ui.includeFragment("coreapps", "patientdashboard/contactInfo" to no avail…

Coming back to the original question, it seems that we will have to fork Core Apps then. But clearly it should be better to have a way to include a customizable fragment, if desired. Perhaps that is the point of those extensions and configs, but I never really understood how the whole thing is plugged together.

There is 2 kinds of contact info gsps, the inline and none inline, and as i said the patient header currently uses contactInfoInline.gsp. And also as i mentioned, you can create a ticket to request for the feature and we do this within the module instead of doing it within your fork

@wyclif Yes ok I see that, I don’t know why I was confused and thinking that contactInfoInline.gsp was not displaying address and phone number, nevermind.

Yes we will look into that direction, probably through our own branch at first. Thanks again for your help!