IMA-WorldHealth/bhima — pull request #57 by sfount (2014-08-31 05:28:34+00:00)
Title: Generic Location Select Directive

Location selection code/ relationships can be complicated and require a lot of code (replicated across different controllers).

Location relationship code extracted into a directive, **this can then be used anywhere a location needs to be selected** (patient registration, patient search, employee registration etc.) This will greatly reduce the amount of code in the controllers, and ensure the code is specific to controller (not to loading location data).

It can be used like the following:

**location-select** : name of the directive
**select-village** : callback, this is called every time a new village is selected, and passes the UUID of the village, or null if it does not exist