Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
d636785
fix socket key generation which has prevented the socket from being r…
unixoid Jun 21, 2017
eaffe37
#8: first steps
unixoid Jun 22, 2017
ed8e10c
fixing failed unit test
stanojevic-boris Jul 13, 2017
370c6d6
set the DEBUG level to check the cause for failed build
stanojevic-boris Jul 13, 2017
ffc631f
dependencies upgrade
stanojevic-boris Jul 13, 2017
3ec72b4
timeout increased
stanojevic-boris Jul 13, 2017
c3e44b0
try to isolate failing test
stanojevic-boris Jul 17, 2017
5c41008
investigating...
stanojevic-boris Jul 17, 2017
e63a737
investigating...
stanojevic-boris Jul 17, 2017
35eb35f
finally, fixed failing unit test
stanojevic-boris Jul 17, 2017
5fbdc09
try without JMS
stanojevic-boris Jul 17, 2017
ac1c6eb
added JMS test consumer
stanojevic-boris Jul 19, 2017
5b74472
atna jms tests support
stanojevic-boris Jul 19, 2017
6445b9c
jms unit test
stanojevic-boris Jul 20, 2017
18b660a
jms more unit test
stanojevic-boris Jul 20, 2017
01c1848
jms unit test
stanojevic-boris Jul 20, 2017
1b9680c
some versions update
stanojevic-boris Jul 20, 2017
dfed1f2
some plugin versions update
stanojevic-boris Jul 20, 2017
8b28808
more versions update
stanojevic-boris Jul 20, 2017
15c5528
#9: support role ID codes for human users
unixoid Jul 23, 2017
60b0da9
fix ITI-62 participant object attributes
unixoid Jul 23, 2017
c91b00b
infamous backdoor to manually set event timestamp
unixoid Aug 3, 2017
441d0ec
change attribute name @code to @csd-code; closes #10
unixoid Sep 6, 2017
d316a89
[maven-release-plugin] prepare release ipf-oht-atna-3.6-20170926
stanojevic-boris Sep 26, 2017
8c024e9
[maven-release-plugin] prepare for next development iteration
stanojevic-boris Sep 26, 2017
6a8f929
small dependencies update
stanojevic-boris Oct 9, 2017
7ffa4b0
#169:use log4j2
ohr Oct 18, 2017
597a645
#169:log4j2 fixes
ohr Oct 18, 2017
f7d89b3
Merge branch 'master' of https://github.com/oehf/ipf-oht-atna
ohr Oct 18, 2017
7048008
remove warnings
ohr Nov 10, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 48 additions & 4 deletions auditor/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
</parent>

<dependencies>
<!-- dependencies for production -->
<dependency>
<groupId>org.openehealth.ipf.oht.atna</groupId>
<artifactId>ipf-oht-atna-nodeauth</artifactId>
Expand All @@ -35,18 +36,22 @@
<artifactId>netty-all</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-jms_1.1_spec</artifactId>
<scope>provided</scope>
</dependency>

<!-- dependencies for test -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.openehealth.ipf.oht.atna</groupId>
Expand All @@ -59,7 +64,46 @@
<artifactId>commons-io</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-broker</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-pool</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<scope>test</scope>
</dependency>
</dependencies>


<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.20</version>
<configuration>
<reuseForks>false</reuseForks>
</configuration>
</plugin>
</plugins>
</build>

</project>

Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ sendingFacility, sendingApp, getSystemAltUserId(), getSystemNetworkId(),
receivingFacility, receivingApp, null, EventUtils.getAddressForUrl(pixManagerUri, false),
getHumanRequestor(),
hl7MessageControlId,
new String[] {patientId}, null);
new String[] {patientId}, null, null);
}

