How to use the fhir.js function in fhir

To help you get started, we’ve selected a few fhir examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github hms-dbmi / halyos / src / services / fhir / FhirActions.js View on Github external
return (dispatch, getState) => {
    dispatch(requestAllObs(patientID));
    const baseUrl = getURL();

    var mkFhir = require('fhir.js');
    var client = mkFhir({
      baseUrl: getInsecureURL()
    });

    //sort by code
    client
      .fetchAll({type: 'Observation', query: {'subject':patientID, '$sort': [['code','asc']]}})
      .then(function(res){
        var bundle = res;
        let currObsIdx = 0;
        let currObs = bundle[currObsIdx].code.coding[0].code;

        if(!bundle){
          return Promise.resolve();
        }
        var allObsList = [];

fhir

Library that assists in handling FHIR resources. Supports serialization between JSON and XML, validation and FhirPath evaluation.

Apache-2.0
Latest version published 1 year ago

Package Health Score

63 / 100
Full package analysis