fixed NPE that occurred when attempting to assign location to patient identifier
added checks when editing identifiers to make sure identifier isn't already in use and passes validation