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