clinical:hl7-resource-research-study

v3.0.11Published 5 years ago

This package has not had recent updates. Please investigate it's current state before committing to using it in your project.

clinical:hl7-resource-research-study

HL7 FHIR Resource - ResearchStudy


Schema Version

The resource in this package implements the FHIR 1.6.0 - STU3 Ballot version of the ResearchStudy resource schema, specified at http://hl7.org/fhir/2016Sep/researchstudy.html.


Installation

meteor add clinical:hl7-resource-research-study

You may also wish to install the autopublish package, which will set up a default publication/subscription of the ResearchStudies collection for logged in users. You will need to remove the package before going into production, however.

meteor add clinical:autopublish  

Example

1var newResearchStudy = {
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' : 'ResearchStudy'
29};
30ResearchStudies.insert(newResearchStudy);

Extending the Schema

If you have extra fields that you would like to attach to the schema, extend the schema like so:

1ExtendedResearchStudySchema = new SimpleSchema([
2  ResearchStudySchema,
3  {
4    "createdAt": {
5      "type": Date,
6      "optional": true
7    }
8  }
9]);
10ResearchStudies.attachSchema( ExtendedResearchStudySchema );

Initialize a Sample ResearchStudy

Call the initializeResearchStudy method to create a sample research-study in the ResearchStudies collection.

1Meteor.startup(function(){
2  Meteor.call('initializeResearchStudy');
3})

Server Methods

This package supports createResearchStudy, initializeResearchStudy, and dropResearchStudy methods.


REST API Points

This package supports the following REST API endpoints. All endpoints require an OAuth token.

GET    /fhir-1.6.0/ResearchStudy/:id    
GET    /fhir-1.6.0/ResearchStudy/:id/_history  
PUT    /fhir-1.6.0/ResearchStudy/:id  
GET    /fhir-1.6.0/ResearchStudy  
POST   /fhir-1.6.0/ResearchStudy/:param  
POST   /fhir-1.6.0/ResearchStudy  
DELETE /fhir-1.6.0/ResearchStudy/: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

Licensing

MIT License