clinical:hl7-resource-patient
Licensing
Integration & Verification Tests
API Reference
The resource in this package implements Patient resource schema, specified at https://www.hl7.org/fhir/DSTU2/patient.html.
Installation
meteor add clinical:hl7-resource-patient
You may also wish to install the autopublish
package, which will set up a default publication/subscription of the Patients collection for logged in users. You will need to remove the package before going into production, however.
meteor add clinical:autopublish
Example
1var newPatient = { 2 'name' : [ 3 { 4 'text' : 'Jane Doe', 5 'given' : 'Jane', 6 'family' : 'Doe', 7 'resourceType' : 'HumanName' 8 } 9 ], 10 'active' : true, 11 'gender' : 'female', 12 'identifier' : [{ 13 'use' : 'usual', 14 'type' : { 15 text: 'Medical record number', 16 'coding' : [ 17 { 18 'system' : 'http://hl7.org/fhir/v2/0203', 19 'code' : 'MR' 20 } 21 ] 22 }, 23 'system' : 'urn:oid:1.2.36.146.595.217.0.1', 24 'value' : '123', 25 'period' : {} 26 }], 27 'birthdate' : new Date(1970, 1, 25), 28 'resourceType' : 'Patient' 29}; 30Patients.insert(newPatient);
Extending the Schema
If you have extra fields that you would like to attach to the schema, extend the schema like so:
1ExtendedPatientSchema = new SimpleSchema([ 2 PatientSchema, 3 { 4 "createdAt": { 5 "type": Date, 6 "optional": true 7 } 8 } 9]); 10Patients.attachSchema( ExtendedPatientSchema );
Initialize a Sample Patient
Call the initializePatient
method to create a sample patient in the Patients collection.
1Meteor.startup(function(){ 2 Meteor.call('initializePatient'); 3})
Server Methods
This package supports createPatient
, initializePatient
, and dropPatient
methods.
REST API Points
This package supports the following REST API endpoints. All endpoints require an OAuth token.
GET /fhir-1.6.0/Patient/:id GET /fhir-1.6.0/Patient/:id/_history PUT /fhir-1.6.0/Patient/:id GET /fhir-1.6.0/Patient POST /fhir-1.6.0/Patient/:param POST /fhir-1.6.0/Patient DELETE /fhir-1.6.0/Patient/: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 1.6.0 - STU3 Ballot
, as per the Touchstone testing utility.