plasma-fhir
  • What is Plasma FHIR?
  • Docs
    • Guides
      • Getting Started
      • Create an Epic Patient App
      • Create an Epic Clinician App
      • Create an Epic Backend App
      • Testing with SMART Health IT Sandbox
      • Developing/Contributing to Plasma FHIR
  • Packages
    • create-plasma-app
    • plasma-fhir-app-utils
      • PlasmaFHIRApi
      • Resources
      • PlasmaFHIRUtils
      • Conversions
      • DateTimeUtils
    • plasma-fhir-backend-utils
    • plasma-fhir-react-client-context
    • plasma-fhir-react-components
  • Sample Apps
    • Plasma Portal
    • Plasma Portal Lite
    • Family History Editor
    • Playground
Powered by GitBook
On this page
  • getConformanceStatementURL
  • getConformanceStatement
  • getConformanceStatementPatientSearchParam
  1. Packages
  2. plasma-fhir-app-utils

PlasmaFHIRUtils

This is a set of somewhat random FHIR-related utility functions. If you are using the PlasmaFHIRApi, then you won't need to use these functions as the API will use them internally for you.

import { PlasmaFHIRUtils } from "plasma-fhir-app-utils";

getConformanceStatementURL

Returns the URL of the "metadata" endpoint for a given FHIR server.

const url = PlasmaFHIRUtils.getConformanceStatementURL(baseURL);

getConformanceStatement

Returns the full "Conformance Statement" as a JSON object

const conformance = await PlasmaFHIRUtils.getConformanceStatement(baseURL);

getConformanceStatementPatientSearchParam

For a given FHIR resource, returns the search param that should be used to identify the patient, or null if one could not be found. You can also cache the "Conformance Statement" if you need to call this multiple times.

This is used by the PlasmaFHIRApi whenever you call readPatientResource.

const confStatement = {};
const searchParam = await PlasmaFHIRUtils.getConformanceStatementPatientSearchParam(
    baseURL, "Immunization", confStatement);

PreviousResourcesNextConversions

Last updated 2 years ago