Skip to content

Commit

Permalink
#359: fix DICOM to FHIR translation
Browse files Browse the repository at this point in the history
  • Loading branch information
unixoid committed Jul 22, 2021
1 parent 0440c86 commit 2e38a85
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ class AuditRecordTranslator implements ToFhirTranslator<AuditMessage> {
static AuditEvent.AuditEventEntityComponent participantObject(ParticipantObjectIdentificationType atna) {
AuditEvent.AuditEventEntityComponent fhir = new AuditEvent.AuditEventEntityComponent()
fhir.what = new Reference().setIdentifier(new Identifier(
value: atna.participantObjectID
/*type: codeableConcept(atna.participantObjectIDTypeCode)*/))
value: atna.participantObjectID,
type: codeableConcept(atna.participantObjectIDTypeCode)))
fhir.type = codingEnum(new AuditEntityTypeEnumFactory().fromCode(Short.toString(atna.participantObjectTypeCode.value)))
fhir.role = codingEnum(new ObjectRoleEnumFactory().fromCode(Short.toString(atna.participantObjectTypeCodeRole.value)))
atna.participantObjectDetails.each {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ class AuditRecordTranslatorTest {
AuditRecordTranslator translator = new AuditRecordTranslator()
AuditEvent auditEvent = translator.translate(auditMessage)
log.debug('FHIR Resource:\n{}\n', FHIR_CONTEXT.newXmlParser().setPrettyPrint(true).encodeResourceToString(auditEvent))

auditEvent.entity.each { entity ->
assert entity.what.identifier.type != null
}
}

static AuditMessage createAuditMessage1() {
Expand Down

0 comments on commit 2e38a85

Please sign in to comment.