Closed lp closed 6 months ago
{
"resourceType": "AuditEvent",
"type": {
"system": "http://dicom.nema.org/resources/ontology/DCM",
"code": "110107",
"display": "Import"
},
"action": "C",
"recorded": "2017-09-16T00:00:00Z",
"outcome": "0",
"agent": [
{
"type": {
"coding": [
{
"system": "http://dicom.nema.org/resources/ontology/DCM",
"code": "110150",
"display": "Application"
}
],
"text": "Application"
},
"who": {
"identifier": {
"system": "urn:ietf:rfc:3986",
"value": "http://bonfhir.dev/terminology-server-loader"
}
},
"name": "BonFHIR Terminology Server Loader",
"requestor": false
}
],
"source": {
"observer": {
"identifier": {
"system": "urn:ietf:rfc:3986",
"value": "<URL of the FHIR Server>"
}
},
"type": [
{
"system": "http://terminology.hl7.org/CodeSystem/security-source-type",
"code": "4",
"display": "Application Server"
}
]
},
"entity": [
{
"type": {
"system": "http://hl7.org/fhir/resource-types",
"code": "CodeSystem"
},
"lifecycle": {
"system": "http://terminology.hl7.org/CodeSystem/dicom-audit-lifecycle",
"code": "2",
"display": "Import / Copy"
},
"securityLabel": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-Confidentiality",
"code": "U",
"display": "unrestricted"
}
],
"name": "http://hl7.org/fhir/sid/icd-10-cm",
"detail": [
{
"type": "results",
"valueBase64Binary": "eyAic291cmNlIjogIkxWMjY0LnppcCIsICJ2ZXJzaW9uIjogIlI0IiB9"
}
]
},
{
"type": {
"system": "http://hl7.org/fhir/resource-types",
"code": "CodeSystem"
},
"lifecycle": {
"system": "http://terminology.hl7.org/CodeSystem/dicom-audit-lifecycle",
"code": "2",
"display": "Import / Copy"
},
"securityLabel": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-Confidentiality",
"code": "U",
"display": "unrestricted"
}
],
"name": "http://snomed.info/sct",
"detail": [
{
"type": "results",
"valueBase64Binary": "eyAic291cmNlIjogIlNOT01FRF9DVDM1NC56aXAiLCAidmVyc2lvbiI6ICJSNCIgfQ=="
}
]
}
]
}
On peut stocker les détails des actions dans la section entity, et même ajouter du détail de l'exécution dans la partie détail. Ensuite, pour récupérer sur le serveur: /AuditEvent?agent:identifier=http%3A%2F%2Fbonfhir.dev%2Fterminology-server-loader&outcome=0 par exemple. Ou pour avoir le dernier AuditEvent avec le code system: /AuditEvent?agent:identifier=http%3A%2F%2Fbonfhir.dev%2Fterminology-server-loader&outcome=0&entity-name=http%3A%2F%2Fhl7.org%2Ffhir%2Fsid%2Ficd-10-cm
After some testing, it seems searching by AuditEvent's agent identifier is not supported by HAPI, which is consistent with what I'm reading in the FHIR spec http://hl7.org/fhir/R4B/auditevent.html#search
Merged #19
Related issue #20
For the purpose of keeping track of the idempotent task execution through the server
AuditEvent
, implement a getter & a setter function storing & retrieving task types, identifiers & properties.