class SourcePatientIdentifierPIDTransformer implements PIDTransformer {

    @Override
    public void fromHL7(String hl7Data, PatientInfo patientInfo) {
        notNull(patientInfo, "patientInfo cannot be null");
        
        String[] repetitions = PipeParser.split(hl7Data, "~");
        for (String hl7id : repetitions) {
            Identifiable id = Hl7v2Based.parse(hl7id, Identifiable.class);
            if (id != null) {
                patientInfo.getIds().add(id);
            }
        }
    }

}