Uploaded image for project: 'OpenMRS Core'
  1. OpenMRS Core
  2. TRUNK-3772

Should be able to define EncounterVisitHandlers as spring beans

    XMLWordPrintable

    Details

    • Complexity:
      Low

      Description

      There's a global property (GP_VISIT_ASSIGNMENT_HANDLER = "visits.assignmentHandler") which we expect to be the classname of an EncounterVisitHandler, and a new one is instantiated each time we need one, with newInstance() in org.openmrs.api.impl.EncounterServiceImpl#getActiveEncounterVisitHandler.

      I would like to be able to define one of these in my module with an @Autowired property, i.e. I'd like to be able to use the global property to point to an existing Spring bean.

      I propose we support letting the GP be either a classname (the current behavior) or else "bean:beanName".

      This would just require a change to org.openmrs.api.impl.EncounterServiceImpl#getActiveEncounterVisitHandler (and some documentation of course!)

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                areo Arkadiusz KoƂodziejski
                Reporter:
                darius Darius Jazayeri
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    Time Tracking

                    Estimated:
                    Original Estimate - 4 hours Original Estimate - 4 hours
                    4h
                    Remaining:
                    Time Spent - 4 hours Remaining Estimate - 10 minutes
                    10m
                    Logged:
                    Time Spent - 4 hours Remaining Estimate - 10 minutes
                    4h