How to use fhirclient - 1 common examples

To help you get started, we’ve selected a few fhirclient 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 HL7-DaVinci / dtr / src / index.js View on Github external
appContext = {
            template: appString.split("&")[0].split("=")[1],
            request: JSON.parse(appString.split("&")[1].split("=")[1].replace(/\\/g,"")),
            filepath: appString.split("&")[2].split("=")[1]
          }
      } catch (e) {
          alert("error parsing app context, using default")
          appContext = {
            template: "urn:hl7:davinci:crd:home-oxygen-questionnaire",
            request: JSON.parse('{\\"resourceType\\":\\"DeviceRequest\\",\\"id\\":\\"ecea4560-e72c-4f69-8efd-b0f240ecef40\\",\\"meta\\":{\\"profile\\":[\\"http:\\/\\/hl7.org\\/fhir\\/us\\/davinci-crd\\/STU3\\/StructureDefinition\\/profile-devicerequest-stu3\\"]},\\"status\\":\\"draft\\",\\"codeCodeableConcept\\":{\\"coding\\":[{\\"system\\":\\"https:\\/\\/bluebutton.cms.gov\\/resources\\/codesystem\\/hcpcs\\",\\"code\\":\\"E0424\\"}]},\\"subject\\":{\\"reference\\":\\"Patient\\/e3uD6HlZwY69BYkprsNDh2Du7KroLDCIzX8uiCuKkahM3\\"},\\"authoredOn\\":\\"2019-12-30\\",\\"performer\\":{\\"reference\\":\\"PractitionerRole\\/100163717310\\"}}'.replace(/\\/g,"")),
            filepath: '../../getfile/cms/hcpcs/E0424'
            }
        }

      
        var smart = FHIR.client({
        serverUrl: serviceUri,
        patientId: auth_response.patient,
        tokenResponse: {
            type: "bearer",
            access_token: auth_response.access_token,
            patient: auth_response.patient,
        }
        });
        alert("rendering app");
        ReactDOM.render(

fhirclient

JavaScript client for Fast Healthcare Interoperability Resources

Apache-2.0
Latest version published 4 months ago

Package Health Score

76 / 100
Full package analysis

Popular fhirclient functions