/**
Expand Down Expand Up @@ -101,7 +101,7 @@ sendingFacility, sendingApp, getSystemAltUserId(), getSystemNetworkId(),
receivingFacility, receivingApp, null, EventUtils.getAddressForUrl(pixManagerUri, false),
getHumanRequestor(),
hl7MessageControlId,
new String[] {patientId}, null);
new String[] {patientId}, null, null);
}

/**
Expand Down Expand Up @@ -132,6 +132,6 @@ sendingFacility, sendingApp, getSystemAltUserId(), getSystemNetworkId(),
receivingFacility, receivingApp, null, EventUtils.getAddressForUrl(pixManagerUri, false),
getHumanRequestor(),
hl7MessageControlId,
new String[] {patientId}, null);
new String[] {patientId}, null, null);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ sendingFacility, sendingApp, getSystemAltUserId(), getSystemNetworkId(),
receivingFacility, receivingApp, null, EventUtils.getAddressForUrl(pixManagerUri, false),
getHumanRequestor(),
hl7MessageControlId, hl7QueryParameters,
patientIds, null);
patientIds, null, null);
}

/**
Expand All @@ -91,12 +91,16 @@ sendingFacility, sendingApp, getSystemAltUserId(), getSystemNetworkId(),
* @param hl7MessageId The HL7 message.id
* @param hl7QueryParameters The HL7 query parameters
* @param patientIds List of patient IDs that were seen in this transaction
* @param purposesOfUse purpose of use codes (may be taken from XUA token)
* @param userRoles roles of the human user (may be taken from XUA token)
*/
public void auditPDQQueryV3Event(RFC3881EventOutcomeCodes eventOutcome,
String pixManagerUri, String receivingFacility, String receivingApp,
String sendingFacility, String sendingApp,
String hl7MessageId, String hl7QueryParameters,
String[] patientIds, List<CodedValueType> purposesOfUse)
String[] patientIds,
List<CodedValueType> purposesOfUse,
List<CodedValueType> userRoles)
{
if (!isAuditorEnabled()) {
return;
Expand All @@ -107,7 +111,7 @@ sendingFacility, sendingApp, getSystemAltUserId(), getSystemNetworkId(),
receivingFacility, receivingApp, null, EventUtils.getAddressForUrl(pixManagerUri, false),
getHumanRequestor(),
hl7MessageId, hl7QueryParameters,
patientIds, purposesOfUse);
patientIds, purposesOfUse, userRoles);
}

