FHIR🔥 API Extensions


The logs that Ontoserver produces allows an Ontoserver operator to track the searches, lookups, translations, etc, that are conducted. However, it does not allow the operator to track the selection of a code.

To facilitate this, Ontoserver provides an endpoint for the creation of FHIR AuditEvent resources, by posting them as JSON/XML resources to /fhir/AuditEvent. These are not persisted, but are logged in order to allow capture and analysis.

An example of an AuditEvent (in JSON) follows. This event indicates the selection of a code (in this case the SNOMED code for ‘Elbow Region Structure’, following a search (i.e. ValueSet $expand with a filter) of the SNOMED Body Structure implicit ValueSet. More detail about AuditEvent can be found in its definition in the FHIR® Specification

	"resourceType": "AuditEvent",
	"type": {
		"system": "http://ontoserver.csiro.au/CodeSystem/ontoserver-reporting",
		"code": "code-selected",
		"display": "Code Selected"
	"action": "E",
	"recorded": "2017-06-02T22:04:27+11:00",
	"outcome": "0",
	"agent": [{
		"requestor": false
	"source": {
		"site": "IT Department",
		"observer": {
			"display": "John's Laptop"
	"entity": [{
		"what": {
			"identifier": {
				"system": "http://snomed.info/sct",
				"value": "127949000"
		"name": "selected code",
		"detail": [{
				"type": "valueSetExpansionUrl",
				"valueString": "http://snomed.info/sct?fhir_vs=refset/32570061000036105"
				"type": "valueSetExpansionFilter",
				"valueString": "elbow"
				"type": "indexInSearchResult",
				"valueString": "2"