clinical:hl7-resource-consent
Licensing
Integration & Verification Tests
API Reference
The resource in this package implements the FHIR 1.6.0 - STU3 Ballot
version of the Consent resource schema, specified at http://hl7.org/fhir/2016Sep/consent.html.
Installation
meteor add clinical:hl7-resource-consent
You may also wish to install the autopublish
package, which will set up a default publication/subscription of the Consents collection for logged in users. You will need to remove the package before going into production, however.
meteor add clinical:autopublish
Example
1var newConsent = { 2 3}; 4Consents.insert(newConsent);
Extending the Schema
If you have extra fields that you would like to attach to the schema, extend the schema like so:
1ExtendedConsentSchema = new SimpleSchema([ 2 ConsentSchema, 3 { 4 "createdAt": { 5 "type": Date, 6 "optional": true 7 } 8 } 9]); 10Consents.attachSchema( ExtendedConsentSchema );
Initialize a Sample Consent
Call the initializeConsent
method to create a sample consent in the Consents collection.
1Meteor.startup(function(){ 2 Meteor.call('initializeConsent'); 3})
Server Methods
This package supports createConsent
, initializeConsent
, and dropConsent
methods.
REST API Points
This package supports the following REST API endpoints. All endpoints require an OAuth token.
GET /fhir-1.6.0/Consent/:id GET /fhir-1.6.0/Consent/:id/_history PUT /fhir-1.6.0/Consent/:id GET /fhir-1.6.0/Consent POST /fhir-1.6.0/Consent/:param POST /fhir-1.6.0/Consent DELETE /fhir-1.6.0/Consent/: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
Acknowledgements
Many thanks to UPenn Medical and the FhirBlocks Project for their generous support in sponsoring this package.