New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@medrecord/medquery

Package Overview
Dependencies
Maintainers
4
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@medrecord/medquery

MEDrecord Angular Services to deal with medical data

  • 1.0.24
  • latest
  • npm
  • Socket score

Version published
Maintainers
4
Created
Source

MEDrecord Query

Angular Services to deal with medical data

Installation

To install this library, run:

$ npm install @medrecord/medquery --save

Consuming your library

Once you have published your library to npm, you can import your library in any Angular application by running:

$ npm install @medrecord/medquery

and then from your Angular AppModule:

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';

import { AppComponent } from './app.component';

// Import your library
import { MedqueryModule } from '@medrecord/medquery';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    MedqueryModule.forRoot({apiUrl: 'https://your-backend/api'})
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

Usage

Add medical data (composition)

import { BloodPressureComposition, BloodPressureService } from '@medrecord/medquery';

class YourComponentClass {

  constructor(private bp: BloodPressureService) {

  }

  addBloodPressureData() {

    const composition: BloodPressureComposition = {
      ehrId: yourTargetEhrId,
      metadata: {
        territory: yourTargetCountryCode,
        language: yourTargetLanguage,
        context: {
          startTime: moment().format(),
          location: yourTargetLocation,
          healthCareFacility: {
            name: yourTargetHealthCareFacilityName,
            identifier: yourTargetHealthCareFacilityId
          }
        },
        composer: {
          identifier: yourTargetPersonMvUid || 'ANONYMOUS',
          name: yourTargetPersonDisplayName || 'ANONYMOUS'
        }
      },
      data: {
        bloodPressure: {
          diastolic: bloodPressureDiastolicValueHere,
          systolic: bloodPressureSystolicValueHere
        },
        hearthRatePulse: {
          rate: heartRateValueHere
        }
      }
    };

    // Add the composition
    this.bp.addComposition(composition).subscribe(
      res => console.log('success', res),
      err => console.log('error', err)
    );

  }

}

Read medical data

By EHR ID and Composition ID
import { CompositionService } from '@medrecord/medquery';

class YourComponentClass {

  constructor(private cs: CompositionService) {

  }

  readCompositionById() {

    const params = {
      ehrId: yourTargetEhrId,
      compositionId: yourTargetCompositionId,
      format: 'ECISFLAT' // options are: 'FLAT', 'ECISFLAT', 'RAW' or 'XML'
    };

    this.cs.getComposition(params).subscribe(
      res => console.log('success', res),
      err => console.log('error', err)
    );

  }

}
By EHR ID and Template ID

Coming soon

By Template ID (all EHR IDs)

Coming soon

Development

To generate all *.js, *.d.ts and *.metadata.json files:

$ npm run build

To lint all *.ts files:

$ npm run lint

License

LGPL-2.0 © MEDrecord

Keywords

FAQs

Package last updated on 14 Mar 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc