We value your privacy

We use cookies to enhance your browsing experience, serve personalised ads or content, and analyse our traffic. By clicking "Accept All", you consent to our use of cookies.

CustomiseReject AllAccept All

Powered by [Visit CookieYes website](https://www.cookieyes.com/product/cookie-consent/?ref=cypbcyb&utm_source=cookie-banner&utm_medium=fl-branding)

Customise Consent Preferences

We use cookies to help you navigate efficiently and perform certain functions. You will find detailed information about all cookies under each consent category below.

The cookies that are categorised as "Necessary" are stored on your browser as they are essential for enabling the basic functionalities of the site. ... Show more

NecessaryAlways Active

Necessary cookies are required to enable the basic features of this site, such as providing secure log-in or adjusting your consent preferences. These cookies do not store any personally identifiable data.

No cookies to display.

Functional

Functional cookies help perform certain functionalities like sharing the content of the website on social media platforms, collecting feedback, and other third-party features.

- Cookie

\_octo

- Duration

1 year

- Description

No description available.

- Cookie

logged\_in

- Duration

1 year

- Description

No description available.

- Cookie

VISITOR\_PRIVACY\_METADATA

- Duration

6 months

- Description

YouTube sets this cookie to store the user's cookie consent state for the current domain.

- Cookie

\_\_Secure-YNID

- Duration

6 months

- Description

YouTube cookie used to protect user security and prevent fraud, especially during the login process.

- Cookie

\_\_Secure-ROLLOUT\_TOKEN

- Duration

6 months

- Description

YouTube sets this cookie to manage feature rollout and experimentation. It helps Google control which new features or interface changes are shown to users as part of testing and staged rollouts, ensuring consistent experience for a given user during an experiment.

- Cookie

\_\_Secure-YEC

- Duration

past

- Description

Description is currently not available.

- Cookie

\_gh\_sess

- Duration

session

- Description

GitHub sets this cookie for temporary application and framework state between pages like what step the user is on in a multiple step form.

- Cookie

YSC

- Duration

session

- Description

YSC cookie is set by Youtube and is used to track the views of embedded videos on Youtube pages.

- Cookie

VISITOR\_INFO1\_LIVE

- Duration

6 months

- Description

A cookie set by YouTube to measure bandwidth that determines whether the user gets the new or old player interface.

- Cookie

ytidb::LAST\_RESULT\_ENTRY\_KEY

- Duration

Never Expires

- Description

The cookie ytidb::LAST\_RESULT\_ENTRY\_KEY is used by YouTube to store the last search result entry that was clicked by the user. This information is used to improve the user experience by providing more relevant search results in the future.

Analytics

Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics such as the number of visitors, bounce rate, traffic source, etc.

- Cookie

\_ga

- Duration

1 year 1 month 4 days

- Description

Google Analytics sets this cookie to calculate visitor, session and campaign data and track site usage for the site's analytics report. The cookie stores information anonymously and assigns a randomly generated number to recognise unique visitors.

- Cookie

\_ga\_\*

- Duration

1 year 1 month 4 days

- Description

Google Analytics sets this cookie to store and count page views.

Performance

Performance cookies are used to understand and analyse the key performance indexes of the website which helps in delivering a better user experience for the visitors.

No cookies to display.

Advertisement

Advertisement cookies are used to provide visitors with customised advertisements based on the pages you visited previously and to analyse the effectiveness of the ad campaigns.

No cookies to display.

Uncategorised

Other uncategorised cookies are those that are being analysed and have not been classified into a category as yet.

No cookies to display.

Reject AllSave My PreferencesAccept All

Powered by [Visit CookieYes website](https://www.cookieyes.com/product/cookie-consent/?ref=cypbcyb&utm_source=cookie-banner&utm_medium=sl-branding)

[Skip to main content](/content/docs/sdk/core#__docusaurus_skipToContent_fallback/index.html)

On this page

[Home](/content/docs/sdk/index.html) \> [@medplum/core](/content/docs/sdk/core/index.html)

## core package [​](/content/docs/sdk/core\#core-package "Direct link to core package"/index.html)

## Classes [​](/content/docs/sdk/core\#classes "Direct link to Classes"/index.html)

| Class | Description |
| --- | --- |
| [AndAtom](/content/docs/sdk/core.andatom) | 6.5.1. and Returns true if both operands evaluate to true, false if either operand evaluates to false, and the empty collection otherwise. |
| [ArithmeticOperatorAtom](/content/docs/sdk/core.arithmeticoperatoratom) |  |
| [AsAtom](/content/docs/sdk/core.asatom) |  |
| [ClientStorage](/content/docs/sdk/core.clientstorage) | The ClientStorage class is a utility class for storing strings and objects.<br>When using MedplumClient in the browser, it will be backed by browser localStorage.<br>When Using MedplumClient in the server, it will be backed by the MemoryStorage class. For example, the Medplum CLI uses `FileSystemStorage`. |
| [ConcatAtom](/content/docs/sdk/core.concatatom) |  |
| [ContainsAtom](/content/docs/sdk/core.containsatom) |  |
| [DataSampler](/content/docs/sdk/core.datasampler) |  |
| [DotAtom](/content/docs/sdk/core.dotatom) |  |
| [EmptySetAtom](/content/docs/sdk/core.emptysetatom) |  |
| [EqualsAtom](/content/docs/sdk/core.equalsatom) |  |
| [EquivalentAtom](/content/docs/sdk/core.equivalentatom) |  |
| [EventTarget\_2](/content/docs/sdk/core.eventtarget_2/index.html) |  |
| [FhircastConnection](/content/docs/sdk/core.fhircastconnection) | A class representing a `FHIRcast` connection.<br>`FhircastConnection` extends `EventTarget` and emits 3 lifecycle events: 1. `connect` \- An event to signal when a WebSocket connection has been opened. Fired as soon as a WebSocket emits `open`. 2\. `message` \- Contains a `payload` field containing a `FHIRcast` message payload exactly as it comes in over WebSockets. 3. `disconnect` \- An event to signal when a WebSocket connection has been closed. Fired as soon as a WebSocket emits `close`.<br>To close the connection, call `connection.disconnect()` and listen to the `disconnect` event to know when the connection has been disconnected. |
| [FhirFilterComparison](/content/docs/sdk/core.fhirfiltercomparison) | The FhirFilterComparison class represents a comparison expression. |
| [FhirFilterConnective](/content/docs/sdk/core.fhirfilterconnective) | The FhirFilterConnective class represents a connective expression. It contains a list of child expressions. |
| [FhirFilterNegation](/content/docs/sdk/core.fhirfilternegation) | The FhirFilterNegation class represents a negation expression. It contains a single child expression. |
| [FhirPathAtom](/content/docs/sdk/core.fhirpathatom) |  |
| [FileBuilder](/content/docs/sdk/core.filebuilder) |  |
| [FunctionAtom](/content/docs/sdk/core.functionatom) |  |
| [Hl7Context](/content/docs/sdk/core.hl7context) | The Hl7Context class represents the parsing context for an HL7 message. |
| [Hl7Field](/content/docs/sdk/core.hl7field) | The Hl7Field class represents one HL7 field. A field is a collection of components. |
| [Hl7Message](/content/docs/sdk/core.hl7message) | The Hl7Message class represents one HL7 message. A message is a collection of segments. |
| [Hl7Segment](/content/docs/sdk/core.hl7segment) | The Hl7Segment class represents one HL7 segment. A segment is a collection of fields. The name field is the first field. |
| [ImpliesAtom](/content/docs/sdk/core.impliesatom) | 6.5.5. implies Returns true if left is true and right is true, true left is false and right true, false or empty true left is empty |
| [InAtom](/content/docs/sdk/core.inatom) |  |
| [IndexerAtom](/content/docs/sdk/core.indexeratom) |  |
| [InvalidOperationError](/content/docs/sdk/core.invalidoperationerror) |  |
| [IsAtom](/content/docs/sdk/core.isatom) |  |
| [LiteralAtom](/content/docs/sdk/core.literalatom) |  |
| [Logger](/content/docs/sdk/core.logger) |  |
| [LRUCache](/content/docs/sdk/core.lrucache) | LRU cache (least recently used) Source: [https://stackoverflow.com/a/46432113](https://stackoverflow.com/a/46432113) |
| [MedplumClient](/content/docs/sdk/core.medplumclient) | The MedplumClient class provides a client for the Medplum FHIR server.<br>The client can be used in the browser, in a Node.js application, or in a Medplum Bot.<br>The client provides helpful methods for common operations such as: 1. Authenticating 2. Creating resources 3. Reading resources 4. Updating resources 5. Deleting resources 6. Searching 7. Making GraphQL queries<br>The client can also be used to integrate with other FHIR servers. For an example, see the [Epic Connection Demo Bot](https://github.com/medplum/medplum/tree/main/examples/medplum-demo-bots/src/epic). |
| [MedplumKeyValueClient](/content/docs/sdk/core.medplumkeyvalueclient) |  |
| [MemoryStorage](/content/docs/sdk/core.memorystorage) | The MemoryStorage class is a minimal in-memory implementation of the Storage interface. |
| [MissingError](/content/docs/sdk/core.missingerror) |  |
| [MockAsyncClientStorage](/content/docs/sdk/core.mockasyncclientstorage) | The MockAsyncClientStorage class is a mock implementation of the ClientStorage class. This can be used for testing async initialization of the MedplumClient. |
| [NotEqualsAtom](/content/docs/sdk/core.notequalsatom) |  |
| [NotEquivalentAtom](/content/docs/sdk/core.notequivalentatom) |  |
| [OperationOutcomeError](/content/docs/sdk/core.operationoutcomeerror) |  |
| [OrAtom](/content/docs/sdk/core.oratom) | 6.5.2. or Returns false if both operands evaluate to false, true if either operand evaluates to true, and empty (`{ }`) otherwise: |
| [Parser](/content/docs/sdk/core.parser) |  |
| [ParserBuilder](/content/docs/sdk/core.parserbuilder) |  |
| [Pointer](/content/docs/sdk/core.pointer) | JSON Pointer representation |
| [ReadablePromise](/content/docs/sdk/core.readablepromise) | The ReadablePromise class wraps a request promise suitable for React Suspense. See: [https://blog.logrocket.com/react-suspense-data-fetching/\\#wrappromise-js](https://blog.logrocket.com/react-suspense-data-fetching/%5C#wrappromise-js) See: [https://github.com/ovieokeh/suspense-data-fetching/blob/master/lib/api/wrapPromise.js](https://github.com/ovieokeh/suspense-data-fetching/blob/master/lib/api/wrapPromise.js) |
| [ReconnectingWebSocket](/content/docs/sdk/core.reconnectingwebsocket) |  |
| [SubscriptionEmitter](/content/docs/sdk/core.subscriptionemitter) | An `EventTarget` that emits events when new subscription notifications come in over WebSockets.<br>\-\-\---<br>\### Events emitted:<br>- `connect` \- A new subscription is connected to the `SubscriptionManager` and `message` events for this subscription can be expected. - `disconnect` \- The specified subscription is no longer being monitored by the `SubscriptionManager`. \- `error` \- An error has occurred. - `message` \- A message containing a notification `Bundle` has been received. - `open` \- The WebSocket has been opened. - `close` \- The WebSocket has been closed. - `heartbeat` \- A `heartbeat` message has been received. |
| [SubscriptionManager](/content/docs/sdk/core.subscriptionmanager) |  |
| [SymbolAtom](/content/docs/sdk/core.symbolatom) |  |
| [TestError](/content/docs/sdk/core.testerror) |  |
| [Tokenizer](/content/docs/sdk/core.tokenizer) |  |
| [TransformMapCollection](/content/docs/sdk/core.transformmapcollection) | The TransformMapCollection class is a collection of StructureMap and ConceptMap resources. It is used to store and retrieve imported StructureMaps and ConceptMaps by URL. |
| [TypedEventTarget](/content/docs/sdk/core.typedeventtarget) |  |
| [UnaryOperatorAtom](/content/docs/sdk/core.unaryoperatoratom) |  |
| [UnionAtom](/content/docs/sdk/core.unionatom) |  |
| [XorAtom](/content/docs/sdk/core.xoratom) | 6.5.4. xor Returns true if exactly one of the operands evaluates to true, false if either both operands evaluate to true or both operands evaluate to false, and the empty collection otherwise. |

## Abstract Classes [​](/content/docs/sdk/core\#abstract-classes "Direct link to Abstract Classes"/index.html)

| Abstract Class | Description |
| --- | --- |
| [InfixOperatorAtom](/content/docs/sdk/core.infixoperatoratom) |  |
| [PrefixOperatorAtom](/content/docs/sdk/core.prefixoperatoratom) |  |

## Functions [​](/content/docs/sdk/core\#functions "Direct link to Functions"/index.html)

| Function | Description |
| --- | --- |
| [accepted(location)](/content/docs/sdk/core.accepted) |  |
| [accessPolicySupportsInteraction(accessPolicy, interaction, resourceType)](/content/docs/sdk/core.accesspolicysupportsinteraction) | Shallow check that an interaction is permitted by the AccessPolicy on a given resource type, at least for some resources. A more in-depth check for the specific resource(s) being accessed is required in addition to this one. |
| [add(object, operation, options)](/content/docs/sdk/core.add) | o If the target location specifies an array index, a new value is inserted into the array at the specified index. o If the target location specifies an object member that does not already exist, a new member is added to the object. o If the target location specifies an object member that does exist, that member's value is replaced. |
| [addPreferredPharmacyToPatient(patient, orgRef, isPrimary, preferenceTypeSystem)](/content/docs/sdk/core.addpreferredpharmacytopatient) | Adds or updates a preferred pharmacy extension on a Patient. If the pharmacy already exists, updates its type. Otherwise, adds a new extension. If isPrimary is true, other pharmacies are set to 'preferred'. |
| [addProfileToResource(resource, profileUrl)](/content/docs/sdk/core.addprofiletoresource) | Adds the supplied profileUrl to the resource.meta.profile if it is not already specified |
| [append(array, value)](/content/docs/sdk/core.append) |  |
| [apply(object, operation, options)](/content/docs/sdk/core.apply) | Switch on `operation.op`, applying the corresponding patch function for each case to `object`. |
| [applyDefaultValuesToElement(existingValue, elements, key)](/content/docs/sdk/core.applydefaultvaluestoelement) | Adds default values to `existingValue` for the given `key` and its children. If `key` is undefined, default values are added to all elements in `elements`. Default values consist of all fixed and pattern values defined in the relevant elements. |
| [applyDefaultValuesToResource(resource, schema)](/content/docs/sdk/core.applydefaultvaluestoresource) | Adds default values to `resource` based on the supplied `schema`. Default values includes all required fixed and pattern values specified on elements in the schema. If an element has a fixed/pattern value but is optional, i.e. `element.min === 0`, the default value is not added. |
| [applyFixedOrPatternValue(inputValue, key, element, elements)](/content/docs/sdk/core.applyfixedorpatternvalue) |  |
| [applyPatch(object, patch, options)](/content/docs/sdk/core.applypatch) | Apply a 'application/json-patch+json'-type patch to an object.<br>`patch` \*must\* be an array of operations.<br>Operation objects MUST have exactly one "op" member, whose value indicates the operation to perform. Its value MUST be one of "add", "remove", "replace", "move", "copy", or "test"; other values are errors.<br>This method mutates the target object in-place. |
| [arrayBufferToBase64(arrayBuffer)](/content/docs/sdk/core.arraybuffertobase64) | Converts an ArrayBuffer to a base-64 encoded string. |
| [arrayBufferToHex(arrayBuffer)](/content/docs/sdk/core.arraybuffertohex) | Converts an ArrayBuffer to hex string. See: [https://stackoverflow.com/a/55200387](https://stackoverflow.com/a/55200387) |
| [arrayify(value)](/content/docs/sdk/core.arrayify) |  |
| [arrayify(value)](/content/docs/sdk/core.arrayify_1/index.html) |  |
| [assert\_2(condition, msg)](/content/docs/sdk/core.assert_2/index.html) |  |
| [assertContextVersionOptional(event)](/content/docs/sdk/core.assertcontextversionoptional) |  |
| [assertNever(value)](/content/docs/sdk/core.assertnever) | Checks that a value has type `never`. Useful for ensuring exhaustive matches. |
| [assertOk(outcome, resource)](/content/docs/sdk/core.assertok) | Asserts that the operation completed successfully and that the resource is defined. |
| [assertReleaseManifest(candidate)](/content/docs/sdk/core.assertreleasemanifest) | Asserts that a given candidate is a `ReleaseManifest`. |
| [assertValidMedplumSemver(version)](/content/docs/sdk/core.assertvalidmedplumsemver) |  |
| [badRequest(details, expression)](/content/docs/sdk/core.badrequest) |  |
| [booleanToTypedValue(value)](/content/docs/sdk/core.booleantotypedvalue) | Returns a single element array with a typed boolean value. |
| [buildCdsRequest(medplum, user, service, context)](/content/docs/sdk/core.buildcdsrequest) | Builds a CDS request. |
| [buildElementsContext({ parentContext, path, elements, profileUrl, debugMode, accessPolicyResource, }, input)](/content/docs/sdk/core.buildelementscontext) |  |
| [buildMedicationRequestResponseLostStatusReason()](/content/docs/sdk/core.buildmedicationrequestresponseloststatusreason) | Builds the `statusReason` CodeableConcept used when soft-deleting a draft `MedicationRequest` whose vendor-side outcome is unknown (see [MEDICATION\_REQUEST\_STATUS\_REASON\_RESPONSE\_NOT\_RECEIVED](/content/docs/sdk/core.medication_request_status_reason_response_not_received/index.html)).<br>Paired with `status: 'unknown'` (a valid FHIR R4 MedicationRequest status), this is the standard shape every order-medication caller should write when `orderMedication(...)` throws after the draft MR has been created. |
| [buildTypeName(components)](/content/docs/sdk/core.buildtypename) |  |
| [businessRule(key, message)](/content/docs/sdk/core.businessrule) |  |
| [calculateAge(birthDateStr, endDateStr)](/content/docs/sdk/core.calculateage) | Calculates the age in years from the birth date. |
| [calculateAgeString(birthDateStr, endDateStr)](/content/docs/sdk/core.calculateagestring) | Calculates the age string for display using the age appropriate units. If the age is greater than or equal to 2 years, then the age is displayed in years. If the age is greater than or equal to 1 month, then the age is displayed in months. Otherwise, the age is displayed in days. |
| [canReadResourceType(accessPolicy, resourceType)](/content/docs/sdk/core.canreadresourcetype) | Determines if the current user can read the specified resource type. |
| [canWriteResource(accessPolicy, resource)](/content/docs/sdk/core.canwriteresource) | Determines if the current user can write the specified resource. This is a more in-depth check after building the candidate result of a write operation. |
| [canWriteResourceType(accessPolicy, resourceType)](/content/docs/sdk/core.canwriteresourcetype) | Determines if the current user can write the specified resource type. This is a preliminary check before evaluating a write operation in depth. If a user cannot write a resource type at all, then don't bother looking up previous versions. |
| [capitalize(word)](/content/docs/sdk/core.capitalize) |  |
| [checkForNull(value, path, issues)](/content/docs/sdk/core.checkfornull) | Recursively checks for null values in an object.<br>Note that "null" is a special value in JSON that is not allowed in FHIR. |
| [checkIfValidMedplumVersion(appName, version)](/content/docs/sdk/core.checkifvalidmedplumversion) | Tests that a given version string is a valid existing Medplum release version. |
| [clearReleaseCache()](/content/docs/sdk/core.clearreleasecache) | Clears the locally-cached `ReleaseManifest`s for all versions. |
| [clearScheduleParameter(schedule, service, url)](/content/docs/sdk/core.clearscheduleparameter) | Immutably clears one scheduling parameter a Schedule sets for a HealthcareService, dropping that calendar back to the service-level parameter of the same name. Pairs with `setScheduleParameter` and `getScheduleParameters`. |
| [codeableConceptMatchesToken(codeableConcept, token)](/content/docs/sdk/core.codeableconceptmatchestoken) | Checks if a CodeableConcept matches a token search string [https://build.fhir.org/search.html\\#token](https://build.fhir.org/search.html%5C#token) |
| [codingMatchesToken(coding, token)](/content/docs/sdk/core.codingmatchestoken) | Checks if a Coding matches a token search string [https://build.fhir.org/search.html\\#token](https://build.fhir.org/search.html%5C#token) |
| [compareVersions(a, b)](/content/docs/sdk/core.compareversions) | Compares two Medplum semver version strings, ignoring any trailing commit-hash suffix. |
| [compressElement(element)](/content/docs/sdk/core.compresselement) |  |
| [concatUrls(baseUrl, path)](/content/docs/sdk/core.concaturls) | Concatenates the given base URL and URL.<br>If the URL is absolute, it is returned as-is. |
| [conceptMapTranslate(map, params)](/content/docs/sdk/core.conceptmaptranslate) |  |
| [conflict(details, code)](/content/docs/sdk/core.conflict) |  |
| [contentTooLarge(text)](/content/docs/sdk/core.contenttoolarge) |  |
| [convertContainedResourcesToBundle(resource)](/content/docs/sdk/core.convertcontainedresourcestobundle) | Converts a resource with contained resources to a transaction bundle. This function is useful when creating a resource that contains other resources. Handles local references and topological sorting. |
| [convertToSearchableDates(typedValues)](/content/docs/sdk/core.converttosearchabledates) |  |
| [convertToSearchableNumbers(typedValues)](/content/docs/sdk/core.converttosearchablenumbers) |  |
| [convertToSearchableQuantities(typedValues)](/content/docs/sdk/core.converttosearchablequantities) |  |
| [convertToSearchableReferences(typedValues)](/content/docs/sdk/core.converttosearchablereferences) |  |
| [convertToSearchableStrings(typedValues)](/content/docs/sdk/core.converttosearchablestrings) |  |
| [convertToSearchableTokens(typedValues, context)](/content/docs/sdk/core.converttosearchabletokens) |  |
| [convertToSearchableUris(typedValues)](/content/docs/sdk/core.converttosearchableuris) |  |
| [convertToTransactionBundle(bundle)](/content/docs/sdk/core.converttotransactionbundle) | Takes a bundle and creates a Transaction Type bundle |
| [copy(object, operation, \_options)](/content/docs/sdk/core.copy) | The "copy" operation copies the value at a specified location to the target location. The operation object MUST contain a "from" member, which is a string containing a JSON Pointer value that references the location in the target document to copy the value from. The "from" location MUST exist for the operation to be successful.<br>This operation is functionally identical to an "add" operation at the target location using the value specified in the "from" member.<br>Alternatively, it's like 'move' without the 'remove'. |
| [countBy(items, keyFn)](/content/docs/sdk/core.countby) | Counts iterable elements by a key function, returning a sparse map of key to count. Matches Lodash `countBy` semantics (no zero-fill for missing keys). |
| [countWhere(items, fn)](/content/docs/sdk/core.countwhere) |  |
| [crawlTypedValue(typedValue, visitor, options)](/content/docs/sdk/core.crawltypedvalue) | Crawls the typed value synchronously. |
| [crawlTypedValueAsync(typedValue, visitor, options)](/content/docs/sdk/core.crawltypedvalueasync) | Crawls the typed value asynchronously. |
| [createConstraintIssue(expression, constraint)](/content/docs/sdk/core.createconstraintissue) |  |
| [createFhircastMessagePayload(topic, event, context, versionId)](/content/docs/sdk/core.createfhircastmessagepayload) | Creates a serializable JSON payload for the `FHIRcast` protocol |
| [createOperationOutcomeIssue(severity, code, message, path, data)](/content/docs/sdk/core.createoperationoutcomeissue) |  |
| [createPatch(input, output, diff)](/content/docs/sdk/core.createpatch) | Produce a 'application/json-patch+json'-type patch to get from one object to another.<br>This does not alter `input` or `output` unless they have a property getter with side-effects (which is not a good idea anyway).<br>`diff` is called on each pair of comparable non-primitive nodes in the `input`/`output` object trees, producing nested patches. Return `undefined` to fall back to default behaviour.<br>Returns list of operations to perform on `input` to produce `output`. |
| [createPreferredPharmacyExtension(orgRef, isPrimary, preferenceTypeSystem)](/content/docs/sdk/core.createpreferredpharmacyextension) | Creates a preferredPharmacy extension object. |
| [createProcessingIssue(expression, message, err, data)](/content/docs/sdk/core.createprocessingissue) |  |
| [createReference(resource)](/content/docs/sdk/core.createreference) | Creates a reference resource. |
| [createStructureIssue(expression, details)](/content/docs/sdk/core.createstructureissue) |  |
| [createTests(input, patch)](/content/docs/sdk/core.createtests) | Produce an 'application/json-patch+json'-type list of tests, to verify that existing values in an object are identical to the those captured at some checkpoint (whenever this function is called).<br>This does not alter `input` or `output` unless they have a property getter with side-effects (which is not a good idea anyway).<br>Returns list of test operations. |
| [decodeBase64(data)](/content/docs/sdk/core.decodebase64) | Decodes a base64 string. Handles both browser and Node environments. Supports Unicode characters. |
| [decodeBase64Url(data)](/content/docs/sdk/core.decodebase64url) | Decodes a string from Base64URL format. |
| [deepClone(input)](/content/docs/sdk/core.deepclone) | Creates a deep clone of the input value.<br>Limitations: - Only supports JSON primitives and arrays. - Does not support Functions, lambdas, etc. - Does not support circular references.<br>See: [https://web.dev/structured-clone/](https://web.dev/structured-clone/) See: [https://stackoverflow.com/questions/40488190/how-is-structured-clone-algorithm-different-from-deep-copy](https://stackoverflow.com/questions/40488190/how-is-structured-clone-algorithm-different-from-deep-copy) |
| [deepEquals(object1, object2, path)](/content/docs/sdk/core.deepequals) | Resource equality. Ignores meta.versionId and meta.lastUpdated. |
| [deepIncludes(value, pattern)](/content/docs/sdk/core.deepincludes) | Checks if value includes all fields and values of pattern. It doesn't matter if value has extra fields, values, etc. |
| [deriveIdentifierSearchParameter(inputParam)](/content/docs/sdk/core.deriveidentifiersearchparameter) | Derives an "identifier" search parameter from a reference search parameter.<br>FHIR references can have an "identifier" property.<br>Any FHIR reference search parameter can be used to search for resources with an identifier.<br>However, the FHIR specification does not define an "identifier" search parameter for every resource type.<br>This function derives an "identifier" search parameter from a reference search parameter. |
| [diffAny(input, output, ptr, diff)](/content/docs/sdk/core.diffany) | `diffAny()` returns an empty array if `input` and `output` are materially equal (i.e., would produce equivalent JSON); otherwise it produces an array of patches that would transform `input` into `output`.<br>Here, "equal" means that the value at the target location and the value conveyed by "value" are of the same JSON type, and that they are considered equal by the following rules for that type: o strings: are considered equal if they contain the same number of Unicode characters and their code points are byte-by-byte equal. o numbers: are considered equal if their values are numerically equal. o arrays: are considered equal if they contain the same number of values, and if each value can be considered equal to the value at the corresponding position in the other array, using this list of type-specific rules. o objects: are considered equal if they contain the same number of members, and if each member can be considered equal to a member in the other object, by comparing their keys (as strings) and their values (using this list of type-specific rules). o literals (false, true, and null): are considered equal if they are the same. |
| [diffArrays(input, output, ptr, diff)](/content/docs/sdk/core.diffarrays) | Calculate the shortest sequence of operations to get from `input` to `output`, using a dynamic programming implementation of the Levenshtein distance algorithm.<br>To get from the input ABC to the output AZ we could just delete all the input and say "insert A, insert Z" and be done with it. That's what we do if the input is empty. But we can be smarter.<br>output A Z - - \[0\] 1 2 input A \| 1 \[0\] 1 B \| 2 \[1\] 1 C \| 3 2 \[2\]<br>1. start at 0,0 (+0) 2) keep A (+0) 3) remove B (+1) 4) replace C with Z (+1)<br>If the `input` (source) is empty, they'll all be in the top row, resulting in an array of 'add' operations. If the `output` (target) is empty, everything will be in the left column, resulting in an array of 'remove' operations. |
| [diffObjects(input, output, ptr, diff)](/content/docs/sdk/core.diffobjects) |  |
| [encodeBase64(data)](/content/docs/sdk/core.encodebase64) | Encodes a base64 string. Handles both browser and Node environments. Supports Unicode characters. |
| [encodeBase64Url(data)](/content/docs/sdk/core.encodebase64url) | Encodes a string into Base64URL format. This is the encoding required for JWT parts. |
| [encodeSmartHealthLink(payload)](/content/docs/sdk/core.encodesmarthealthlink) |  |
| [encryptSHA256(str)](/content/docs/sdk/core.encryptsha256) | Encrypts a string with SHA256 encryption. |
| [ensureNoLeadingSlash(url)](/content/docs/sdk/core.ensurenoleadingslash) | Ensures the given URL has no leading slash. |
| [ensureTrailingSlash(url)](/content/docs/sdk/core.ensuretrailingslash) | Ensures the given URL has a trailing slash. |
| [escapeHtml(unsafe)](/content/docs/sdk/core.escapehtml) | Returns the escaped HTML string of the input string. |
| [escapeToken(token)](/content/docs/sdk/core.escapetoken) | Escape token part of a JSON Pointer string<br>'~' needs to be encoded as '~0' and '/' needs to be encoded as '~1' when these characters appear in a reference token.<br>This is the exact inverse of `unescapeToken()`, so the reverse replacements must take place in reverse order. |
| [evalFhirPath(expression, input, variables, cache)](/content/docs/sdk/core.evalfhirpath) | Evaluates a FHIRPath expression against a resource or other object. |
| [evalFhirPathTyped(expression, input, variables, cache)](/content/docs/sdk/core.evalfhirpathtyped) | Evaluates a FHIRPath expression against a resource or other object. |
| [evalSqlOnFhir(view, resources)](/content/docs/sdk/core.evalsqlonfhir) | Evaluates a SQL-on-FHIR view on a set of FHIR resources. |
| [expandSampledData(sample)](/content/docs/sdk/core.expandsampleddata) |  |
| [expandSampledObservation(obs)](/content/docs/sdk/core.expandsampledobservation) |  |
| [extractAccountReferences(meta)](/content/docs/sdk/core.extractaccountreferences) | Normalizes Medplum's `meta.account` and `meta.accounts` into a singular array of FHIR references. |
| [extractServiceTypeReferences(serviceType)](/content/docs/sdk/core.extractservicetypereferences) | Extracts HealthcareService references from serviceType concepts. |
| [fetchAllVersionStrings(appName, params)](/content/docs/sdk/core.fetchallversionstrings) | Fetches the version strings for all published Medplum releases. |
| [fetchLatestVersionString(appName)](/content/docs/sdk/core.fetchlatestversionstring) | Fetches the latest Medplum release version string. |
| [fetchVersionManifest(appName, version, params)](/content/docs/sdk/core.fetchversionmanifest) | Fetches the manifest for a given Medplum release version. |
| [fhirPathArrayEquals(x, y)](/content/docs/sdk/core.fhirpatharrayequals) | Determines if two arrays are equal according to FHIRPath equality rules. |
| [fhirPathArrayEquivalent(x, y)](/content/docs/sdk/core.fhirpatharrayequivalent) | Determines if two arrays are equivalent according to FHIRPath equality rules. |
| [fhirPathArrayNotEquals(x, y)](/content/docs/sdk/core.fhirpatharraynotequals) | Determines if two arrays are not equal according to FHIRPath equality rules. |
| [fhirPathEquals(x, y)](/content/docs/sdk/core.fhirpathequals) | Determines if two values are equal according to FHIRPath equality rules. |
| [fhirPathEquivalent(x, y)](/content/docs/sdk/core.fhirpathequivalent) | Determines if two values are equivalent according to FHIRPath equality rules. |
| [fhirPathIs(typedValue, desiredType)](/content/docs/sdk/core.fhirpathis) | Determines if the typed value is the desired type. |
| [fhirPathNot(input)](/content/docs/sdk/core.fhirpathnot) | Returns a negated FHIRPath boolean expression. |
| [fhirpathPatchTypedValue(original, patch)](/content/docs/sdk/core.fhirpathpatchtypedvalue) |  |
| [findCodeBySystem(categories, system)](/content/docs/sdk/core.findcodebysystem) | Finds the code for a specific system in a list of CodeableConcepts. |
| [findObservationInterval(definition, patient, value, category)](/content/docs/sdk/core.findobservationinterval) | Tries to find an observation interval for the given patient and value. |
| [findObservationReferenceRange(definition, patient, names)](/content/docs/sdk/core.findobservationreferencerange) | Tries to find an observation reference range for the given patient and condition names. |
| [findObservationReferenceRanges(definition, patient, names)](/content/docs/sdk/core.findobservationreferenceranges) | Returns all matching observation reference range for the given patient and condition names. |
| [findResourceByCode(resources, code, system)](/content/docs/sdk/core.findresourcebycode) | Finds the first resource in the input array that matches the specified code and system. |
| [findResourceInBundle(bundle, resourceType, id)](/content/docs/sdk/core.findresourceinbundle) |  |
| [flatMapFilter(arr, fn)](/content/docs/sdk/core.flatmapfilter) |  |
| [formatAddress(address, options)](/content/docs/sdk/core.formataddress) | Formats a FHIR Address as a string. |
| [formatCodeableConcept(codeableConcept)](/content/docs/sdk/core.formatcodeableconcept) | Formats a CodeableConcept element as a string. |
| [formatCoding(coding, includeCode)](/content/docs/sdk/core.formatcoding) | Formats a Coding element as a string. |
| [formatDate(date, locales, options)](/content/docs/sdk/core.formatdate) | Formats a FHIR date string as a human readable string. Handles missing values and invalid dates. |
| [formatDateTime(dateTime, locales, options)](/content/docs/sdk/core.formatdatetime) | Formats a FHIR dateTime string as a human readable string. Handles missing values and invalid dates. |
| [formatFamilyName(name)](/content/docs/sdk/core.formatfamilyname) | Formats the family name portion of a FHIR HumanName element. |
| [formatGivenName(name)](/content/docs/sdk/core.formatgivenname) | Formats the given name portion of a FHIR HumanName element. |
| [formatHl7DateTime(isoDate)](/content/docs/sdk/core.formathl7datetime) | Formats an ISO date/time string into an HL7 date/time string. |
| [formatHumanName(name, options)](/content/docs/sdk/core.formathumanname) | Formats a FHIR HumanName as a string. |
| [formatMoney(money)](/content/docs/sdk/core.formatmoney) |  |
| [formatObservationValue(obs)](/content/docs/sdk/core.formatobservationvalue) | Formats a FHIR Observation resource value as a string. |
| [formatPeriod(period, locales, options)](/content/docs/sdk/core.formatperiod) | Formats a FHIR Period as a human readable string. |
| [formatQuantity(quantity, precision)](/content/docs/sdk/core.formatquantity) | Returns a human-readable string for a FHIR Quantity datatype, taking into account units and comparators |
| [formatRange(range, precision, exclusive)](/content/docs/sdk/core.formatrange) | Returns a human-readable string for a FHIR Range datatype, taking into account one-sided ranges |
| [formatReferenceString(value)](/content/docs/sdk/core.formatreferencestring) | Formats a FHIR Reference as a string. |
| [formatSearchQuery(definition)](/content/docs/sdk/core.formatsearchquery) | Formats a search definition object into a query string. Note: The return value does not include the resource type. |
| [formatTime(time, locales, options)](/content/docs/sdk/core.formattime) | Formats a FHIR time string as a human readable string. Handles missing values and invalid dates. |
| [formatTiming(timing)](/content/docs/sdk/core.formattiming) | Formats a FHIR Timing as a human readable string. |
| [formatWallTime(time, locales, options)](/content/docs/sdk/core.formatwalltime) | Formats a FHIR time string as a human readable string. The viewer's timezone does not affect the display. |
| [generateId()](/content/docs/sdk/core.generateid) | Cross platform random UUID generator |
| [getAllDataTypes()](/content/docs/sdk/core.getalldatatypes) |  |
| [getAllQuestionnaireAnswers(response)](/content/docs/sdk/core.getallquestionnaireanswers) | Returns an array of questionnaire answers as a map by link ID. |
| [getBuffer()](/content/docs/sdk/core.getbuffer) | Returns the global Buffer constructor if available. |
| [getCodeBySystem(concept, system)](/content/docs/sdk/core.getcodebysystem) | Tries to find a code string for a given system within a given codeable concept. |
| [getDataType(type, profileUrl)](/content/docs/sdk/core.getdatatype) |  |
| [getDateProperty(date)](/content/docs/sdk/core.getdateproperty) | Returns a Date property as a Date. When working with JSON objects, Dates are often serialized as ISO-8601 strings. When that happens, we need to safely convert to a proper Date object. |
| [getDefaultValuesForNewSliceEntry(key, slice, slicing, schema)](/content/docs/sdk/core.getdefaultvaluesfornewsliceentry) |  |
| [getDisplayString(resource)](/content/docs/sdk/core.getdisplaystring) | Returns a display string for the resource. |
| [getElementDefinition(typeName, propertyName, profileUrl)](/content/docs/sdk/core.getelementdefinition) | Returns an element definition by type and property name. |
| [getElementDefinitionForPath(typeName, path, profileUrl)](/content/docs/sdk/core.getelementdefinitionforpath) |  |
| [getElementDefinitionFromElements(elements, propertyName)](/content/docs/sdk/core.getelementdefinitionfromelements) | Returns an element definition from mapping of elements by property name. |
| [getElementDefinitionTypeName(elementDefinition)](/content/docs/sdk/core.getelementdefinitiontypename) | Returns the type name for an ElementDefinition. |
| [getExpressionForResourceType(resourceType, expression)](/content/docs/sdk/core.getexpressionforresourcetype) |  |
| [getExpressionsForResourceType(resourceType, expression)](/content/docs/sdk/core.getexpressionsforresourcetype) |  |
| [getExtension(resource, urls)](/content/docs/sdk/core.getextension) | Returns an extension by extension URLs. |
| [getExtensions(extensible, urlOrUrls)](/content/docs/sdk/core.getextensions) | Returns every extension reachable by the given extension URLs.<br>Like `getExtension`, but does not stop at the first match: extensions that repeat under one URL are all returned, at every level. Use it for extensions defined with a cardinality above one, where `getExtension` would silently read only the first. |
| [getExtensionValue(resource, urls)](/content/docs/sdk/core.getextensionvalue) | Returns an extension value by extension URLs. |
| [getIdentifier(resource, system)](/content/docs/sdk/core.getidentifier) | Returns the resource identifier for the given system.<br>If multiple identifiers exist with the same system, the first one is returned.<br>If the system is not found, then returns undefined. |
| [getImageSrc(resource)](/content/docs/sdk/core.getimagesrc) | Returns an image URL for the resource, if one is available. |
| [getInnerDerivedIdentifierExpression(expression)](/content/docs/sdk/core.getinnerderivedidentifierexpression) |  |
| [getMedicationOrderIframeUrl(medicationRequest, ext)](/content/docs/sdk/core.getmedicationorderiframeurl) | Reads the medication-order iframe launch URL from MedicationRequest extensions. |
| [getNestedProperty(value, key, options)](/content/docs/sdk/core.getnestedproperty) |  |
| [getNestedProperty(value, key, options)](/content/docs/sdk/core.getnestedproperty_1/index.html) |  |
| [getOutcomeRedirectUrl(outcome)](/content/docs/sdk/core.getoutcomeredirecturl) |  |
| [getParsedDerivedIdentifierExpression(originalExpression, atom)](/content/docs/sdk/core.getparsedderivedidentifierexpression) |  |
| [getParsedExpressionForResourceType(resourceType, expression)](/content/docs/sdk/core.getparsedexpressionforresourcetype) |  |
| [getPathDifference(parentPath, path)](/content/docs/sdk/core.getpathdifference) | Returns the difference between two paths which is often suitable to use as a key in a `Record<string, InternalSchemaElement>` |
| [getPathDisplayName(path)](/content/docs/sdk/core.getpathdisplayname) | Returns a human friendly display name for a FHIR element definition path. |
| [getPendingMedicationOrderId(medicationRequest, ext)](/content/docs/sdk/core.getpendingmedicationorderid) | Reads the pending medication-order id from MedicationRequest identifiers. |
| [getPendingMedicationOrderStatus(medicationRequest, ext)](/content/docs/sdk/core.getpendingmedicationorderstatus) | Reads the pending medication-order status code from MedicationRequest extensions. |
| [getPreferredPharmaciesFromPatient(patient, preferenceTypeSystem)](/content/docs/sdk/core.getpreferredpharmaciesfrompatient) | Extracts preferred pharmacies from a Patient resource's extensions. |
| [getPropertyDisplayName(propertyName)](/content/docs/sdk/core.getpropertydisplayname) | Returns a human friendly display name for a FHIR element property or slice name |
| [getQueryString(query)](/content/docs/sdk/core.getquerystring) | Converts the given `query` to a string. |
| [getQuestionnaireAnswers(response)](/content/docs/sdk/core.getquestionnaireanswers) | Returns all questionnaire answers as a map by link ID. |
| [getRandomString()](/content/docs/sdk/core.getrandomstring) | Returns a cryptographically secure random string. |
| [getReferenceString(input)](/content/docs/sdk/core.getreferencestring) | Returns a reference string for a resource. |
| [getReferenceString(input)](/content/docs/sdk/core.getreferencestring_1/index.html) |  |
| [getResourceTypes()](/content/docs/sdk/core.getresourcetypes) | Returns an array of all resource types. Note that this is based on globalSchema, and will only return resource types that are currently in memory. |
| [getScheduleParameters(schedule, service, url)](/content/docs/sdk/core.getscheduleparameters) | Reads one scheduling parameter a Schedule sets for a HealthcareService, taking precedence over the service-level parameter of the same name. Pairs with `setScheduleParameter` and `clearScheduleParameter`.<br>The result is a list rather than a single extension because a Schedule may carry more than one SchedulingParameters extension matching the service, and because a parameter may legitimately repeat. |
| [getSchedulingTimezone(service, schedule, actor)](/content/docs/sdk/core.getschedulingtimezone) | Resolves the timezone used by scheduling in server priority order: the Schedule's parameters for the service, then the service's own parameters, then the actor's standard FHIR timezone extension. |
| [getSearchParameter(resourceType, code)](/content/docs/sdk/core.getsearchparameter) | Returns a search parameter for a resource type by search code. |
| [getSearchParameterDetails(resourceType, searchParam)](/content/docs/sdk/core.getsearchparameterdetails) | Returns the type details of a SearchParameter.<br>The SearchParameter resource has a "type" parameter, but that is missing some critical information.<br>For example: 1) The "date" type includes "date", "datetime", and "period". 2) The "token" type includes enums and booleans. 3) Arrays/multiple values are not reflected at all. |
| [getSearchParameters(resourceType)](/content/docs/sdk/core.getsearchparameters) | Returns the search parameters for the resource type indexed by search code. |
| [getSearchResourceTypes(searchRequest)](/content/docs/sdk/core.getsearchresourcetypes) |  |
| [getSmartHealthLinkId(manifestUrl)](/content/docs/sdk/core.getsmarthealthlinkid) |  |
| [getStatus(outcome)](/content/docs/sdk/core.getstatus) |  |
| [getTypedPropertyValue(input, path, options)](/content/docs/sdk/core.gettypedpropertyvalue) | Returns the value of the property and the property type. Some property definitions support multiple types. For example, "Observation.value\[x\]" can be "valueString", "valueInteger", "valueQuantity", etc. According to the spec, there can only be one property for a given element definition. This function returns the value and the type. |
| [getTypedPropertyValueWithoutSchema(typedValue, path)](/content/docs/sdk/core.gettypedpropertyvaluewithoutschema) | Returns the value of the property and the property type using a type schema. Note that because the type schema is not available, this function may be inaccurate. In some cases, that is the desired behavior. |
| [getTypedPropertyValueWithPath(input, path, options)](/content/docs/sdk/core.gettypedpropertyvaluewithpath) |  |
| [getTypedPropertyValueWithSchema(typedValue, path, element)](/content/docs/sdk/core.gettypedpropertyvaluewithschema) | Returns the value of the property and the property type using a type schema. |
| [getValueSliceName(value, slices, discriminators, profileUrl)](/content/docs/sdk/core.getvalueslicename) |  |
| [getWebSocketUrl(baseUrl, path)](/content/docs/sdk/core.getwebsocketurl) | Concatenates a given base URL and path, ensuring the URL has the appropriate `ws://` or `wss://` protocol instead of `http://` or `https://`. |
| [getWindow()](/content/docs/sdk/core.getwindow) | Returns the global window object if available. |
| [hasSchedulingParameters(resource)](/content/docs/sdk/core.hasschedulingparameters) | Returns whether a Schedule or HealthcareService has a SchedulingParameters extension.<br>Unscoped: on a Schedule, where the extension repeats once per service, this reports that some service is configured rather than any particular one. Ask `getScheduleParameters` about a service. |
| [indexConceptMapCodings(params)](/content/docs/sdk/core.indexconceptmapcodings) |  |
| [indexDefaultSearchParameters(bundle)](/content/docs/sdk/core.indexdefaultsearchparameters) |  |
| [indexSearchParameter(searchParam)](/content/docs/sdk/core.indexsearchparameter) | Indexes a SearchParameter resource for fast lookup. Indexes by SearchParameter.code, which is the query string parameter name. |
| [indexSearchParameterBundle(bundle)](/content/docs/sdk/core.indexsearchparameterbundle) | Indexes a bundle of SearchParameter resources for faster lookup. |
| [indexStructureDefinitionBundle(bundle)](/content/docs/sdk/core.indexstructuredefinitionbundle) | Parses and indexes structure definitions |
| [inflateBaseSchema(base)](/content/docs/sdk/core.inflatebaseschema) |  |
| [inflateElement(path, partial)](/content/docs/sdk/core.inflateelement) |  |
| [initFhirPathParserBuilder()](/content/docs/sdk/core.initfhirpathparserbuilder) |  |
| [intersection(objects)](/content/docs/sdk/core.intersection) | List the keys that shared by all `objects`.<br>The semantics of what constitutes a "key" is described in [subtract()](/content/docs/sdk/core.subtract). |
| [invalidSearchOperator(operator, searchParameterCodeOrId)](/content/docs/sdk/core.invalidsearchoperator) |  |
| [isAccepted(outcome)](/content/docs/sdk/core.isaccepted) |  |
| [isAckCode(value)](/content/docs/sdk/core.isackcode) | Type guard for a valid HL7 acknowledgment code (MSA-1). |
| [isAddPharmacyResponse(value)](/content/docs/sdk/core.isaddpharmacyresponse) | Type guard to validate an add pharmacy bot response. |
| [isBrowserEnvironment()](/content/docs/sdk/core.isbrowserenvironment) | Returns true if running in a browser environment with window available. |
| [isCodeableConcept(value)](/content/docs/sdk/core.iscodeableconcept) | Returns true if the input value is a CodeableConcept object. This is a heuristic check based on the presence of the "coding" property. |
| [isCoding(value)](/content/docs/sdk/core.iscoding) | Returns true if the input value is a Coding object. This is a heuristic check based on the presence of the "code" property. |
| [isCompletedSubscriptionRequest(subscriptionRequest)](/content/docs/sdk/core.iscompletedsubscriptionrequest) |  |
| [isComplexTypeCode(code)](/content/docs/sdk/core.iscomplextypecode) |  |
| [isConflict(outcome)](/content/docs/sdk/core.isconflict) |  |
| [isContextVersionRequired(event)](/content/docs/sdk/core.iscontextversionrequired) |  |
| [isCreated(outcome)](/content/docs/sdk/core.iscreated) |  |
| [isDataTypeLoaded(type)](/content/docs/sdk/core.isdatatypeloaded) |  |
| [isDateString(input)](/content/docs/sdk/core.isdatestring) | Returns true if the input value is a YYYY-MM-DD date string. |
| [isDateTimeString(input)](/content/docs/sdk/core.isdatetimestring) | Returns true if the input value is a YYYY-MM-DDThh:mm:ss.sssZ date/time string. |
| [isDayOfWeek(value)](/content/docs/sdk/core.isdayofweek) |  |
| [isDefined(value)](/content/docs/sdk/core.isdefined) | Helper function to narrow a type by excluding undefined/null values. |
| [isDestructive({ op }, input)](/content/docs/sdk/core.isdestructive) |  |
| [isEmpty(v)](/content/docs/sdk/core.isempty) | Returns true if the value is empty (null, undefined, empty string, or empty object). |
| [isError(value)](/content/docs/sdk/core.iserror) | Returns true if the input is an Error object. This should be replaced with `Error.isError` when it is more widely supported. See: [https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global\\\_Objects/Error/isError](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global%5C_Objects/Error/isError) |
| [isFhircastResourceType(resourceType)](/content/docs/sdk/core.isfhircastresourcetype) | Checks if a `ResourceType` can be used in a `FHIRcast` context. |
| [isFhirCriteriaMet(subscription, currentResource, getPreviousResource)](/content/docs/sdk/core.isfhircriteriamet) |  |
| [isGone(outcome)](/content/docs/sdk/core.isgone) |  |
| [isJwt(token)](/content/docs/sdk/core.isjwt) | Returns true if the token is a JWT. |
| [isLowerCase(c)](/content/docs/sdk/core.islowercase) |  |
| [isMedicationArray(value)](/content/docs/sdk/core.ismedicationarray) | Type guard: validates an array of Medication resources (drug search bot output).<br>Walks every entry rather than spot-checking the first so a tuple-shaped payload like `[Medication, MedicationRequest]` is rejected (see PR \[#8999\]( [https://github.com/medplum/medplum/pull/8999\\#discussion\\\_r3276251617](https://github.com/medplum/medplum/pull/8999%5C#discussion%5C_r3276251617))). |
| [isMedicationCartManageResponse(value)](/content/docs/sdk/core.ismedicationcartmanageresponse) | Type guard: validates a cart-management bot response. |
| [isMedicationCheckoutResponse(value)](/content/docs/sdk/core.ismedicationcheckoutresponse) | Type guard: validates a checkout-medications bot response. |
| [isMedicationOrderResponse(value)](/content/docs/sdk/core.ismedicationorderresponse) | Type guard: validates an order-medication bot response. |
| [isMedicationOrderSetResponse(value)](/content/docs/sdk/core.ismedicationordersetresponse) | Type guard: validates an order-set widget-URL bot response. |
| [isMedplumAccessToken(accessToken)](/content/docs/sdk/core.ismedplumaccesstoken) | Returns true if the access token was issued by a Medplum server. |
| [isNodeEnvironment()](/content/docs/sdk/core.isnodeenvironment) | Returns true if running in Node.js environment with Buffer available. |
| [isNotFound(outcome)](/content/docs/sdk/core.isnotfound) |  |
| [isObject(obj)](/content/docs/sdk/core.isobject) | Returns true if the input is an object. |
| [isOk(outcome)](/content/docs/sdk/core.isok) |  |
| [isOperationOutcome(value)](/content/docs/sdk/core.isoperationoutcome) |  |
| [isOrganizationArray(value)](/content/docs/sdk/core.isorganizationarray) | Type guard to validate that a value is an array of Organization resources. |
| [isPeriod(input)](/content/docs/sdk/core.isperiod) | Determines if the input is a Period object. This is heuristic based, as we do not have strong typing at runtime. |
| [isPopulated(arg)](/content/docs/sdk/core.ispopulated) | Returns true if the value is a non-empty string, an object with a length property greater than zero, or a non-empty object |
| [isPrimitiveType(code)](/content/docs/sdk/core.isprimitivetype) | Returns true if the type code is a primitive type. |
| [isProfileLoaded(profileUrl)](/content/docs/sdk/core.isprofileloaded) |  |
| [isProfileResource(resource)](/content/docs/sdk/core.isprofileresource) | Returns true if the resource is a "ProfileResource". |
| [isQuantity(input)](/content/docs/sdk/core.isquantity) | Determines if the input is a Quantity object. This is heuristic based, as we do not have strong typing at runtime. |
| [isQuantityEquivalent(x, y)](/content/docs/sdk/core.isquantityequivalent) |  |
| [isRedirect(outcome)](/content/docs/sdk/core.isredirect) |  |
| [isReference(value, resourceType)](/content/docs/sdk/core.isreference) | Type guard to validate that an object is a FHIR reference |
| [isResource(value, resourceType)](/content/docs/sdk/core.isresource) | Type guard to validate that an object is a FHIR resource |
| [isResourceType(resourceType)](/content/docs/sdk/core.isresourcetype) | Returns true if the given string is a valid FHIR resource type. |
| [isResourceTypeSchema(typeSchema)](/content/docs/sdk/core.isresourcetypeschema) | Returns true if the type schema is a non-abstract FHIR resource. |
| [isResourceWithId(resource, resourceType)](/content/docs/sdk/core.isresourcewithid) |  |
| [isSliceDefinitionWithTypes(slice)](/content/docs/sdk/core.isslicedefinitionwithtypes) |  |
| [isString(value)](/content/docs/sdk/core.isstring) | Returns true if the input value is a string. |
| [isStringArray(arr)](/content/docs/sdk/core.isstringarray) | Returns true if the input array is an array of strings. |
| [isTextObject(value)](/content/docs/sdk/core.istextobject) | Returns true if the input value is an object with a string text property. This is a heuristic check based on the presence of the "text" property. |
| [isTypedValue(value)](/content/docs/sdk/core.istypedvalue) | Returns true if the value is a TypedValue. |
| [isUnauthenticated(outcome)](/content/docs/sdk/core.isunauthenticated) |  |
| [isUUID(input)](/content/docs/sdk/core.isuuid) | Returns true if the input string is a UUID. |
| [isValidDate(date)](/content/docs/sdk/core.isvaliddate) | Returns true if the given date object is a valid date. Dates can be invalid if created by parsing an invalid string. |
| [isValidHostname(input)](/content/docs/sdk/core.isvalidhostname) | Tests whether a given input is a valid hostname.<br>\_\_NOTE: Does not validate that the input is a valid domain name, only a valid hostname.\_\_ |
| [isValidMedplumSemver(version)](/content/docs/sdk/core.isvalidmedplumsemver) | Tests that a given version string follows the basic semver pattern of `<int>.<int>.<int>`, which is used for Medplum versions. |
| [lazy(fn)](/content/docs/sdk/core.lazy) | Memoizes the result of a parameterless function |
| [loadDataType(sd)](/content/docs/sdk/core.loaddatatype) |  |
| [mapByIdentifier(resourceBundle, identifierSystem)](/content/docs/sdk/core.mapbyidentifier) | Returns a Map of resources from a bundle, using the specified identifier system as the key. |
| [matchDiscriminant(value, discriminator, slice, elements)](/content/docs/sdk/core.matchdiscriminant) |  |
| [matchesRange(value, range, precision)](/content/docs/sdk/core.matchesrange) | Returns true if the value is in the range accounting for precision. |
| [matchesSearchRequest(resource, searchRequest)](/content/docs/sdk/core.matchessearchrequest) | Determines if the resource matches the search request. |
| [medicationCartClearRequestToParameters(req)](/content/docs/sdk/core.medicationcartclearrequesttoparameters) | Encodes a [MedicationCartClearRequest](/content/docs/sdk/core.medicationcartclearrequest) as a FHIR `Parameters` body for the `$clear-cart` custom operation. Emits the `action: 'clear'` discriminator. |
| [medicationCartRemoveRequestToParameters(req)](/content/docs/sdk/core.medicationcartremoverequesttoparameters) | Encodes a [MedicationCartRemoveRequest](/content/docs/sdk/core.medicationcartremoverequest) as a FHIR `Parameters` body for the `$remove-cart-medication` custom operation. Emits the `action: 'remove'` discriminator the shared cart-management bot dispatches on. |
| [medicationCheckoutRequestToParameters(req)](/content/docs/sdk/core.medicationcheckoutrequesttoparameters) | Encodes a [MedicationCheckoutRequest](/content/docs/sdk/core.medicationcheckoutrequest) as a FHIR `Parameters` body for the vendor-neutral `$checkout-medications` custom operation (`POST /fhir/R4/MedicationRequest/$checkout-medications`).<br>`medicationRequestIds` is emitted as one `parameter` entry per id so the OperationDefinition's `max: '*'` cardinality round-trips. Optional fields are omitted entirely. |
| [medicationOrderRequestToParameters(req)](/content/docs/sdk/core.medicationorderrequesttoparameters) | Encodes a [MedicationOrderRequest](/content/docs/sdk/core.medicationorderrequest) as a FHIR `Parameters` body for the vendor-neutral `$order-medication` custom operation.<br>Nested arrays (`drugs`, `compoundSigs`, `diagnoses`) are emitted as one `parameter` entry per element so the OperationDefinition's `max: '*'` cardinality round-trips; primitive arrays (`conditionIds`) likewise emit one entry per id. Optional fields are omitted entirely. |
| [medicationOrderSetRequestToParameters(req)](/content/docs/sdk/core.medicationordersetrequesttoparameters) | Encodes a [MedicationOrderSetRequest](/content/docs/sdk/core.medicationordersetrequest) as a FHIR `Parameters` body for the vendor-neutral `$order-set-url` custom operation (`POST /fhir/R4/PlanDefinition/$order-set-url`). Optional fields are omitted entirely so the wire payload mirrors the legacy `executeBot` plain-JSON shape the bot's `parseInput` helper would otherwise have to coerce.<br>`vendorOrderSetId` is encoded as `valueInteger` when numeric and `valueString` otherwise — keeping the operation usable by future vendors whose order-set ids are not numeric. |
| [medicationSearchParamsToParameters(params)](/content/docs/sdk/core.medicationsearchparamstoparameters) | Encodes a [MedicationSearchParams](/content/docs/sdk/core.medicationsearchparams) as a FHIR `Parameters` body for the vendor-neutral `$drug-search` (and `$drug-quantity-qualifiers`) custom operations. Optional fields are omitted entirely so the wire payload stays minimal and mirrors the legacy `executeBot` plain-JSON shape that the bot's `parseInput` helper would otherwise have to coerce. |
| [move(object, operation, \_options)](/content/docs/sdk/core.move) | The "move" operation removes the value at a specified location and adds it to the target location. The operation object MUST contain a "from" member, which is a string containing a JSON Pointer value that references the location in the target document to move the value from. This operation is functionally identical to a "remove" operation on the "from" location, followed immediately by an "add" operation at the target location with the value that was just removed.<br>The "from" location MUST NOT be a proper prefix of the "path" location; i.e., a location cannot be moved into one of its children.<br>TODO: throw if the check described in the previous paragraph fails. |
| [NOOP()](/content/docs/sdk/core.noop) | No operation function. |
| [normalizeArrayBufferView(typedArrayOrBuffer)](/content/docs/sdk/core.normalizearraybufferview) | Normalizes an `ArrayBufferLike` (eg. an `ArrayBuffer`) to a raw `ArrayBufferLike` (without a view). If the passed buffer is a view, it gives the raw `ArrayBufferLike`.<br>This is useful in cases where you need to operate on the raw bytes of an `ArrayBuffer` where a `TypedArray` (eg. `Uint32Array`) might be passed in. This ensures that you will always operate on the raw bytes rather than accidentally truncating the input by operating on the elements of the view. |
| [normalizeCreateBinaryOptions(arg1, arg2, arg3, arg4)](/content/docs/sdk/core.normalizecreatebinaryoptions) |  |
| [normalizeCreatePdfOptions(arg1, arg2, arg3, arg4)](/content/docs/sdk/core.normalizecreatepdfoptions) |  |
| [normalizeErrorEvent(event, target)](/content/docs/sdk/core.normalizeerrorevent) | Normalizes the various `error` event shapes dispatched by different `WebSocket` implementations into a single `ErrorEvent` carrying a real `Error`, so downstream listeners always get `message` and `error` regardless of the underlying implementation:<br>- Browsers dispatch a plain `Event` with no error details (per the WHATWG WebSocket spec). - Node's `ws` library and Node's built-in (undici) `WebSocket` dispatch an `ErrorEvent` with both `message` and `error`. \- Bun dispatches a plain `Event` with a `message` string but no `error`. |
| [normalizeErrorString(error)](/content/docs/sdk/core.normalizeerrorstring) | Normalizes an error object into a displayable error string. |
| [normalizeOperationOutcome(error)](/content/docs/sdk/core.normalizeoperationoutcome) | Normalizes an error object into an OperationOutcome. |
| [operationOutcomeIssueToString(issue)](/content/docs/sdk/core.operationoutcomeissuetostring) | Returns a string representation of the operation outcome issue. |
| [operationOutcomeToString(outcome)](/content/docs/sdk/core.operationoutcometostring) | Returns a string representation of the operation outcome. |
| [parametersToMedicationCartManageResponse(params)](/content/docs/sdk/core.parameterstomedicationcartmanageresponse) | Decodes the `Parameters` response from the `$remove-cart-medication` / `$clear-cart` custom operations into a typed [MedicationCartManageResponse](/content/docs/sdk/core.medicationcartmanageresponse). Throws [INVALID\_MEDICATION\_CART\_RESPONSE](/content/docs/sdk/core.invalid_medication_cart_response/index.html) when required top-level fields are missing. |
| [parametersToMedicationCheckoutResponse(params)](/content/docs/sdk/core.parameterstomedicationcheckoutresponse) | Decodes the `Parameters` response from the `$checkout-medications` custom operation into a typed [MedicationCheckoutResponse](/content/docs/sdk/core.medicationcheckoutresponse). Throws `INVALID_MEDICATION_CHECKOUT_RESPONSE` when required top-level fields are missing.<br>The repeating `items` parameter is collected across every occurrence (each is one queued/failed line); the scalar `approvalUrl` / `vendorPatientId` are read once. |
| [parametersToMedicationOrderResponse(params)](/content/docs/sdk/core.parameterstomedicationorderresponse) | Decodes the `Parameters` response from the `$order-medication` custom operation into a typed [MedicationOrderResponse](/content/docs/sdk/core.medicationorderresponse). Throws `INVALID_MEDICATION_ORDER_RESPONSE` when required fields are missing. |
| [parametersToMedicationOrderSetResponse(params)](/content/docs/sdk/core.parameterstomedicationordersetresponse) | Decodes the `Parameters` response from the `$order-set-url` custom operation into a typed [MedicationOrderSetResponse](/content/docs/sdk/core.medicationordersetresponse). Throws `INVALID_MEDICATION_ORDER_SET_RESPONSE` when `launchUrl` is missing or empty.<br>Echoed vendor ids (`vendorPatientId`, `vendorOrderSetId`) are preserved as the wire type — `number` when sent as `valueInteger`, `string` when sent as `valueString` — so downstream code can read either without conversion. |
| [parametersToOrderSetSyncResponse(params)](/content/docs/sdk/core.parameterstoordersetsyncresponse) | Decodes the `Parameters` response from the `$sync-orderset` custom operation into a typed [OrderSetSyncResponse](/content/docs/sdk/core.ordersetsyncresponse), including the repeating per-action `results` rows the server previously dropped. |
| [parseFhirPath(input)](/content/docs/sdk/core.parsefhirpath) | Parses a FHIRPath expression into an AST. The result can be used to evaluate the expression against a resource or other object. This method is useful if you know that you will evaluate the same expression many times against different resources. |
| [parseFhirPathPatchParameters(parameters)](/content/docs/sdk/core.parsefhirpathpatchparameters) | Parses a FHIRPath Patch `Parameters` resource into the array of operations consumed by [fhirpathPatchTypedValue()](/content/docs/sdk/core.fhirpathpatchtypedvalue). Each repeating `operation` parameter is decoded from its `part` entries (`type`, `path`, `name`, `value`, `index`, `source`, `destination`), where the polymorphic `value[x]` part becomes a [TypedValue](/content/docs/sdk/core.typedvalue). |
| [parseFilterParameter(input)](/content/docs/sdk/core.parsefilterparameter) | Parses a FHIR \_filter parameter expression into an AST. |
| [parseHl7DateTime(hl7DateTime, options)](/content/docs/sdk/core.parsehl7datetime) | Returns a formatted string representing the date in ISO-8601 format.<br>HL7-Definition V2 Specifies a point in time using a 24-hour clock notation.<br>Format: YYYY\[MM\[DD\[HH\[MM\[SS\[. S\[S\[S\[S\]\]\]\]\]\]\]\]\]\[+/-ZZZZ\]. |
| [parseJWTPayload(token)](/content/docs/sdk/core.parsejwtpayload) | Parses the JWT payload. |
| [parseLogLevel(level)](/content/docs/sdk/core.parseloglevel) |  |
| [parseMappingLanguage(input)](/content/docs/sdk/core.parsemappinglanguage) | Parses a FHIR Mapping Language document into an AST. |
| [parseParameter(searchParam, operator, modifier, value)](/content/docs/sdk/core.parseparameter) |  |
| [parseReference(reference)](/content/docs/sdk/core.parsereference) | Parses a reference and returns a tuple of \[ResourceType, ID\]. |
| [parseSearchRequest(url, query)](/content/docs/sdk/core.parsesearchrequest) | Parses a search URL into a search request. |
| [parseSmartHealthLink(input)](/content/docs/sdk/core.parsesmarthealthlink) |  |
| [parseStructureDefinition(sd)](/content/docs/sdk/core.parsestructuredefinition) | Parses a StructureDefinition resource into an internal schema better suited for programmatic validation and usage in internal systems |
| [parseXFhirQuery(query, variables, context)](/content/docs/sdk/core.parsexfhirquery) | Parses an extended FHIR search criteria string (i.e. application/x-fhir-query). |
| [pathToJSONPointer(path)](/content/docs/sdk/core.pathtojsonpointer) | Translates a path emitted by this crawler into an RFC6902 JSON Patch pointer |
| [preciseEquals(a, b, precision)](/content/docs/sdk/core.preciseequals) | Returns true if the two numbers are equal to the given precision. |
| [preciseGreaterThan(a, b, precision)](/content/docs/sdk/core.precisegreaterthan) | Returns true if the first number is greater than the second number to the given precision. |
| [preciseGreaterThanOrEquals(a, b, precision)](/content/docs/sdk/core.precisegreaterthanorequals) | Returns true if the first number is greater than or equal to the second number to the given precision. |
| [preciseLessThan(a, b, precision)](/content/docs/sdk/core.preciselessthan) | Returns true if the first number is less than the second number to the given precision. |
| [preciseLessThanOrEquals(a, b, precision)](/content/docs/sdk/core.preciselessthanorequals) | Returns true if the first number is less than or equal to the second number to the given precision. |
| [preciseRound(a, precision)](/content/docs/sdk/core.preciseround) | Returns the input number rounded to the specified number of digits. |
| [redirect(url)](/content/docs/sdk/core.redirect) |  |
| [redirectOk(url)](/content/docs/sdk/core.redirectok) |  |
| [remove(object, operation, \_options)](/content/docs/sdk/core.remove) | The "remove" operation removes the value at the target location. The target location MUST exist for the operation to be successful. |
| [removeDuplicates(arr)](/content/docs/sdk/core.removeduplicates) | Removes duplicates in array using FHIRPath equality rules. |
| [removePreferredPharmacyFromPatient(patient, orgRef)](/content/docs/sdk/core.removepreferredpharmacyfrompatient) | Removes a preferred pharmacy extension from a Patient. |
| [removeProfileFromResource(resource, profileUrl)](/content/docs/sdk/core.removeprofilefromresource) | Removes the supplied profileUrl from the resource.meta.profile if it is present |
| [reorderBundle(bundle)](/content/docs/sdk/core.reorderbundle) | Topologically sorts a `batch` or `transaction` bundle to improve reference resolution. The bundle is sorted such that a resource is created \_before\_ references to that resource appear in the bundle.<br>In the event of cycles, this function will first create a POST request for each resource in the cycle, and then will append a PUT request to the bundle. This ensures that each resources in the cycle is visited twice, and all references can be resolved |
| [replace(object, operation, \_options)](/content/docs/sdk/core.replace) | The "replace" operation replaces the value at the target location with a new value. The operation object MUST contain a "value" member whose content specifies the replacement value. The target location MUST exist for the operation to be successful.<br>This operation is functionally identical to a "remove" operation for a value, followed immediately by an "add" operation at the same location with the replacement value.<br>Even more simply, it's like the add operation with an existence check. |
| [replaceQueryVariables(user, context, query)](/content/docs/sdk/core.replacequeryvariables) | Replaces prefetch query variables with values from the context or user profile.<br>A prefetch token is a placeholder in a prefetch template that is \*replaced by information from the hook's context\* to construct the FHIR URL used to request the prefetch data.<br>Prefetch tokens MUST be delimited by `{{` and `}}`, and MUST contain only the qualified path to a hook context field or one of the following user identifiers: `userPractitionerId`, `userPractitionerRoleId`, `userPatientId`, or `userRelatedPersonId`.<br>Note that the spec says:<br>Individual hooks specify which of their `context` fields can be used as prefetch tokens. Only root-level fields with a primitive value within the `context` object are eligible to be used as prefetch tokens. For example, `{{context.medication.id}}` is not a valid prefetch token because it attempts to access the `id` field of the `medication` field.<br>Unfortunately, many CDS Hooks services do not follow this rule. Therefore, this implementation allows access to nested fields. |
| [resolveId(input)](/content/docs/sdk/core.resolveid) | Returns the ID portion of a reference. |
| [resourceMatchesSubscriptionCriteria({ resource, subscription, context, getPreviousResource, logger, }, input)](/content/docs/sdk/core.resourcematchessubscriptioncriteria) |  |
| [satisfiedAccessPolicy(resource, interaction, accessPolicy)](/content/docs/sdk/core.satisfiedaccesspolicy) | Checks that there is an access policy permitting the given resource interaction, returning the matching policy object. |
| [schedulingDurationToMinutes(duration)](/content/docs/sdk/core.schedulingdurationtominutes) | Converts a SchedulingParameters duration to minutes. |
| [serializeError(error, depth, maxDepth)](/content/docs/sdk/core.serializeerror) | Serializes an Error object into a plain object, including nested causes and custom properties. |
| [serializeFhircastSubscriptionRequest(subscriptionRequest)](/content/docs/sdk/core.serializefhircastsubscriptionrequest) | Creates a serialized url-encoded payload for a `FHIRcast` subscription from a `SubscriptionRequest` object that can be directly used in an HTTP request to the Hub. |
| [serverError(err)](/content/docs/sdk/core.servererror) |  |
| [serverTimeout(msg)](/content/docs/sdk/core.servertimeout) |  |
| [serviceTypeIncludesService(serviceType, service)](/content/docs/sdk/core.servicetypeincludesservice) | Returns whether any serviceType concept refers to the given HealthcareService. |
| [setCodeBySystem(concept, system, code)](/content/docs/sdk/core.setcodebysystem) | Sets a code for a given system within a given codeable concept. |
| [setIdentifier(resource, system, value, options)](/content/docs/sdk/core.setidentifier) | Sets a resource identifier for the given system.<br>Note that this method is only available on resources that have an "identifier" property, and that property must be an array of Identifier objects, which is not true for all FHIR resources.<br>If the identifier already exists, then the value is updated.<br>Otherwise a new identifier is added. |
| [setScheduleParameter(schedule, service, subextension)](/content/docs/sdk/core.setscheduleparameter) | Immutably sets one scheduling parameter on a Schedule for a HealthcareService, so that calendar keeps it in place of the service-level parameter of the same name. Whatever the Schedule already holds at the sub-extension's url is replaced, and the SchedulingParameters extension is created if the Schedule has none for the service yet.<br>Untyped by design, taking any sub-extension of the shape the parameter calls for, for example `{ url: 'bufferBefore', valueDuration: { value: 10, unit: 'min' } }`. A parameter whose value is a nested structure rather than a single `value[x]` is worth a typed wrapper over this; `availability` has one in `@medplum/react-scheduling`. Pairs with `clearScheduleParameter` and `getScheduleParameters`. |
| [singleton(collection, type)](/content/docs/sdk/core.singleton) |  |
| [singularize(value)](/content/docs/sdk/core.singularize) |  |
| [sleep(ms, options)](/content/docs/sdk/core.sleep) | Sleeps for the specified number of milliseconds. |
| [sortStringArray(array)](/content/docs/sdk/core.sortstringarray) | Sorts an array of strings in place using the localeCompare method.<br>This method will mutate the input array. |
| [splitN(str, delim, n)](/content/docs/sdk/core.splitn) | Splits a string into an array of strings using the specified delimiter. Unlike the built-in split function, this function will split the string into a maximum of exactly n parts. Trailing empty strings are included in the result. |
| [splitSearchOnComma(input)](/content/docs/sdk/core.splitsearchoncomma) | Splits a FHIR search value on commas. Respects backslash escape.<br>See: [https://hl7.org/fhir/r4/search.html\\#escaping](https://hl7.org/fhir/r4/search.html%5C#escaping) |
| [streamToBuffer(stream)](/content/docs/sdk/core.streamtobuffer) | Reads data from a Readable stream and returns a Promise that resolves with a Buffer containing all the data. |
| [stringify(value, pretty)](/content/docs/sdk/core.stringify) | Returns the FHIR JSON string representation of the input value.<br>Removes properties with empty string values. Removes objects with zero properties.<br>Does not modify the input value. If the input value does not contain any empty properties, then the original value is returned. Otherwise, a new value is returned with the empty properties removed.<br>See: [https://www.hl7.org/fhir/json.html](https://www.hl7.org/fhir/json.html) |
| [stringifyTypedValue(v)](/content/docs/sdk/core.stringifytypedvalue) | Output the string representation of a value, suitable for use as part of a search query. |
| [structureMapTransform(structureMap, input, transformMaps)](/content/docs/sdk/core.structuremaptransform) | Transforms input values using a FHIR StructureMap.<br>See: [https://www.hl7.org/fhir/mapping-language.html](https://www.hl7.org/fhir/mapping-language.html) |
| [subsetResource(resource, properties)](/content/docs/sdk/core.subsetresource) | Construct the subset of a resource containing a minimum set of fields. The returned resource is not guaranteed to contain only the provided properties, and may contain others (e.g. `resourceType` and `id`) |
| [subtract(minuend, subtrahend)](/content/docs/sdk/core.subtract) | List the keys in `minuend` that are not in `subtrahend`.<br>A key is only considered if it is both 1) an own-property (o.hasOwnProperty(k)) of the object, and 2) has a value that is not undefined. This is to match JSON semantics, where JSON object serialization drops keys with undefined values. |
| [sumBy(items, fn)](/content/docs/sdk/core.sumby) |  |
| [summarizeObservations(observations, summaryCode, summarizeFn)](/content/docs/sdk/core.summarizeobservations) | Summarizes a group of Observations into a single computed summary value, with the individual values preserved in `Observation.component.valueSampledData`. |
| [test\_2(object, operation, \_options)](/content/docs/sdk/core.test_2/index.html) | The "test" operation tests that a value at the target location is equal to a specified value. The operation object MUST contain a "value" member that conveys the value to be compared to the target location's value. The target location MUST be equal to the "value" value for the operation to be considered successful. |
| [toJsBoolean(obj)](/content/docs/sdk/core.tojsboolean) | Converts unknown object into a JavaScript boolean. Note that this is different than the FHIRPath "toBoolean", which has particular semantics around arrays, empty arrays, and type conversions. |
| [toPeriod(input)](/content/docs/sdk/core.toperiod) | Tries to convert an unknown input value to a Period object. |
| [toServiceTypeCodeableConcepts(service)](/content/docs/sdk/core.toservicetypecodeableconcepts) | Converts a HealthcareService into the CodeableConcept values used by `Schedule.serviceType` and `Appointment.serviceType`, which encode an R4 approximation of `CodeableReference<HealthcareService>`. |
| [toTypedValue(value)](/content/docs/sdk/core.totypedvalue) | Returns a "best guess" TypedValue for a given value. |
| [trimTrailingEmptyElements(arr)](/content/docs/sdk/core.trimtrailingemptyelements) | Returns an array with trailing empty elements removed. For example, \[1, 2, 3, null, undefined, ''\] becomes \[1, 2, 3\]. This is useful for FHIR arrays, which by default must maintain the same length, but while editing we may want to trim trailing empty elements. |
| [tryGetDataType(type, profileUrl)](/content/docs/sdk/core.trygetdatatype) |  |
| [tryGetJwtExpiration(token)](/content/docs/sdk/core.trygetjwtexpiration) | Returns the JWT expiration time in number of milliseconds elapsed since the epoch. |
| [tryGetProfile(profileUrl)](/content/docs/sdk/core.trygetprofile) |  |
| [typedValueToString(typedValue)](/content/docs/sdk/core.typedvaluetostring) | Converts a typed value to a string. |
| [unescapeToken(token)](/content/docs/sdk/core.unescapetoken) | Unescape token part of a JSON Pointer string<br>`token` should \*not\* contain any '/' characters.<br>Evaluation of each reference token begins by decoding any escaped character sequence. This is performed by first transforming any occurrence of the sequence '~1' to '/', and then transforming any occurrence of the sequence '~0' to '~'. By performing the substitutions in this order, an implementation avoids the error of turning '~01' first into '~1' and then into '/', which would be incorrect (the string '~01' correctly becomes '~1' after transformation).<br>Here's my take:<br>~1 is unescaped with higher priority than ~0 because it is a lower-order escape character. I say "lower order" because '/' needs escaping due to the JSON Pointer serialization technique. Whereas, '~' is escaped because escaping '/' uses the '~' character. |
| [validateFhircastSubscriptionRequest(subscriptionRequest)](/content/docs/sdk/core.validatefhircastsubscriptionrequest) | Validates that a `SubscriptionRequest`. |
| [validateResource(resource, options)](/content/docs/sdk/core.validateresource) |  |
| [validateResourceType(resourceType)](/content/docs/sdk/core.validateresourcetype) | Validates that the given string is a valid FHIR resource type.<br>On success, silently returns void. On failure, throws an OperationOutcomeError. |
| [validateTypedValue(typedValue, options)](/content/docs/sdk/core.validatetypedvalue) |  |
| [validationError(details, expressions, code, diagnostics)](/content/docs/sdk/core.validationerror) |  |
| [warnIfNewerVersionAvailable(appName, params)](/content/docs/sdk/core.warnifnewerversionavailable) | Checks if a newer version of Medplum is available and logs a warning if so. |
| [wordWrap(text, maxLength)](/content/docs/sdk/core.wordwrap) | Returns a word-wrapped string. Based on: [https://stackoverflow.com/a/38709683](https://stackoverflow.com/a/38709683) |

## Interfaces [​](/content/docs/sdk/core\#interfaces "Direct link to Interfaces"/index.html)

| Interface | Description |
| --- | --- |
| [AddFavoriteParams](/content/docs/sdk/core.addfavoriteparams) | Parameters for adding a pharmacy to a patient's favorites. |
| [AddOperation](/content/docs/sdk/core.addoperation) |  |
| [AddPharmacyResponse](/content/docs/sdk/core.addpharmacyresponse) | Response from adding a pharmacy to a patient's favorites. |
| [AddressFormatOptions](/content/docs/sdk/core.addressformatoptions) |  |
| [AgentConnectRequest](/content/docs/sdk/core.agentconnectrequest) |  |
| [AgentConnectResponse](/content/docs/sdk/core.agentconnectresponse) |  |
| [AgentError](/content/docs/sdk/core.agenterror) |  |
| [AgentHeartbeatRequest](/content/docs/sdk/core.agentheartbeatrequest) |  |
| [AgentHeartbeatResponse](/content/docs/sdk/core.agentheartbeatresponse) |  |
| [AgentLogsRequest](/content/docs/sdk/core.agentlogsrequest) |  |
| [AgentLogsResponse](/content/docs/sdk/core.agentlogsresponse) |  |
| [AgentReloadConfigRequest](/content/docs/sdk/core.agentreloadconfigrequest) |  |
| [AgentReloadConfigResponse](/content/docs/sdk/core.agentreloadconfigresponse) |  |
| [AgentStats](/content/docs/sdk/core.agentstats) | Statistics about the running agent. Known fields are typed; additional fields may be present and are preserved as unknown values. |
| [AgentStatsRequest](/content/docs/sdk/core.agentstatsrequest) |  |
| [AgentStatsResponse](/content/docs/sdk/core.agentstatsresponse) |  |
| [AgentTransmitRequest](/content/docs/sdk/core.agenttransmitrequest) |  |
| [AgentTransmitResponse](/content/docs/sdk/core.agenttransmitresponse) |  |
| [AgentUpgradeRequest](/content/docs/sdk/core.agentupgraderequest) |  |
| [AgentUpgradeResponse](/content/docs/sdk/core.agentupgraderesponse) |  |
| [AsyncCrawlerVisitor](/content/docs/sdk/core.asynccrawlervisitor) |  |
| [Atom](/content/docs/sdk/core.atom) |  |
| [AtomContext](/content/docs/sdk/core.atomcontext) |  |
| [BackgroundJobContext](/content/docs/sdk/core.backgroundjobcontext) |  |
| [BaseAgentMessage](/content/docs/sdk/core.baseagentmessage) |  |
| [BaseAgentRequestMessage](/content/docs/sdk/core.baseagentrequestmessage) |  |
| [BaseLoginRequest](/content/docs/sdk/core.baseloginrequest) |  |
| [BotEvent](/content/docs/sdk/core.botevent) |  |
| [BotResponseStream](/content/docs/sdk/core.botresponsestream) | Response stream interface for bot streaming responses. Compatible with both VMContext and AWS Lambda runtimes. |
| [CdsCard](/content/docs/sdk/core.cdscard) | CDS Card definition. See [CDS Cards](https://cds-hooks.hl7.org/#card-attributes) for full details. |
| [CdsCreateAction](/content/docs/sdk/core.cdscreateaction) | CDS Create Action. See [CDS Actions](https://cds-hooks.hl7.org/#actions) for full details. |
| [CdsDeleteAction](/content/docs/sdk/core.cdsdeleteaction) | CDS Delete Action. See [CDS Actions](https://cds-hooks.hl7.org/#actions) for full details. |
| [CdsDiscoveryResponse](/content/docs/sdk/core.cdsdiscoveryresponse) | CDS Discovery Response definition. See [CDS Hooks Discovery](https://cds-hooks.hl7.org/#discovery) for full details. |
| [CdsFhirAuthorization](/content/docs/sdk/core.cdsfhirauthorization) | CDS FHIR Authorization definition. |
| [CdsLink](/content/docs/sdk/core.cdslink) | CDS Link definition. See [CDS Link](https://cds-hooks.hl7.org/#link) for full details. |
| [CdsRequest](/content/docs/sdk/core.cdsrequest) | CDS Request definition. See [Calling a CDS Service](https://cds-hooks.hl7.org/#http-request-1) for full details. |
| [CdsRequestWithAuth](/content/docs/sdk/core.cdsrequestwithauth) | CDS Request with FHIR authorization. |
| [CdsResponse](/content/docs/sdk/core.cdsresponse) | CDS Response definition. See [CDS Service Response](https://cds-hooks.hl7.org/#cds-service-response) for full details. |
| [CdsService](/content/docs/sdk/core.cdsservice) | CDS Service definition. See [CDS Hooks Discovery](https://cds-hooks.hl7.org/#response) for full details. |
| [CdsSource](/content/docs/sdk/core.cdssource) | CDS Source definition. See [CDS Source](https://cds-hooks.hl7.org/#source) for full details. |
| [CdsSuggestion](/content/docs/sdk/core.cdssuggestion) | CDS Suggestion definition. See [CDS Suggestions](https://cds-hooks.hl7.org/#suggestion) for full details. |
| [CdsUpdateAction](/content/docs/sdk/core.cdsupdateaction) | CDS Update Action. See [CDS Actions](https://cds-hooks.hl7.org/#actions) for full details. |
| [CloseEvent\_2](/content/docs/sdk/core.closeevent_2/index.html) |  |
| [Code](/content/docs/sdk/core.code) |  |
| [ConceptMapTranslateMatch](/content/docs/sdk/core.conceptmaptranslatematch) |  |
| [ConceptMapTranslateMatchAttribute](/content/docs/sdk/core.conceptmaptranslatematchattribute) |  |
| [ConceptMapTranslateOutput](/content/docs/sdk/core.conceptmaptranslateoutput) |  |
| [ConceptMapTranslateParameters](/content/docs/sdk/core.conceptmaptranslateparameters) |  |
| [Constraint](/content/docs/sdk/core.constraint) |  |
| [CopyOperation](/content/docs/sdk/core.copyoperation) |  |
| [CrawlerOptions](/content/docs/sdk/core.crawleroptions) |  |
| [CrawlerVisitor](/content/docs/sdk/core.crawlervisitor) |  |
| [CreateBinaryOptions](/content/docs/sdk/core.createbinaryoptions) | Binary upload options. |
| [CreateDocumentReferenceOptions](/content/docs/sdk/core.createdocumentreferenceoptions) |  |
| [CreateMediaOptions](/content/docs/sdk/core.createmediaoptions) |  |
| [CreatePdfFunction](/content/docs/sdk/core.createpdffunction) |  |
| [CreatePdfOptions](/content/docs/sdk/core.createpdfoptions) | PDF upload options. |
| [DataSampleOptions](/content/docs/sdk/core.datasampleoptions) |  |
| [ElementType](/content/docs/sdk/core.elementtype) |  |
| [EmailPasswordLoginRequest](/content/docs/sdk/core.emailpasswordloginrequest) |  |
| [ErrorEvent\_2](/content/docs/sdk/core.errorevent_2/index.html) |  |
| [Event\_2](/content/docs/sdk/core.event_2/index.html) |  |
| [ExtendedInternalSchemaElement](/content/docs/sdk/core.extendedinternalschemaelement) |  |
| [Extensible](/content/docs/sdk/core.extensible) | Anything that can carry FHIR extensions: resources such as `Patient`, data types such as `CodeableConcept`, and extensions themselves. Structural, so any of those is accepted, while a type that cannot hold extensions, `Binary` being the notable example, is rejected. |
| [Filter](/content/docs/sdk/core.filter) |  |
| [GenerateSmartHealthLinkParams](/content/docs/sdk/core.generatesmarthealthlinkparams) |  |
| [GetTypedPropertyValueOptions](/content/docs/sdk/core.gettypedpropertyvalueoptions) |  |
| [GoogleCredentialResponse](/content/docs/sdk/core.googlecredentialresponse) |  |
| [GoogleLoginRequest](/content/docs/sdk/core.googleloginrequest) |  |
| [Hl7AckOptions](/content/docs/sdk/core.hl7ackoptions) |  |
| [Hl7DateParseOptions](/content/docs/sdk/core.hl7dateparseoptions) |  |
| [HumanNameFormatOptions](/content/docs/sdk/core.humannameformatoptions) |  |
| [IClientStorage](/content/docs/sdk/core.iclientstorage) |  |
| [ILogger](/content/docs/sdk/core.ilogger) |  |
| [ILoggerConfig](/content/docs/sdk/core.iloggerconfig) |  |
| [IncludeTarget](/content/docs/sdk/core.includetarget) |  |
| [IndexedStructureDefinition](/content/docs/sdk/core.indexedstructuredefinition) | An IndexedStructureDefinition is a lookup-optimized version of a StructureDefinition.<br>StructureDefinition resources contain schema information for other resource types. These schemas can be used to automatically generate user interface elements for resources.<br>However, a StructureDefinition resource is not optimized for realtime lookups. All resource types, sub types, and property definitions are stored in a flat array of ElementDefinition objects. Therefore, to lookup the schema for a property (i.e., "Patient.name") requires a linear scan of all ElementDefinition objects<br>A StructureDefinition resource contains information about one or more types. For example, the "Patient" StructureDefinition includes "Patient", "Patient\_Contact", "Patient\_Communication", and "Patient\_Link". This is inefficient.<br>Instead, we create an indexed version of the StructureDefinition, called IndexedStructureDefinition. In an IndexedStructureDefinition, retrieving a property definition is a hashtable lookup.<br>The hierarchy is: IndexedStructureDefinition - top level for one resource type TypeSchema - one per resource type and all contained BackboneElements PropertySchema - one per property/field |
| [InfixParselet](/content/docs/sdk/core.infixparselet) |  |
| [InternalSchemaElement](/content/docs/sdk/core.internalschemaelement) |  |
| [InternalTypeSchema](/content/docs/sdk/core.internaltypeschema) | Internal representation of a non-primitive FHIR type, suitable for use in resource validation |
| [InviteRequest](/content/docs/sdk/core.inviterequest) |  |
| [IReconnectingWebSocket](/content/docs/sdk/core.ireconnectingwebsocket) |  |
| [IReconnectingWebSocketCtor](/content/docs/sdk/core.ireconnectingwebsocketctor) |  |
| [IWebSocket](/content/docs/sdk/core.iwebsocket) | Generic interface that an implementation of `WebSocket` must satisfy to be used with `ReconnectingWebSocket`. This is a slightly modified fork of the `WebSocket` global type used in Node, narrowed to exactly the members `ReconnectingWebSocket` actually depends on.<br>`addEventListener`/`removeEventListener` declare a typed overload against `IWebSocketEventMap` (the global event interfaces, used here rather than the local `WebSocketEventMap` since they are generic enough to describe the events `ReconnectingWebSocket` attaches to). They also declare the permissive string overload that the real `WebSocket` types carry, which is what lets conformant implementations whose event types do not structurally match the global ones (e.g. the `ws` library, whose events are a minimal subset and use `target: WebSocket`) still satisfy this interface.<br>The `onopen`/`onclose`/`onmessage`/`onerror` handler properties are intentionally omitted: `ReconnectingWebSocket` never assigns to them (it uses `addEventListener`), and because they are function-valued properties their parameters are checked contravariantly, which no single precise event type can satisfy across implementations (e.g. `ws`'s events use `target: WebSocket` while the DOM's use `target: EventTarget | null`).<br>`binaryType` is widened to `string` and `send()` accepts the full `Message` union; a particular implementation should narrow each of these implementation-specific types. |
| [JWTPayload](/content/docs/sdk/core.jwtpayload) | Recognized JWT Claims Set members, any other members may also be present. |
| [LoggerConfig](/content/docs/sdk/core.loggerconfig) |  |
| [LoggerOptions](/content/docs/sdk/core.loggeroptions) |  |
| [LoginAuthenticationResponse](/content/docs/sdk/core.loginauthenticationresponse) |  |
| [LoginProfileResponse](/content/docs/sdk/core.loginprofileresponse) |  |
| [LoginScopeResponse](/content/docs/sdk/core.loginscoperesponse) |  |
| [LoginState](/content/docs/sdk/core.loginstate) |  |
| [LogMessage](/content/docs/sdk/core.logmessage) |  |
| [MailAddress](/content/docs/sdk/core.mailaddress) | Email address definition. Compatible with nodemailer Mail.Address. |
| [MailAttachment](/content/docs/sdk/core.mailattachment) | Email attachment definition. Compatible with nodemailer Mail.Options. |
| [MailOptions](/content/docs/sdk/core.mailoptions) | Email message definition. Compatible with nodemailer Mail.Options. |
| [Marker](/content/docs/sdk/core.marker) |  |
| [MedicationCartClearRequest](/content/docs/sdk/core.medicationcartclearrequest) | Vendor-neutral input to clear the patient's whole vendor cart (`$clear-cart`). |
| [MedicationCartItemResult](/content/docs/sdk/core.medicationcartitemresult) | Per-item outcome from a cart remove/clear. `removed` = the vendor cart item was deleted; `not-in-cart` = the draft was not staged (nothing to remove); `failed` = the vendor delete failed (see `error`). |
| [MedicationCartManageResponse](/content/docs/sdk/core.medicationcartmanageresponse) | Vendor-neutral output from a cart remove/clear: the vendor patient id, the number of cart items actually removed, and the per-line outcomes (one for a remove, N for a clear). |
| [MedicationCartRemoveRequest](/content/docs/sdk/core.medicationcartremoverequest) | Vendor-neutral input to remove a single draft `MedicationRequest` from the patient's vendor cart (`$remove-cart-medication`). |
| [MedicationCheckoutItemResult](/content/docs/sdk/core.medicationcheckoutitemresult) | Per-line outcome from a cart checkout. A single bad line is reported here as `failed` rather than rolling back the lines that already queued. |
| [MedicationCheckoutRequest](/content/docs/sdk/core.medicationcheckoutrequest) | Vendor-neutral input for a cart-checkout bot: submit a set of draft `MedicationRequest`s (the cart) to the vendor's electronic approval queue. |
| [MedicationCheckoutResponse](/content/docs/sdk/core.medicationcheckoutresponse) | Vendor-neutral output from a cart-checkout bot: a single embeddable approval widget URL (the vendor's batch sign-off surface) plus per-line results. |
| [MedicationOrderDrugInput](/content/docs/sdk/core.medicationorderdruginput) | Vendor-neutral drug line for [MedicationOrderRequest](/content/docs/sdk/core.medicationorderrequest). |
| [MedicationOrderExtensions](/content/docs/sdk/core.medicationorderextensions) | Vendor-neutral mapping of the extension URLs / identifier systems used to read pending medication-order state stamped on a `MedicationRequest`. |
| [MedicationOrderRequest](/content/docs/sdk/core.medicationorderrequest) | Vendor-neutral input for an order-medication bot (matches the ScriptSure bot shape). |
| [MedicationOrderResponse](/content/docs/sdk/core.medicationorderresponse) | Vendor-neutral output from an order-medication bot. |
| [MedicationOrderSetRequest](/content/docs/sdk/core.medicationordersetrequest) | Vendor-neutral input for an order-set widget-URL bot.<br>One of `planDefinitionId` (Medplum reverse-lookup to the vendor's orderset id via a cross-system identifier) or `vendorOrderSetId` (escape hatch when no synced PD exists) is required. Bots reject input where both are set so the intent is unambiguous on the wire. |
| [MedicationOrderSetResponse](/content/docs/sdk/core.medicationordersetresponse) | Vendor-neutral output from an order-set widget-URL bot.<br>The bot itself does not create FHIR resources — it just resolves the vendor ids and returns an iframe URL the prescriber loads to review/sign the whole order set in one pass. Optional echoes (`vendorPatientId`, `vendorOrderSetId`, `planDefinitionId`) are surfaced for diagnostics and audit logging. |
| [MedicationSearchParams](/content/docs/sdk/core.medicationsearchparams) | Parameters for a drug search bot used by [MedicationOrderRequest](/content/docs/sdk/core.medicationorderrequest) flows. |
| [MedplumClientOptions](/content/docs/sdk/core.medplumclientoptions) | The MedplumClientOptions interface defines configuration options for MedplumClient.<br>All configuration settings are optional. |
| [MedplumInfraConfig](/content/docs/sdk/core.medpluminfraconfig) |  |
| [MedplumRequestOptions](/content/docs/sdk/core.medplumrequestoptions) |  |
| [MedplumSourceInfraConfig](/content/docs/sdk/core.medplumsourceinfraconfig) |  |
| [MoveOperation](/content/docs/sdk/core.moveoperation) |  |
| [NewPatientRequest](/content/docs/sdk/core.newpatientrequest) |  |
| [NewProjectRequest](/content/docs/sdk/core.newprojectrequest) |  |
| [NewUserRequest](/content/docs/sdk/core.newuserrequest) |  |
| [OrderSetSyncResponse](/content/docs/sdk/core.ordersetsyncresponse) | Vendor-neutral decoded response from the `$sync-orderset` custom operation (`POST /fhir/R4/PlanDefinition/$sync-orderset`). `failedCount > 0` means the synced vendor order set carries fewer meds than the `PlanDefinition`. |
| [OrderSetSyncSequenceResult](/content/docs/sdk/core.ordersetsyncsequenceresult) | Per-action outcome from the vendor-neutral `$sync-orderset` operation. A `'failed'` row carries `error` and was NOT added to the vendor order set, so a later apply/signing session would open with fewer meds than the `PlanDefinition` requested — callers must surface these. |
| [PatchOperation](/content/docs/sdk/core.patchoperation) | JSONPatch patch operation. Compatible with fast-json-patch and rfc6902 Operation. |
| [PatchOptions](/content/docs/sdk/core.patchoptions) |  |
| [PharmacySearchParams](/content/docs/sdk/core.pharmacysearchparams) | Parameters for searching pharmacies. |
| [PointerEvaluation](/content/docs/sdk/core.pointerevaluation) |  |
| [PreferredPharmacy](/content/docs/sdk/core.preferredpharmacy) |  |
| [PrefixParselet](/content/docs/sdk/core.prefixparselet) |  |
| [PushToAgentOptions](/content/docs/sdk/core.pushtoagentoptions) |  |
| [ReadHistoryOptions](/content/docs/sdk/core.readhistoryoptions) |  |
| [RemoveOperation](/content/docs/sdk/core.removeoperation) |  |
| [ReplaceOperation](/content/docs/sdk/core.replaceoperation) |  |
| [RequestCacheEntry](/content/docs/sdk/core.requestcacheentry) |  |
| [RequestProfileSchemaOptions](/content/docs/sdk/core.requestprofileschemaoptions) |  |
| [ResolveSmartHealthLinkParams](/content/docs/sdk/core.resolvesmarthealthlinkparams) |  |
| [ResourceModifiedEvent](/content/docs/sdk/core.resourcemodifiedevent) | Payload of the `resourceModified` event, emitted after this client instance successfully creates, updates, patches, or deletes a FHIR resource.<br>Emitted by `createResource`, `createResourceIfNoneExist`, `updateResource`, `upsertResource`, `patchResource`, `deleteResource`, and by `notifyResourceModified`. Conditional methods (`createResourceIfNoneExist`, `upsertResource`) emit even when the server made no change, except on HTTP 304 "Not Modified".<br>T - The type of the modified resource. Defaults to `Resource`; narrow it (e.g. via `useResourceModified('Slot', ...)`) to get a typed `resource` payload without extra guards. |
| [SearchableToken](/content/docs/sdk/core.searchabletoken) |  |
| [SearchParameterDetails](/content/docs/sdk/core.searchparameterdetails) |  |
| [SearchRequest](/content/docs/sdk/core.searchrequest) |  |
| [SelectionStructure](/content/docs/sdk/core.selectionstructure) | Represents a "selection structure" in the SQL-on-FHIR specification.<br>In practice, this can be a ViewDefinition or ViewDefinitionSelect.<br>TypeScript does not like checks for properties that are not part of the type, so we use this interface instead. |
| [SetIdentifierOptions](/content/docs/sdk/core.setidentifieroptions) |  |
| [SleepOptions](/content/docs/sdk/core.sleepoptions) | Sleep options. |
| [SliceDefinition](/content/docs/sdk/core.slicedefinition) |  |
| [SliceDiscriminator](/content/docs/sdk/core.slicediscriminator) |  |
| [SlicingRules](/content/docs/sdk/core.slicingrules) |  |
| [SmartHealthLinkManifestFile](/content/docs/sdk/core.smarthealthlinkmanifestfile) |  |
| [SmartHealthLinkPayload](/content/docs/sdk/core.smarthealthlinkpayload) |  |
| [SortRule](/content/docs/sdk/core.sortrule) |  |
| [SubManagerOptions](/content/docs/sdk/core.submanageroptions) |  |
| [TestOperation](/content/docs/sdk/core.testoperation) |  |
| [Token](/content/docs/sdk/core.token) |  |
| [TokenizerOptions](/content/docs/sdk/core.tokenizeroptions) |  |
| [TokenResponse](/content/docs/sdk/core.tokenresponse) |  |
| [TokensContext](/content/docs/sdk/core.tokenscontext) |  |
| [TypedValue](/content/docs/sdk/core.typedvalue) |  |
| [TypeInfo](/content/docs/sdk/core.typeinfo) | An indexed TypeSchema.<br>Example: The IndexedStructureDefinition for "Patient" would include the following TypeSchemas: 1) Patient 2) Patient\_Contact 3) Patient\_Communication 4) Patient\_Link |
| [ValidatorOptions](/content/docs/sdk/core.validatoroptions) |  |
| [ValueSetExpandParams](/content/docs/sdk/core.valuesetexpandparams) | ValueSet $expand operation parameters. See [FHIR ValueSet $expand Operation Parameters](https://hl7.org/fhir/r4/valueset-operation-expand.html) for full details. |

## Variables [​](/content/docs/sdk/core\#variables "Direct link to Variables"/index.html)

| Variable | Description |
| --- | --- |
| [AccessPolicyInteraction](/content/docs/sdk/core.accesspolicyinteraction) | Interactions with a resource that can be controlled via an access policy.<br>Codes taken from [http://hl7.org/fhir/codesystem-restful-interaction.html](http://hl7.org/fhir/codesystem-restful-interaction.html) |
| [AckCode](/content/docs/sdk/core.ackcode) |  |
| [allOk](/content/docs/sdk/core.allok) |  |
| [ContentType](/content/docs/sdk/core.contenttype) | Content type constants. |
| [CPT](/content/docs/sdk/core.cpt) |  |
| [created](/content/docs/sdk/core.created) |  |
| [DAYS\_OF\_WEEK](/content/docs/sdk/core.days_of_week/index.html) |  |
| [DEFAULT\_ACCEPT](/content/docs/sdk/core.default_accept/index.html) |  |
| [DEFAULT\_MAX\_SEARCH\_COUNT](/content/docs/sdk/core.default_max_search_count/index.html) |  |
| [DEFAULT\_SEARCH\_COUNT](/content/docs/sdk/core.default_search_count/index.html) |  |
| [EMPTY](/content/docs/sdk/core.empty) | Constant empty array. |
| [ExternalSecretSystems](/content/docs/sdk/core.externalsecretsystems) |  |
| [FHIRCAST\_EVENT\_NAMES](/content/docs/sdk/core.fhircast_event_names/index.html) |  |
| [FHIRCAST\_EVENT\_RESOURCES](/content/docs/sdk/core.fhircast_event_resources/index.html) |  |
| [FHIRCAST\_EVENT\_VERSION\_REQUIRED](/content/docs/sdk/core.fhircast_event_version_required/index.html) |  |
| [FHIRCAST\_RESOURCE\_TYPES](/content/docs/sdk/core.fhircast_resource_types/index.html) |  |
| [fhirTypeToJsType](/content/docs/sdk/core.fhirtypetojstype) |  |
| [forbidden](/content/docs/sdk/core.forbidden) |  |
| [globalSchema](/content/docs/sdk/core.globalschema) | Global schema singleton. |
| [gone](/content/docs/sdk/core.gone) |  |
| [HTTP\_HL7\_ORG](/content/docs/sdk/core.http_hl7_org/index.html) |  |
| [HTTP\_TERMINOLOGY\_HL7\_ORG](/content/docs/sdk/core.http_terminology_hl7_org/index.html) |  |
| [ICD10](/content/docs/sdk/core.icd10) |  |
| [INVALID\_MEDICATION\_CART\_RESPONSE](/content/docs/sdk/core.invalid_medication_cart_response/index.html) | Stable error when a cart-management bot response does not match [MedicationCartManageResponse](/content/docs/sdk/core.medicationcartmanageresponse). |
| [INVALID\_MEDICATION\_CHECKOUT\_RESPONSE](/content/docs/sdk/core.invalid_medication_checkout_response/index.html) | Stable error when a checkout-medications bot response does not match [MedicationCheckoutResponse](/content/docs/sdk/core.medicationcheckoutresponse). |
| [INVALID\_MEDICATION\_ORDER\_RESPONSE](/content/docs/sdk/core.invalid_medication_order_response/index.html) | Stable error when a bot response does not match [MedicationOrderResponse](/content/docs/sdk/core.medicationorderresponse). |
| [INVALID\_MEDICATION\_ORDER\_SET\_RESPONSE](/content/docs/sdk/core.invalid_medication_order_set_response/index.html) | Stable error when an order-set widget-url response is missing `launchUrl`. |
| [INVALID\_MEDICATION\_SEARCH\_RESPONSE](/content/docs/sdk/core.invalid_medication_search_response/index.html) | Stable error when a bot response is not a Medication array. |
| [locationUtils](/content/docs/sdk/core.locationutils) | Location helpers that can be mocked alongside the rest of this module. Centralizes `location` access to work around JSDOM 23+ behavior in test environments. |
| [LogLevel](/content/docs/sdk/core.loglevel) | Logging level, with greater values representing more detailed logs emitted.<br>The zero value means no server logs will be emitted. |
| [LogLevelNames](/content/docs/sdk/core.loglevelnames) |  |
| [LOINC](/content/docs/sdk/core.loinc) |  |
| [MEDICATION\_REQUEST\_STATUS\_REASON\_RESPONSE\_NOT\_RECEIVED](/content/docs/sdk/core.medication_request_status_reason_response_not_received/index.html) | Code stamped on `MedicationRequest.statusReason` when an order-medication operation never returned a verifiable response — the vendor side may have created (and sent) the prescription, or it may have rejected the request, and we cannot tell from the client. Used in place of a hard `DELETE` so the record stays addressable for later reconciliation against vendor webhooks. |
| [MEDICATION\_REQUEST\_STATUS\_REASON\_SYSTEM](/content/docs/sdk/core.medication_request_status_reason_system/index.html) | Canonical CodeSystem URL for `MedicationRequest.statusReason` values stamped by Medplum-managed order flows when a draft MR has to be retired without a confirmed vendor outcome.<br>Downstream reconciliation (vendor webhook bots, audit reports) should match `statusReason.coding[?(@.system==MEDICATION_REQUEST_STATUS_REASON_SYSTEM)]` to recognize records that originated from this soft-delete path rather than a clinician decision. |
| [MEDPLUM\_CLI\_CLIENT\_ID](/content/docs/sdk/core.medplum_cli_client_id/index.html) |  |
| [MEDPLUM\_RELEASES\_URL](/content/docs/sdk/core.medplum_releases_url/index.html) |  |
| [MEDPLUM\_SEMVER\_REGEX](/content/docs/sdk/core.medplum_semver_regex/index.html) |  |
| [MEDPLUM\_VERSION](/content/docs/sdk/core.medplum_version/index.html) |  |
| [multipleMatches](/content/docs/sdk/core.multiplematches) |  |
| [NDC](/content/docs/sdk/core.ndc) |  |
| [notFound](/content/docs/sdk/core.notfound) |  |
| [notModified](/content/docs/sdk/core.notmodified) |  |
| [OAuthClientAssertionType](/content/docs/sdk/core.oauthclientassertiontype) | OAuth 2.0 Client Authentication Methods See [RFC 7523 Section 2.2](https://datatracker.ietf.org/doc/html/rfc7523#section-2.2) for full details. |
| [OAuthGrantType](/content/docs/sdk/core.oauthgranttype) | OAuth 2.0 Grant Type Identifiers Standard identifiers: [https://datatracker.ietf.org/doc/html/draft-ietf-oauth-v2-1-07#name-grant-types](https://datatracker.ietf.org/doc/html/draft-ietf-oauth-v2-1-07#name-grant-types) JWT bearer extension: [https://datatracker.ietf.org/doc/html/rfc7523](https://datatracker.ietf.org/doc/html/rfc7523) Token exchange extension: [https://datatracker.ietf.org/doc/html/rfc8693](https://datatracker.ietf.org/doc/html/rfc8693) Pre-authorized code: [https://openid.net/specs/openid-4-verifiable-credential-issuance-1\_0.html#name-urnietfparamsoauthgrant-typ](https://openid.net/specs/openid-4-verifiable-credential-issuance-1_0.html#name-urnietfparamsoauthgrant-typ) |
| [OAuthSigningAlgorithm](/content/docs/sdk/core.oauthsigningalgorithm) | OAuth Signing Algorithms See [RFC 7519](https://datatracker.ietf.org/doc/html/rfc7519) for full details. |
| [OAuthTokenAuthMethod](/content/docs/sdk/core.oauthtokenauthmethod) | OAuth 2.0 Client Authentication Methods See: [https://openid.net/specs/openid-connect-core-1\\\_0.html\\#ClientAuthentication](https://openid.net/specs/openid-connect-core-1%5C_0.html%5C#ClientAuthentication) |
| [OAuthTokenType](/content/docs/sdk/core.oauthtokentype) | OAuth 2.0 Token Type Identifiers See [RFC 8693 Section 3.1](https://datatracker.ietf.org/doc/html/rfc8693#name-token-type-identifiers) for full details. |
| [Operator](/content/docs/sdk/core.operator) | Search operators. These operators represent "modifiers" and "prefixes" in FHIR search. See: [https://www.hl7.org/fhir/search.html](https://www.hl7.org/fhir/search.html) |
| [OperatorPrecedence](/content/docs/sdk/core.operatorprecedence) | Operator precedence See: [https://hl7.org/fhirpath/\\#operator-precedence](https://hl7.org/fhirpath/%5C#operator-precedence) |
| [PATIENT\_PREFERRED\_PHARMACY\_URL](/content/docs/sdk/core.patient_preferred_pharmacy_url/index.html) |  |
| [PHARMACY\_PREFERENCE\_TYPE\_SYSTEM](/content/docs/sdk/core.pharmacy_preference_type_system/index.html) | Default pharmacy preference type system URL. Vendors may define their own system URL and pass it to the pharmacy functions. |
| [PHARMACY\_TYPE\_PREFERRED](/content/docs/sdk/core.pharmacy_type_preferred/index.html) |  |
| [PHARMACY\_TYPE\_PRIMARY](/content/docs/sdk/core.pharmacy_type_primary/index.html) |  |
| [preconditionFailed](/content/docs/sdk/core.preconditionfailed) |  |
| [projectAdminResourceTypes](/content/docs/sdk/core.projectadminresourcetypes) | Project admin resource types are special resources that are only accessible to project administrators. |
| [PropertyType](/content/docs/sdk/core.propertytype) | List of property types. [http://www.hl7.org/fhir/R4/valueset-defined-types.html](http://www.hl7.org/fhir/R4/valueset-defined-types.html) The list here includes additions found from StructureDefinition resources. |
| [protectedResourceTypes](/content/docs/sdk/core.protectedresourcetypes) | Protected resource types are in the "medplum" project. Reading and writing is limited to the system account. |
| [readInteractions](/content/docs/sdk/core.readinteractions) |  |
| [ReturnAckCategory](/content/docs/sdk/core.returnackcategory) |  |
| [RXNORM](/content/docs/sdk/core.rxnorm) |  |
| [SchedulingEncounterCodingURI](/content/docs/sdk/core.schedulingencountercodinguri) |  |
| [SchedulingParametersURI](/content/docs/sdk/core.schedulingparametersuri) |  |
| [SchedulingPlanDefinitionURI](/content/docs/sdk/core.schedulingplandefinitionuri) |  |
| [SearchParameterType](/content/docs/sdk/core.searchparametertype) |  |
| [ServiceTypeReferenceURI](/content/docs/sdk/core.servicetypereferenceuri) | Extension URI holding a `Reference<HealthcareService>` on a `serviceType` CodeableConcept.<br>In R5/R6, `serviceType` attributes change from `CodeableConcept[]` to `CodeableReference<HealthcareService>`. We approximate that in R4 with this extension.<br>Example: a Schedule whose serviceType refers to a HealthcareService:<br>```json<br>{<br>  "resourceType": "Schedule",<br>  "actor": [{ "reference": "Practitioner/abc" }],<br>  "serviceType": [<br>    {<br>      "extension": [<br>        {<br>          "url": "https://medplum.com/fhir/service-type-reference",<br>          "valueReference": { "reference": "HealthcareService/123" }<br>        }<br>      ]<br>    }<br>  ]<br>}<br>``` |
| [SNOMED](/content/docs/sdk/core.snomed) |  |
| [TimezoneExtensionURI](/content/docs/sdk/core.timezoneextensionuri) |  |
| [tooManyRequests](/content/docs/sdk/core.toomanyrequests) |  |
| [UCUM](/content/docs/sdk/core.ucum) |  |
| [unauthorized](/content/docs/sdk/core.unauthorized) |  |
| [unauthorizedTokenAudience](/content/docs/sdk/core.unauthorizedtokenaudience) |  |
| [unauthorizedTokenExpired](/content/docs/sdk/core.unauthorizedtokenexpired) |  |
| [unsupportedMediaType](/content/docs/sdk/core.unsupportedmediatype) |  |
| [VALID\_HOSTNAME\_REGEX](/content/docs/sdk/core.valid_hostname_regex/index.html) |  |
| [validationRegexes](/content/docs/sdk/core.validationregexes) |  |

## Type Aliases [​](/content/docs/sdk/core\#type-aliases "Direct link to Type Aliases"/index.html)

| Type Alias | Description |
| --- | --- |
| [AccessPolicyInteraction](/content/docs/sdk/core.accesspolicyinteraction) |  |
| [AckCode](/content/docs/sdk/core.ackcode) |  |
| [AgentChannelStats](/content/docs/sdk/core.agentchannelstats) |  |
| [AgentMessage](/content/docs/sdk/core.agentmessage) |  |
| [AgentRequestMessage](/content/docs/sdk/core.agentrequestmessage) |  |
| [AgentResponseMessage](/content/docs/sdk/core.agentresponsemessage) |  |
| [AgentRttStats](/content/docs/sdk/core.agentrttstats) |  |
| [AgentStatPrimitiveValue](/content/docs/sdk/core.agentstatprimitivevalue) |  |
| [AgentStatValue](/content/docs/sdk/core.agentstatvalue) |  |
| [AnchorResourceOpenEvent](/content/docs/sdk/core.anchorresourceopenevent) |  |
| [BackgroundJobInteraction](/content/docs/sdk/core.backgroundjobinteraction) |  |
| [BaseSchema](/content/docs/sdk/core.baseschema) |  |
| [BinarySource](/content/docs/sdk/core.binarysource) | Source for a FHIR Binary. |
| [CanBePopulated](/content/docs/sdk/core.canbepopulated) |  |
| [CdsAction](/content/docs/sdk/core.cdsaction) | CDS Action. See [CDS Actions](https://cds-hooks.hl7.org/#actions) for full details. |
| [CdsUserResource](/content/docs/sdk/core.cdsuserresource) |  |
| [ClientLogLevel](/content/docs/sdk/core.clientloglevel) | Log level for MedplumClient requests and responses. - 'none': No logging - 'basic': Log method, URL, and status code only (no sensitive headers) - 'verbose': Log all details including headers (may include sensitive data) |
| [CodeChallengeMethod](/content/docs/sdk/core.codechallengemethod) | Allowed values for `code_challenge_method` in a PKCE exchange. |
| [CriteriaState](/content/docs/sdk/core.criteriastate) |  |
| [CurrentContext](/content/docs/sdk/core.currentcontext) |  |
| [DataTypesMap](/content/docs/sdk/core.datatypesmap) |  |
| [DayOfWeek](/content/docs/sdk/core.dayofweek) |  |
| [Diff](/content/docs/sdk/core.diff) |  |
| [ElementsContextType](/content/docs/sdk/core.elementscontexttype) | Information for the set of elements at a given path within in a resource. This mostly exists to normalize access to elements regardless of whether they are from a profile, extension, or slice. |
| [EventListener\_2](/content/docs/sdk/core.eventlistener_2/index.html) |  |
| [ExtendedElementProperties](/content/docs/sdk/core.extendedelementproperties) |  |
| [ExternalSecret](/content/docs/sdk/core.externalsecret) |  |
| [ExternalSecretPrimitive](/content/docs/sdk/core.externalsecretprimitive) |  |
| [ExternalSecretPrimitiveType](/content/docs/sdk/core.externalsecretprimitivetype) |  |
| [ExternalSecretSystem](/content/docs/sdk/core.externalsecretsystem) |  |
| [FetchLike](/content/docs/sdk/core.fetchlike) |  |
| [FhircastAnchorResourceType](/content/docs/sdk/core.fhircastanchorresourcetype) |  |
| [FhircastConnectEvent](/content/docs/sdk/core.fhircastconnectevent) |  |
| [FhircastContextResourceType](/content/docs/sdk/core.fhircastcontextresourcetype) |  |
| [FhircastDiagnosticReportCloseContext](/content/docs/sdk/core.fhircastdiagnosticreportclosecontext) |  |
| [FhircastDiagnosticReportOpenContext](/content/docs/sdk/core.fhircastdiagnosticreportopencontext) |  |
| [FhircastDiagnosticReportSelectContext](/content/docs/sdk/core.fhircastdiagnosticreportselectcontext) |  |
| [FhircastDiagnosticReportUpdateContext](/content/docs/sdk/core.fhircastdiagnosticreportupdatecontext) |  |
| [FhircastDisconnectEvent](/content/docs/sdk/core.fhircastdisconnectevent) |  |
| [FhircastEncounterCloseContext](/content/docs/sdk/core.fhircastencounterclosecontext) |  |
| [FhircastEncounterContext](/content/docs/sdk/core.fhircastencountercontext) |  |
| [FhircastEncounterOpenContext](/content/docs/sdk/core.fhircastencounteropencontext) |  |
| [FhircastEventContext](/content/docs/sdk/core.fhircasteventcontext) |  |
| [FhircastEventContextDetails](/content/docs/sdk/core.fhircasteventcontextdetails) |  |
| [FhircastEventKeys](/content/docs/sdk/core.fhircasteventkeys) |  |
| [FhircastEventName](/content/docs/sdk/core.fhircasteventname) |  |
| [FhircastEventPayload](/content/docs/sdk/core.fhircasteventpayload) |  |
| [FhircastEventVersionOptional](/content/docs/sdk/core.fhircasteventversionoptional) |  |
| [FhircastEventVersionRequired](/content/docs/sdk/core.fhircasteventversionrequired) |  |
| [FhircastHubContentContext](/content/docs/sdk/core.fhircasthubcontentcontext) |  |
| [FhircastImagingStudyCloseContext](/content/docs/sdk/core.fhircastimagingstudyclosecontext) |  |
| [FhircastImagingStudyOpenContext](/content/docs/sdk/core.fhircastimagingstudyopencontext) |  |
| [FhircastMessageEvent](/content/docs/sdk/core.fhircastmessageevent) |  |
| [FhircastMessagePayload](/content/docs/sdk/core.fhircastmessagepayload) |  |
| [FhircastOperationOutcomeContext](/content/docs/sdk/core.fhircastoperationoutcomecontext) |  |
| [FhircastPatientCloseContext](/content/docs/sdk/core.fhircastpatientclosecontext) |  |
| [FhircastPatientContext](/content/docs/sdk/core.fhircastpatientcontext) |  |
| [FhircastPatientOpenContext](/content/docs/sdk/core.fhircastpatientopencontext) |  |
| [FhircastPatientReferenceContext](/content/docs/sdk/core.fhircastpatientreferencecontext) |  |
| [FhircastReferenceContext](/content/docs/sdk/core.fhircastreferencecontext) |  |
| [FhircastReportContext](/content/docs/sdk/core.fhircastreportcontext) |  |
| [FhircastReportReferenceContext](/content/docs/sdk/core.fhircastreportreferencecontext) |  |
| [FhircastResourceContext](/content/docs/sdk/core.fhircastresourcecontext) |  |
| [FhircastResourceEventName](/content/docs/sdk/core.fhircastresourceeventname) |  |
| [FhircastResourceType](/content/docs/sdk/core.fhircastresourcetype) |  |
| [FhircastSelectContext](/content/docs/sdk/core.fhircastselectcontext) |  |
| [FhircastStudyContext](/content/docs/sdk/core.fhircaststudycontext) |  |
| [FhircastSubscriptionEventMap](/content/docs/sdk/core.fhircastsubscriptioneventmap) |  |
| [FhircastSyncErrorContext](/content/docs/sdk/core.fhircastsyncerrorcontext) |  |
| [FhircastUpdatesContext](/content/docs/sdk/core.fhircastupdatescontext) |  |
| [FhirFilterExpression](/content/docs/sdk/core.fhirfilterexpression) | The FhirFilterExpression type is the base type of all filter expressions. |
| [FhirPathPatch](/content/docs/sdk/core.fhirpathpatch) |  |
| [IssueSeverity](/content/docs/sdk/core.issueseverity) |  |
| [IssueType](/content/docs/sdk/core.issuetype) |  |
| [IWebSocketEventMap](/content/docs/sdk/core.iwebsocketeventmap) | This map exists separately from `WebSocketEventMap`, which is the actual event map used for the `ReconnectingWebSocket` class itself, due to slight difference in the type between the events as we use them, and the events as they exist as global interfaces. We need the global interfaces to be generic enough to satisfy conformant implementations that don't exactly match the events we export and use in `ReconnectingWebSocket` itself. |
| [LoggerConfigOverride](/content/docs/sdk/core.loggerconfigoverride) |  |
| [LogLevel](/content/docs/sdk/core.loglevel) |  |
| [MailDestination](/content/docs/sdk/core.maildestination) | Email destination definition. |
| [MedplumClientEventMap](/content/docs/sdk/core.medplumclienteventmap) | This map enumerates all the lifecycle events that `MedplumClient` emits and what the shape of the `Event` is. |
| [MedplumSemver](/content/docs/sdk/core.medplumsemver) |  |
| [Message](/content/docs/sdk/core.message) |  |
| [OAuthClientAssertionType](/content/docs/sdk/core.oauthclientassertiontype) |  |
| [OAuthGrantType](/content/docs/sdk/core.oauthgranttype) |  |
| [OAuthSigningAlgorithm](/content/docs/sdk/core.oauthsigningalgorithm) |  |
| [OAuthTokenAuthMethod](/content/docs/sdk/core.oauthtokenauthmethod) |  |
| [OAuthTokenType](/content/docs/sdk/core.oauthtokentype) |  |
| [Operation](/content/docs/sdk/core.operation) |  |
| [Operator](/content/docs/sdk/core.operator) |  |
| [Options](/content/docs/sdk/core.options) |  |
| [OutputRow](/content/docs/sdk/core.outputrow) | SQL on FHIR output row. |
| [Patch](/content/docs/sdk/core.patch) |  |
| [PendingSubscriptionRequest](/content/docs/sdk/core.pendingsubscriptionrequest) |  |
| [ProfileResource](/content/docs/sdk/core.profileresource) |  |
| [ProtocolsProvider](/content/docs/sdk/core.protocolsprovider) |  |
| [QuantityUnit](/content/docs/sdk/core.quantityunit) |  |
| [QueryTypes](/content/docs/sdk/core.querytypes) | QueryTypes defines the different ways to specify FHIR search parameters.<br>Can be any valid input to the URLSearchParams() constructor.<br>TypeScript definitions for URLSearchParams do not match runtime behavior. The official spec only accepts string values. Web browsers and Node.js automatically coerce values to strings. See: [https://github.com/microsoft/TypeScript/issues/32951](https://github.com/microsoft/TypeScript/issues/32951) |
| [RateLimitInfo](/content/docs/sdk/core.ratelimitinfo) |  |
| [ReleaseManifest](/content/docs/sdk/core.releasemanifest) |  |
| [ResourceArray](/content/docs/sdk/core.resourcearray) | ResourceArray is an array of resources with a bundle property. The bundle property is a FHIR Bundle containing the search results. This is useful for retrieving bundle metadata such as total, offset, and next link. |
| [ResourceMatchesSubscriptionCriteria](/content/docs/sdk/core.resourcematchessubscriptioncriteria) |  |
| [ResourceWithCode](/content/docs/sdk/core.resourcewithcode) |  |
| [ReturnAckCategory](/content/docs/sdk/core.returnackcategory) |  |
| [SamplingInfo](/content/docs/sdk/core.samplinginfo) |  |
| [SearchParameterType](/content/docs/sdk/core.searchparametertype) |  |
| [SliceDefinitionWithTypes](/content/docs/sdk/core.slicedefinitionwithtypes) |  |
| [SmartHealthLinkMode](/content/docs/sdk/core.smarthealthlinkmode) |  |
| [StatsFn](/content/docs/sdk/core.statsfn) |  |
| [StringMap](/content/docs/sdk/core.stringmap) |  |
| [SubscriptionEventMap](/content/docs/sdk/core.subscriptioneventmap) |  |
| [SubscriptionRequest](/content/docs/sdk/core.subscriptionrequest) | A `FHIRcast` subscription request.<br>Can be passed to `MedplumClient.fhircastConnect` or `MedplumClient.fhircastUnsubscribe` to either open a `FHIRcast` connection, or unsubscribe from the subscription. |
| [TypedValueWithPath](/content/docs/sdk/core.typedvaluewithpath) |  |
| [TypeName](/content/docs/sdk/core.typename) |  |
| [ValueOrExternalSecret](/content/docs/sdk/core.valueorexternalsecret) |  |
| [VoidableDiff](/content/docs/sdk/core.voidablediff) | VoidableDiff exists to allow the user to provide a partial diff(...) function, falling back to the built-in diffAny(...) function if the user-provided function returns void. |
| [WebSocketEventMap\_2](/content/docs/sdk/core.websocketeventmap_2/index.html) |  |
| [WithId](/content/docs/sdk/core.withid) |  |

- [core package](/content/docs/sdk/core#core-package/index.html)
- [Classes](/content/docs/sdk/core#classes/index.html)
- [Abstract Classes](/content/docs/sdk/core#abstract-classes/index.html)
- [Functions](/content/docs/sdk/core#functions/index.html)
- [Interfaces](/content/docs/sdk/core#interfaces/index.html)
- [Variables](/content/docs/sdk/core#variables/index.html)
- [Type Aliases](/content/docs/sdk/core#type-aliases/index.html)
