cllinical:hl7-resource-communication
Licensing
Integration & Verification Tests
API Reference
This package implements the FHIR Communication resource schema provided at https://www.hl7.org/fhir/DSTU2/communication.html.
Installation
meteor add dpdonohue:hl7-resource-communication
You may also wish to install the autopublish
package, which will set up a default publication/subscription of the Communications collection for logged in users. You will need to remove the package before going into production, however.
meteor add clinical:autopublish
Example
1//copied from https://www.hl7.org/fhir/communication-example.json.html 2var newCommunication = { 3 "resourceType": "Communication", 4 "id": "example", 5 "text": { 6 "status": "generated", 7 "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\">Patient has very high serum potassium</div>" 8 }, 9 "identifier": [ 10 { 11 "type": { 12 "text": "Paging System" 13 }, 14 "system": "urn:oid:1.3.4.5.6.7", 15 "value": "2345678901" 16 } 17 ], 18 "definition": [ 19 { 20 "display": "Hyperkalemia" 21 } 22 ], 23 "partOf": [ 24 { 25 "display": "Serum Potassium Observation" 26 } 27 ], 28 "status": "completed", 29 "category": [ 30 { 31 "coding": [ 32 { 33 "system": "http://acme.org/messagetypes", 34 "code": "Alert" 35 } 36 ], 37 "text": "Alert" 38 } 39 ], 40 "medium": [ 41 { 42 "coding": [ 43 { 44 "system": "http://hl7.org/fhir/v3/ParticipationMode", 45 "code": "WRITTEN", 46 "display": "written" 47 } 48 ], 49 "text": "written" 50 } 51 ], 52 "subject": { 53 "reference": "Patient/example" 54 }, 55 "recipient": [ 56 { 57 "reference": "Practitioner/example" 58 } 59 ], 60 "context": { 61 "reference": "Encounter/example" 62 }, 63 "sent": "2014-12-12T18:01:10-08:00", 64 "received": "2014-12-12T18:01:11-08:00", 65 "sender": { 66 "reference": "Device/f001" 67 }, 68 "payload": [ 69 { 70 "contentString": "Patient 1 has a very high serum potassium value (7.2 mmol/L on 2014-Dec-12 at 5:55 pm)" 71 }, 72 { 73 "contentReference": { 74 "display": "Serum Potassium Observation" 75 } 76 } 77 ] 78}; 79 80Communications.insert(newCommunication);
Extending the Schema
If you have extra fields that you would like to attach to the schema, extend the schema like so:
1ExtendedCommunicationSchema = new SimpleSchema([ 2 CommunicationSchema, 3 { 4 "createdAt": { 5 "type": Date, 6 "optional": true 7 } 8 } 9]); 10Communications.attachSchema( ExtendedCommunicationSchema );
Initialize a Sample Communication
Call the initializeCommunication
method to create a sample communication in the Communications collection.
1Meteor.startup(function(){ 2 Meteor.call('initializeCommunication'); 3})
Server Methods
This package supports createCommunication
, initializeCommunication
, and dropCommunication
methods.
REST API Points
This package supports the following REST API endpoints. All endpoints require an OAuth token.
GET /fhir-1.6.0/Communication/:id GET /fhir-1.6.0/Communication/:id/_history PUT /fhir-1.6.0/Communication/:id GET /fhir-1.6.0/Communication POST /fhir-1.6.0/Communication/:param POST /fhir-1.6.0/Communication DELETE /fhir-1.6.0/Communication/: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
TBD.
Acknowledgements
Many thanks to Dr. David Donohue for sponsoring this package.