@@ -0,0 +1,2164 @@
+/*%0A * This code is subject to the HIEOS License, Version 1.0%0A *%0A * Copyright(c) 2011 Vangent, Inc.  All rights reserved.%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A *%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0Apackage com.vangent.hieos.empi.transform;%0A%0Aimport com.vangent.hieos.hl7v3util.model.subject.Subject;%0Aimport com.vangent.hieos.hl7v3util.model.subject.SubjectIdentifier;%0Aimport com.vangent.hieos.hl7v3util.model.subject.SubjectIdentifierDomain;%0Aimport java.util.ArrayList;%0Aimport java.util.List;%0A%0A/**%0A *%0A * @author Bernie Thuman%0A */%0Apublic class IdentifierTransformFunction extends TransformFunction %7B%0A     private static String PARAM_UNIVERSAL_ID = %22universal-id%22;%0A%0A%0A    /**%0A     * %0A     * @param obj%0A     * @return%0A     */%0A    public Object transform(Object obj) %7B%0A        String identifier = null;%0A        Subject subject = (Subject) obj;%0A        String universalId = this.getFunctionConfig().getParameter(PARAM_UNIVERSAL_ID);%0A        if (universalId != null)%0A        %7B%0A            // Find an identifier that matches the universal id.%0A            List%3CSubjectIdentifier%3E subjectIdentifiersCopy = new ArrayList%3CSubjectIdentifier%3E();%0A            subjectIdentifiersCopy.addAll(subject.getSubjectIdentifiers());%0A            subjectIdentifiersCopy.addAll(subject.getSubjectOtherIdentifiers());%0A            for (SubjectIdentifier subjectIdentifier : subjectIdentifiersCopy)%0A            %7B%0A                SubjectIdentifierDomain subjectIdentifierDomain = subjectIdentifier.getIdentifierDomain();%0A                if (subjectIdentifierDomain.getUniversalId().equals(universalId))%0A                %7B%0A                    // Match.%0A                    identifier = subjectIdentifier.getIdentifier();%0A                    System.out.println(%22IdentifierTransform found identifier = %22 + subjectIdentifier.getCXFormatted());%0A                    break;%0A                %7D%0A            %7D%0A        %7D%0A        return identifier;%0A    %7D%0A%7D%0A

Allow PIX/PDQ search on PID + other identifiers (e.g. SSN).