/**
Expand Down Expand Up @@ -139,7 +143,7 @@ sendingFacility, sendingApp, getSystemAltUserId(), getSystemNetworkId(),
receivingFacility, receivingApp, null, EventUtils.getAddressForUrl(pixManagerUri, false),
getHumanRequestor(),
hl7MessageControlId, hl7QueryParameters,
patientIds, null);
patientIds, null, null);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ public abstract class PIXAuditor extends IHEAuditor
* @param hl7MessageId The HL7 Message ID (v2 from the MSH segment field 10, v3 from message.Id)
* @param hl7QueryParameters The HL7 Query Parameters from the QPD segment
* @param patientIds List of patient IDs that were seen in this transaction
* @param purposesOfUse purpose of use codes (may be taken from XUA token)
* @param userRoles roles of the human user (may be taken from XUA token)
*/
protected void auditQueryEvent(boolean systemIsSource,
IHETransactionEventTypeCodes transaction, RFC3881EventOutcomeCodes eventOutcome,
Expand All @@ -57,7 +59,8 @@ protected void auditQueryEvent(boolean systemIsSource,
String humanRequestor,
String hl7MessageId, String hl7QueryParameters,
String[] patientIds,
List<CodedValueType> purposesOfUse)
List<CodedValueType> purposesOfUse,
List<CodedValueType> userRoles)
{
// Create query event
QueryEvent queryEvent = new QueryEvent(systemIsSource, eventOutcome, transaction, purposesOfUse);
Expand All @@ -66,7 +69,7 @@ protected void auditQueryEvent(boolean systemIsSource,
queryEvent.addSourceActiveParticipant(EventUtils.concatHL7FacilityApplication(sourceFacility,sourceApp), sourceAltUserId, null, sourceNetworkId, true);
// Set the human requestor active participant
if (!EventUtils.isEmptyOrNull(humanRequestor)) {
queryEvent.addHumanRequestorActiveParticipant(humanRequestor, null, null, null);
queryEvent.addHumanRequestorActiveParticipant(humanRequestor, null, null, userRoles);
}
// Set the destination active participant
queryEvent.addDestinationActiveParticipant(EventUtils.concatHL7FacilityApplication(destinationFacility,destinationApp), destinationAltUserId, null, destinationNetworkId, false);
Expand Down Expand Up @@ -111,6 +114,8 @@ protected void auditQueryEvent(boolean systemIsSource,
* @param humanRequestor Identity of the human that initiated the transaction (if known)
* @param hl7MessageId The HL7 Message ID (v2 from the MSH segment field 10, v3 from message.Id)
* @param patientIds List of patient IDs that were seen in this transaction
* @param purposesOfUse purpose of use codes (may be taken from XUA token)
* @param userRoles roles of the human user (may be taken from XUA token)
*/
protected void auditPatientRecordEvent(boolean systemIsSource,
IHETransactionEventTypeCodes transaction, RFC3881EventOutcomeCodes eventOutcome, RFC3881EventActionCodes eventActionCode,
Expand All @@ -119,7 +124,8 @@ protected void auditPatientRecordEvent(boolean systemIsSource,
String humanRequestor,
String hl7MessageId,
String patientIds[],
List<CodedValueType> purposesOfUse)
List<CodedValueType> purposesOfUse,
List<CodedValueType> userRoles)
{
// Create Patient Record event
PatientRecordEvent patientEvent = new PatientRecordEvent(systemIsSource, eventOutcome, eventActionCode, transaction, purposesOfUse);
Expand All @@ -128,7 +134,7 @@ protected void auditPatientRecordEvent(boolean systemIsSource,
patientEvent.addSourceActiveParticipant(EventUtils.concatHL7FacilityApplication(sourceFacility,sourceApp), sourceAltUserId, null, sourceNetworkId, true);
// Set the human requestor active participant
if (!EventUtils.isEmptyOrNull(humanRequestor)) {
patientEvent.addHumanRequestorActiveParticipant(humanRequestor, null, null, null);
patientEvent.addHumanRequestorActiveParticipant(humanRequestor, null, null, userRoles);
}
// Set the destination active participant
patientEvent.addDestinationActiveParticipant(EventUtils.concatHL7FacilityApplication(destinationFacility,destinationApp), destinationAltUserId, null, destinationNetworkId, false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ sendingFacility, sendingApp, getSystemAltUserId(), getSystemNetworkId(),
receivingFacility, receivingApp, null, EventUtils.getAddressForUrl(pixManagerUri, false),
getHumanRequestor(),
hl7MessageControlId, hl7QueryParameters,
patientIds, null);
patientIds, null, null);
}

/**
Expand All @@ -93,12 +93,16 @@ sendingFacility, sendingApp, getSystemAltUserId(), getSystemNetworkId(),
* @param hl7MessageId The HL7 message.id
* @param hl7QueryParameters The HL7 query parameters
* @param patientIds List of patient IDs that were seen in this transaction
* @param purposesOfUse purpose of use codes (may be taken from XUA token)
* @param userRoles roles of the human user (may be taken from XUA token)
*/
public void auditPIXQueryV3Event(RFC3881EventOutcomeCodes eventOutcome,
String pixManagerUri, String receivingFacility, String receivingApp,
String sendingFacility, String sendingApp,
String hl7MessageId, String hl7QueryParameters,
String[] patientIds, List<CodedValueType> purposesOfUse)
String[] patientIds,
List<CodedValueType> purposesOfUse,
List<CodedValueType> userRoles)
{
if (!isAuditorEnabled()) {
return;
Expand All @@ -109,7 +113,7 @@ sendingFacility, sendingApp, getSystemAltUserId(), getSystemNetworkId(),
receivingFacility, receivingApp, null, EventUtils.getAddressForUrl(pixManagerUri, false),
getHumanRequestor(),
hl7MessageId, hl7QueryParameters,
patientIds, purposesOfUse);
patientIds, purposesOfUse, userRoles);
}

/**
Expand Down Expand Up @@ -140,7 +144,7 @@ public void auditUpdateNotificationEvent(RFC3881EventOutcomeCodes eventOutcome,
receivingFacility, receivingApp, getSystemAltUserId(), getSystemNetworkId(),
null,
hl7MessageControlId,
patientIds, null);
patientIds, null, null);
}

/**
Expand All @@ -155,13 +159,16 @@ receivingFacility, receivingApp, getSystemAltUserId(), getSystemNetworkId(),
* @param sendingApp The HL7 sending application
* @param hl7MessageId The HL7 message.id
* @param patientIds List of patient IDs that were seen in this transaction
* @param purposesOfUse purpose of use codes (may be taken from XUA token)
* @param userRoles roles of the human user (may be taken from XUA token)
*/
public void auditUpdateNotificationV3Event(RFC3881EventOutcomeCodes eventOutcome,
String pixMgrIpAddress, String sendingFacility, String sendingApp,
String receivingFacility, String receivingApp,
String hl7MessageId,
String[] patientIds,
List<CodedValueType> purposesOfUse)
List<CodedValueType> purposesOfUse,
List<CodedValueType> userRoles)
{
if (!isAuditorEnabled()) {
return;
Expand All @@ -172,6 +179,6 @@ public void auditUpdateNotificationV3Event(RFC3881EventOutcomeCodes eventOutcome
receivingFacility, receivingApp, getSystemAltUserId(), getSystemNetworkId(),
null,
hl7MessageId,
patientIds, purposesOfUse);
patientIds, purposesOfUse, userRoles);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public void auditCreatePatientRecordEvent(RFC3881EventOutcomeCodes eventOutcome,
receivingFacility, receivingApp, getSystemAltUserId(), EventUtils.getAddressForUrl(pixManagerUri, false),
null,
hl7MessageControlId,
new String[] {patientId}, null);
new String[] {patientId}, null, null);
}

