hi there, how do you change the core app dashboard url. i wanna link patient formto my dashboard url instead of core app dashboard any help would be appreciated.
thnx @mksd for your valuable comment . but i had already tried replacing the default core app file in config file but no success . it still takes me back to default dashboard.
Could you outline the exact steps of what you did? In particular, what config file are you taking about?
@mksd i changed dashboard url which says " Allows one to override the default dashboard url" With my dashboard url
So I’m deciphering that you have changed the config.xml in your own module, is that the case?
(Assuming yes) When your module is initialized and if the global property is already set in database, then it won’t be touched anymore. You may just set the global property in your module’s activator, or use any tool that helps initialize metadata.
@mksd thnx bro but since m new to openmrs if you dont mind can u help me how to set a global property in modules activator
Interestingly your own module is touching that space (see here).
It seems to purge a custom defined dashboard URL if there is one defined. Looks like you may want to change what this startup method does.
More here in the wiki: ‘Module Activator’.
when a user clicks on “mahali devu” it routes here.
i just want the user to stay on the link that says http://localhost:8081/openmrs/intelehealth/intelehealthPatientDashboard.page?patientId=9583fba3-3ded-49fa-aa53-5f71fd21aab2(the above screenshot) instead of routing to core apps dashboard
When you go to:
http://localhost:8081/openmrs/admin/maintenance/globalProps.form
What’s the value for coreapps.dashboardUrl?
If you see the same thing as in my screenshot above, then refer to my last post and set the global property through your module’s activator to:
/intelehealth/intelehealthPatientDashboard.page?patientId={{patient.uuid}}
Btw you can already test this at runtime by changing the value through that configuration screen.
Actually I’m not sure 100% about the {{patient.uuid}}
, this depends a bit on what’s available on the page that will invoke the link. By writing the above I’m assuming that there is a Groovy patient
variable at hand and that we can get its .uuid
member.
ok i tried replacing the core app with /intelehealth/intelehealthPatientDashboard.page?patientId={{patient.uuid}} it gives an error called “en_GB” is not in allowed locales list any help here wud be appreciated
And what are your allowed locales?
This is for example the state of the official demo:
If ‘en_GB’ is missing, just add it to the list for the sake of troubleshooting.
bro its working using {{patientId}} but how do i access using uuid i had tried {{patient.uuid}} but its nt working
“but its nt working” is no developer feedback, more details would be needed in order to give further directions. Also please if you could refrain from calling me ‘bro’, that’d be great.
This suggests that passing either the patient ID or the patient UUID should work. What are you experiencing when passing the patient ID?
hey thnx alot @mksd it worked.
@mksd one more thing how can i change a edit button like a “Edit” button before patient name “Mahalli Devu” in above screenshot
This could maybe be overridable through defining a custom extension point "patientHeader.editPatientDemographics"
, see here.
This is the place where this extension point is defined in the Registration App module:
"url": "registrationapp/editSection.page?...
You may try to define an alternate one in your custom module and validate that it is picked up (or not) and hence that it indeed overrides the current setting (or not). I suspect that it may work, but would then be unpredictable. I guess some order should exist for the extension to be preferred based on its order.
@darius @mogoodrich, thoughts?
I don’t remember exactly how priority works in this case… in our distro, we have it set up to not use any of the existing extension and extension point definitions that are set up in individual modules, but rather set up all our extension and extension points in our distro module, so that’s how we get around this issue. I do think there is way to override existing extensions and extension points using custom json config files, but I’m not 100% sure how that works.
Take care, Mark