Skip to content

Commit

Permalink
fix: incorrect active participant role ID Code
Browse files Browse the repository at this point in the history
# Problems
- When transferred instance, server should be source
- Both of server and client is not requestor

# Solutions
- If sourceDestSwap, change server to source
- and remove requestor
  • Loading branch information
Chinlinlee committed Aug 28, 2023
1 parent f2a9f38 commit 8323117
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions models/DICOM/audit/auditMessageFactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class AuditMessageFactory {

let theStudy = await participatingObjectFactory.getStudyParticipatingObject();
theStudies.push(theStudy);
patientParticipatingObject ? null: patientParticipatingObject = await participatingObjectFactory.getPatientParticipatingObject();
patientParticipatingObject ? null : patientParticipatingObject = await participatingObjectFactory.getPatientParticipatingObject();
}
// #endregion

Expand Down Expand Up @@ -134,7 +134,7 @@ class AuditMessageFactory {

let theStudy = await participatingObjectFactory.getStudyParticipatingObject();
theStudies.push(theStudy);
patientParticipatingObject ? null: patientParticipatingObject = await participatingObjectFactory.getPatientParticipatingObject();
patientParticipatingObject ? null : patientParticipatingObject = await participatingObjectFactory.getPatientParticipatingObject();
}
// #endregion

Expand Down Expand Up @@ -176,7 +176,7 @@ class AuditMessageFactory {
*/
let theEvent = await this.getGeneralEvent(eventType, eventResult);


/**
Active Participant:
Person and or Process manipulating the data (1..2)
Expand Down Expand Up @@ -204,7 +204,7 @@ class AuditMessageFactory {

let theStudy = await participatingObjectFactory.getStudyParticipatingObject();
theStudies.push(theStudy);
patientParticipatingObject ? null: patientParticipatingObject = await participatingObjectFactory.getPatientParticipatingObject();
patientParticipatingObject ? null : patientParticipatingObject = await participatingObjectFactory.getPatientParticipatingObject();
}

/**
Expand Down Expand Up @@ -330,7 +330,7 @@ class AuditMessageFactory {
await clientBuilder.userIDTypeCode(AuditMessageFactory.userIDTypeCode(clientAETitle));
await clientBuilder.altUserID(clientAETitle);
await clientBuilder.roleIDCode([sourceDestSwap ? eventType.destination : eventType.source]);
await clientBuilder.isRequester();
sourceDestSwap ? null : await clientBuilder.isRequester();
let client = await clientBuilder.build();
// #endregion

Expand All @@ -341,7 +341,7 @@ class AuditMessageFactory {
);
await serverBuilder.userIDTypeCode(AuditMessageFactory.userIDTypeCode(serverAETitle));
await serverBuilder.altUserID(serverAETitle);
await serverBuilder.roleIDCode([sourceDestSwap ? eventType.destination: eventType.source]);
await serverBuilder.roleIDCode([sourceDestSwap ? eventType.source : eventType.destination]);
let server = await serverBuilder.build();
// #endregion

Expand Down

0 comments on commit 8323117

Please sign in to comment.