I had this little query on the implementation of various search based functions like patient search, concept search, person search, active visits, etc.
With platform 1.11.4, I was able to track down the actual methods handling search related requests but little confused on how and from where things are taken care of after integrating platform with reference application modules.
For starters say where can I find the method called when find patient function is used through the reference application. So far I’ve learned that coreapps module provides the find patient functionality from patient search widget. I’ve tracked down to patientSearchWidget.js and found that search URL make REST invocation. I scanned through web services module but got lost and have failed to understand the workflow to its root.
I’m currently working on multi-tenant architecture and need to fine tune the service method for the above mentioned search functions.
The webservices.rest module has a thin layer in general, in most cases it simply delegates to the methods in the core API. If you peek at the code in core there’s methods like ConceptService.getConcepts and PatientService.getPatients which also delegate to underlying DAO methods like ConceptDAO.getConcepts and PatientDAO.getPatients that issue queries to the DB
I’ve added few variables under person class and want to access them in patientSearchWidget results.
Currently, the patientSearchWidget uses REST call to …/ws/rest/v1/patient with custom version parameter as:
var customRep = 'custom:(uuid,' + 'patientIdentifier:(uuid,identifier),' + 'person:(gender,age,birthdate,birthdateEstimated,personName))';
I tried adding variable name like:
...person:(gender,age,birthdate,birthdateEstimated,personName,<my-variable>));
but I always get a null for <my-variable>.
Is there any change I need to make in webservice module??
@darius I expected a similar change and have already tried adding properties in getRepresentationDescription() of PersonResource1_8.
I get a null value for <my-variable> in JSON response of the REST call and in XML response I get a tag with no value (<my-varaible/>).
Do I need to define a @PropertyGetter for the property I’m trying to add??
Note: The variable I’m trying to access is of a custom data-type (class)
The folks at ampath with @judy did some work on a biometrics module I think last summer, it would be good to reach out to them and see if you can share ideas or even see if you can use that module.