/**
Expand Down Expand Up @@ -106,7 +106,7 @@ public void auditDeletePatientRecordEvent(RFC3881EventOutcomeCodes eventOutcome,
receivingFacility, receivingApp, getSystemAltUserId(), EventUtils.getAddressForUrl(pixManagerUri, false),
null,
hl7MessageControlId,
new String[] {patientId}, null);
new String[] {patientId}, null, null);
}

/**
Expand Down Expand Up @@ -137,7 +137,7 @@ public void auditUpdatePatientRecordEvent(RFC3881EventOutcomeCodes eventOutcome,
receivingFacility, receivingApp, getSystemAltUserId(), EventUtils.getAddressForUrl(pixManagerUri, false),
null,
hl7MessageControlId,
new String[] {patientId}, null);
new String[] {patientId}, null, null);
}

/**
Expand Down Expand Up @@ -170,7 +170,7 @@ public void auditPDQQueryEvent(RFC3881EventOutcomeCodes eventOutcome,
receivingFacility, receivingApp, getSystemAltUserId(), EventUtils.getAddressForUrl(pixManagerUri, false),
null,
hl7MessageControlId, hl7QueryParameters,
patientIds, null);
patientIds, null, null);
}

/**
Expand Down Expand Up @@ -203,7 +203,7 @@ public void auditPDVQQueryEvent(RFC3881EventOutcomeCodes eventOutcome,
receivingFacility, receivingApp, getSystemAltUserId(), EventUtils.getAddressForUrl(pixManagerUri, false),
null,
hl7MessageControlId, hl7QueryParameters,
patientIds, null);
patientIds, null, null);
}

/**
Expand Down Expand Up @@ -235,7 +235,7 @@ public void auditPIXQueryEvent(RFC3881EventOutcomeCodes eventOutcome,
receivingFacility, receivingApp, getSystemAltUserId(), EventUtils.getAddressForUrl(pixManagerUri, false),
null,
hl7MessageControlId, hl7QueryParameters,
patientIds, null);
patientIds, null, null);
}

/**
Expand Down Expand Up @@ -268,6 +268,6 @@ sendingFacility, sendingApp, getSystemAltUserId(), pixMgrIpAddress,
receivingFacility, receivingApp, null, EventUtils.getAddressForUrl(consumerEndpointUri, false),
null,
hl7MessageControlId,
patientIds, null);
patientIds, null, null);
}
}
Loading