clinical:hl7-resource-claim

v3.5.7Published 3 years ago

clinical:hl7-resource-claim

Licensing

MIT License

Integration & Verification Tests

CircleCI

API Reference

The resource in this package implements Claim resource schema, specified at https://www.hl7.org/fhir/DSTU2/claim.html.

Installation

meteor add clinical:hl7-resource-claim

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 newClaim = {
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' : 'Claim'
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 Claim

Call the initializePatient method to create a sample claim 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/Claim/:id    
GET    /fhir-1.6.0/Claim/:id/_history  
PUT    /fhir-1.6.0/Claim/:id  
GET    /fhir-1.6.0/Claim  
POST   /fhir-1.6.0/Claim/:param  
POST   /fhir-1.6.0/Claim  
DELETE /fhir-1.6.0/Claim/: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