clinical:hl7-resource-audit-event
Licensing
Integration & Verification Tests
API Reference
This package implements the FHIR List resource schema provided at https://www.hl7.org/fhir/DSTU2/auditevent.html.
Installation
# to add hl7 resource schemas and rest routes meteor add clinical:hl7-resource-audit-event # to initialize default data INITIALIZE=true meteor
You may also wish to install the autopublish
package, which will set up a default publication/subscription of the AuditEvents collection for logged in users. You will need to remove the package before going into production, however.
meteor add clinical:autopublish
Example
For more examples, see https://www.hl7.org/fhir/auditevent-examples.html.
1var newAuditEvent = { 2 "resourceType": "AuditEvent", 3 "type": { 4 "system": "http://dicom.nema.org/resources/ontology/DCM", 5 "code": "110100", 6 "display": "Application Activity" 7 }, 8 "subtype": [ 9 { 10 "system": "http://dicom.nema.org/resources/ontology/DCM", 11 "code": "110120", 12 "display": "Application Start" 13 } 14 ], 15 "action": "E", 16 "recorded": "2012-10-25T22:04:27+11:00", 17 "outcome": "0", 18 "agent": [ 19 { 20 "role": [ 21 { 22 "coding": [ 23 { 24 "system": "http://dicom.nema.org/resources/ontology/DCM", 25 "code": "110153", 26 "display": "Source Role ID" 27 } 28 ] 29 } 30 ], 31 "userId": { 32 "value": "2.16.840.1.113883.4.2|2.16.840.1.113883.4.2" 33 }, 34 "altId": "6580", 35 "requestor": false, 36 "network": { 37 "address": "Workstation1.ehr.familyclinic.com", 38 "type": "1" 39 } 40 } 41 ], 42 "source": { 43 "site": "Development", 44 "identifier": { 45 "value": "Grahame's Laptop" 46 }, 47 "type": [ 48 { 49 "system": "http://dicom.nema.org/resources/ontology/DCM", 50 "code": "110122", 51 "display": "Login" 52 } 53 ] 54 }, 55 "entity": [] 56}; 57AuditEvents.insert(newAuditEvent);
Extending the Schema
If you have extra fields that you would like to attach to the schema, extend the schema like so:
1ExtendedAuditEventSchema = new SimpleSchema([ 2 AuditEventSchema, 3 { 4 "createdAt": { 5 "type": Date, 6 "optional": true 7 } 8 } 9]); 10AuditEvents.attachSchema( ExtendedAuditEventSchema );
Initialize a Sample AuditEvent
Call the initializeAuditEvent
method to create a sample patient in the AuditEvents collection.
1Meteor.startup(function(){ 2 Meteor.call('initializeAuditEvent'); 3})
Server Methods
This package supports createAuditEvent
, initializeAuditEvent
, and dropAuditEvent
methods.
REST API Points
This package supports the following REST API endpoints. All endpoints require an OAuth token.
GET /fhir-1.6.0/AuditEvent/:id GET /fhir-1.6.0/AuditEvent/:id/_history PUT /fhir-1.6.0/AuditEvent/:id GET /fhir-1.6.0/AuditEvent POST /fhir-1.6.0/AuditEvent/:param POST /fhir-1.6.0/AuditEvent DELETE /fhir-1.6.0/AuditEvent/:id
If you would like to test the REST API without the OAuth infrastructure, launch the app with the NOAUTH
environment variable, or set Meteor.settings.private.disableOauth
to true in you settings file.
NOAUTH=true meteor
Conformance Statement
This package conforms to version FHIR 3.0.0
, as per the Touchstone testing utility.
Utilities
If you're working with HL7 FHIR Resources, we recommend using Postman.