Hello Friends, Am trying to work on Order Drug pharmacy module, however am kind of getting stuck ,i want to be able to fetch all patient allergies via single click from allergyTable within openmrs
which i thought something like
and display them on existing page Hopefully this controller and view page , which seems to be working as expected however upon testing am encounting this error logs, not exactly sure what am missing out , kindly need your help thanks cc @ibacher@dkayiwa@k.joseph@mozzy
Thanks @k.joseph for suggestion, unfortunately trying to autowire allergy class which i think it inherits allergyService bean but that has not been of help .
Hello @k.joseph , Recently i had issues with allergyapi config becuase it couldnot be compatible with version of openmrs and immediately i disabled it from with in pom files, all things worked as expected expect this error so i think to cater for allergyService bean injection i need to depend on allergyapi module which i think its the cause . Let me first try that and see if it works thanks
Depending on allergyApi didnt help however it seems that (“allergyService”) PatientService patientService has got two kind of naming from different packages one from allergyApi and openmrs core@k.joseph is this part of the error, the challenge like how you said is that spring doesnt see allergyService class
@sharif Do you still have the allergyapi in your distro? It seems like if you’re moving to 2.x, you should drop the allergyapi module and just rely on the core PatientService class, so swap out:
Thanks @ibacher, No i had removed allergyapi on distro and even as part of dependencies in order drugs module because it could throw errors, thanks let me try it out
Wow thanks @ibacher@k.joseph for your help changing to @springBean(“patientService”) PatientService patientService made it successfully , thanks again for your help