I’ve a patient attribute which is getting synced as the Fully Specified Name in English from openmrs to Odoo. The values are getting saved in res_partner_attributes table.
I think, I can get the required local language translation by making an api request to /openmrs/ws/rest/v1/concept?s=byFullySpecifiedName&v=full&name from Odoo using python’s requests.get()
But, for this, I assume, I’d need to pass the username & password of openmrs as hard-coded.
Is there an alternate way to achieve this? Any way to send api requests using api-key instead of username & password ?
Yes, OpenMRS does support cookie-based authentication. Once you’re authenticated, a cookie is cached or set in your browser, and this cookie is used for subsequent requests. This means you don’t need to pass the basic credentials each time you make a request.