Skip to content

Uniformize mapping of ATNA->FHIR translation #470

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

qligier
Copy link
Contributor

@qligier qligier commented Feb 26, 2025

Fixes #469

NB1: about the mapping from RoleIDCode to agent.type, now only the first value is mapped and subsequent ones are lost. We could map additional values to agent.role if necessary?

NB2: about the "IHE Transactions" system: with that fix, we can now generate valid BALP AuditEvents from non-FHIR transactions, but the reverse (generating a valid ATNA AuditMessage from a FHIR transaction) is not true because FHIR transactions directly set the FHIR system, not the DICOM one. I don't know if that's a real usecase.

eit.getEventTypeCode().forEach(etc ->
auditEvent.addSubtype(codedValueTypeToCoding(etc)));
eit.getEventTypeCode().forEach(etc -> {
if ("IHE Transactions".equals(etc.getCodeSystemName())) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"IHE Transactions" and "DCM" code system names appears as literal string far too often throughout IPF. Maybe this should be consolidated as public constant in org.openehealth.ipf.commons.audit.types.CodedValueType ?

if (patReference.getReferenceElement().hasResourceType()) {
entity.setWhat(new Reference(poit.getParticipantObjectID()));
if (isNotBlank(poit.getParticipantObjectID())) {
if (poit.getParticipantObjectTypeCodeRole() == ParticipantObjectTypeCodeRole.Patient) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I cannot remember why this is at all restricted to "Patient" ParticipantObjectTypeCodeRoles. I don't actually see a reason for this distinction.

} else {
entity.setWhat(new Reference().setIdentifier(
new Identifier().setValue(poit.getParticipantObjectID())));
final var reference = new Reference().setDisplay(poit.getParticipantObjectID());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See above; otherwise this should also set identifier rather than display

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Discrepancies in the AuditEvent mappings
2 participants