Skip to main content

FHIRScopeUtils

The FHIRScopeUtils module assists with constructing and parsing scope strings

Build Scope String

const scopes = new FHIRScopes();
scopes.addResourceScope("patient", "Patient", "rs");
scopes.addResourcesScope("patient", "Observation", "cruds");
scopes.addLaunchScope("patient");
scopes.addCustomScope("fhirUser");

const s = scopes.toString();

Parse Scope String

const scopes = FHIRScopes.fromString("fhirUser launch/patient patient/Patient.rs patient/Observation.cruds");