AuditDataTransformHelper { public static String createCompositePatientIdFromAssertion(final UserType userInfo, final String patientId) { String communityId = null; String compPatientId; if (userInfo != null && userInfo.getOrg() != null && userInfo.getOrg().getHomeCommunityId() != null) { communityId = userInfo.getOrg().getHomeCommunityId(); } compPatientId = AuditDataTransformHelper.createCompositePatientId(communityId, patientId); return compPatientId; }  static EventIdentificationType createEventIdentification(final String actionCode, final Integer eventOutcome,
        final CodedValueType eventId); static CodedValueType createEventId(final String eventCode, final String eventCodeSys,
        final String eventCodeSysName, final String dispName); static CodedValueType createCodeValueType(final String code, final String codeSys, final String codeSysName,
        final String dispName); static AuditMessageType.ActiveParticipant createActiveParticipantFromUser(final UserType userInfo,
        final Boolean userIsReq); static AuditMessageType.ActiveParticipant createActiveParticipant(final String userId,
        final String altUserId, final String userName, final Boolean userIsReq); static AuditSourceIdentificationType createAuditSourceIdentificationFromUser(final UserType userInfo); static AuditSourceIdentificationType createAuditSourceIdentification(final String communityId,
        final String communityName); static ParticipantObjectIdentificationType createParticipantObjectIdentification(final String patientId); static ParticipantObjectIdentificationType createDocumentParticipantObjectIdentification(
        final String documentId); static void logAuditMessage(final AuditMessageType message); static ExternalIdentifierType findSingleExternalIdentifier(final List<ExternalIdentifierType> olExtId,
        final String sIdentScheme); static String findSingleExternalIdentifierAndExtractValue(final List<ExternalIdentifierType> olExtId,
        final String sIdentScheme); static String createCompositePatientId(final String assigningAuthId, final String patientId); static String createCompositePatientIdFromAssertion(final UserType userInfo, final String patientId);  }
@Test public void testCreateCompositePatientIdFromAssertion() { HomeCommunityType home = new HomeCommunityType(); home.setHomeCommunityId("2.16.840.1.113883.3.200"); home.setName("Federal - VA"); UserType userInfo = new UserType(); userInfo.setOrg(home); String uniquePatientId = "56765"; String expResult = uniquePatientId + "^^^&" + userInfo.getOrg().getHomeCommunityId() + "&ISO"; String result = AuditDataTransformHelper.createCompositePatientIdFromAssertion(userInfo, uniquePatientId); assertEquals(expResult, result); }