core
core package
Classes
Class | Description |
|---|---|
6.5.1. and Returns true if both operands evaluate to true, false if either operand evaluates to false, and the empty collection otherwise. | |
The ClientStorage class is a utility class for storing strings and objects. When using MedplumClient in the browser, it will be backed by browser localStorage. When Using MedplumClient in the server, it will be backed by the MemoryStorage class. For example, the Medplum CLI uses | |
A class representing a
To close the connection, call | |
The FhirFilterComparison class represents a comparison expression. | |
The FhirFilterConnective class represents a connective expression. It contains a list of child expressions. | |
The FhirFilterNegation class represents a negation expression. It contains a single child expression. | |
The Hl7Context class represents the parsing context for an HL7 message. | |
The Hl7Field class represents one HL7 field. A field is a collection of components. | |
The Hl7Message class represents one HL7 message. A message is a collection of segments. | |
The Hl7Segment class represents one HL7 segment. A segment is a collection of fields. The name field is the first field. | |
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 | |
LRU cache (least recently used) Source: https://stackoverflow.com/a/46432113 | |
The MedplumClient class provides a client for the Medplum FHIR server. The client can be used in the browser, in a Node.js application, or in a Medplum Bot. 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 The client can also be used to integrate with other FHIR servers. For an example, see the Epic Connection Demo Bot. | |
The MemoryStorage class is a minimal in-memory implementation of the Storage interface. | |
The MockAsyncClientStorage class is a mock implementation of the ClientStorage class. This can be used for testing async initialization of the MedplumClient. | |
6.5.2. or Returns false if both operands evaluate to false, true if either operand evaluates to true, and empty ( | |
JSON Pointer representation | |
The ReadablePromise class wraps a request promise suitable for React Suspense. See: https://blog.logrocket.com/react-suspense-data-fetching/\#wrappromise-js See: https://github.com/ovieokeh/suspense-data-fetching/blob/master/lib/api/wrapPromise.js | |
An ----- ### Events emitted:
| |
The TransformMapCollection class is a collection of StructureMap and ConceptMap resources. It is used to store and retrieve imported StructureMaps and ConceptMaps by URL. | |
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
Abstract Class | Description |
|---|---|
Functions
Function | Description |
|---|---|
accessPolicySupportsInteraction(accessPolicy, interaction, resourceType) | 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. |
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) | 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'. |
Adds the supplied profileUrl to the resource.meta.profile if it is not already specified | |
Switch on | |
Adds default values to | |
Adds default values to | |
applyFixedOrPatternValue(inputValue, key, element, elements) | |
Apply a 'application/json-patch+json'-type patch to an object.
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. This method mutates the target object in-place. | |
Converts an ArrayBuffer to a base-64 encoded string. | |
Converts an ArrayBuffer to hex string. See: https://stackoverflow.com/a/55200387 | |
Checks that a value has type | |
Asserts that the operation completed successfully and that the resource is defined. | |
Asserts that a given candidate is a | |
Returns a single element array with a typed boolean value. | |
Builds a CDS request. | |
Builds the Paired with | |
Calculates the age in years from the birth date. | |
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. | |
Determines if the current user can read the specified resource type. | |
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. | |
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. | |
Recursively checks for null values in an object. Note that "null" is a special value in JSON that is not allowed in FHIR. | |
Tests that a given version string is a valid existing Medplum release version. | |
Clears the locally-cached | |
Checks if a CodeableConcept matches a token search string https://build.fhir.org/search.html\#token | |
Checks if a Coding matches a token search string https://build.fhir.org/search.html\#token | |
Compares two Medplum semver version strings, ignoring any trailing commit-hash suffix. | |
Concatenates the given base URL and URL. If the URL is absolute, it is returned as-is. | |
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. | |
Takes a bundle and creates a Transaction Type bundle | |
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. This operation is functionally identical to an "add" operation at the target location using the value specified in the "from" member. Alternatively, it's like 'move' without the 'remove'. | |
Crawls the typed value synchronously. | |
Crawls the typed value asynchronously. | |
createFhircastMessagePayload(topic, event, context, versionId) | Creates a serializable JSON payload for the |
createOperationOutcomeIssue(severity, code, message, path, data) | |
Produce a 'application/json-patch+json'-type patch to get from one object to another. This does not alter
Returns list of operations to perform on | |
createPreferredPharmacyExtension(orgRef, isPrimary, preferenceTypeSystem) | Creates a preferredPharmacy extension object. |
Creates a reference resource. | |
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). This does not alter Returns list of test operations. | |
Decodes a base64 string. Handles both browser and Node environments. Supports Unicode characters. | |
Decodes a string from Base64URL format. | |
Creates a deep clone of the input value. Limitations: - Only supports JSON primitives and arrays. - Does not support Functions, lambdas, etc. - Does not support circular references. See: https://web.dev/structured-clone/ See: https://stackoverflow.com/questions/40488190/how-is-structured-clone-algorithm-different-from-deep-copy | |
Resource equality. Ignores meta.versionId and meta.lastUpdated. | |
Checks if value includes all fields and values of pattern. It doesn't matter if value has extra fields, values, etc. | |
Derives an "identifier" search parameter from a reference search parameter. FHIR references can have an "identifier" property. Any FHIR reference search parameter can be used to search for resources with an identifier. However, the FHIR specification does not define an "identifier" search parameter for every resource type. This function derives an "identifier" search parameter from a reference search parameter. | |
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. | |
Calculate the shortest sequence of operations to get from 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. output A Z - - [0] 1 2 input A | 1 [0] 1 B | 2 [1] 1 C | 3 2 [2]
If the | |
Encodes a base64 string. Handles both browser and Node environments. Supports Unicode characters. | |
Encodes a string into Base64URL format. This is the encoding required for JWT parts. | |
Encrypts a string with SHA256 encryption. | |
Ensures the given URL has no leading slash. | |
Ensures the given URL has a trailing slash. | |
Returns the escaped HTML string of the input string. | |
Escape token part of a JSON Pointer string '~' needs to be encoded as '~0' and '/' needs to be encoded as '~1' when these characters appear in a reference token. This is the exact inverse of | |
Evaluates a FHIRPath expression against a resource or other object. | |
Evaluates a FHIRPath expression against a resource or other object. | |
Evaluates a SQL-on-FHIR view on a set of FHIR resources. | |
Normalizes Medplum's | |
Extracts HealthcareService references from serviceType concepts. | |
Fetches the version strings for all published Medplum releases. | |
Fetches the latest Medplum release version string. | |
Fetches the manifest for a given Medplum release version. | |
Determines if two arrays are equal according to FHIRPath equality rules. | |
Determines if two arrays are equivalent according to FHIRPath equality rules. | |
Determines if two arrays are not equal according to FHIRPath equality rules. | |
Determines if two values are equal according to FHIRPath equality rules. | |
Determines if two values are equivalent according to FHIRPath equality rules. | |
Determines if the typed value is the desired type. | |
Returns a negated FHIRPath boolean expression. | |
Finds the code for a specific system in a list of CodeableConcepts. | |
findObservationInterval(definition, patient, value, category) | Tries to find an observation interval for the given patient and value. |
Tries to find an observation reference range for the given patient and condition names. | |
Returns all matching observation reference range for the given patient and condition names. | |
Finds the first resource in the input array that matches the specified code and system. | |
Formats a FHIR Address as a string. | |
Formats a CodeableConcept element as a string. | |
Formats a Coding element as a string. | |
Formats a FHIR date string as a human readable string. Handles missing values and invalid dates. | |
Formats a FHIR dateTime string as a human readable string. Handles missing values and invalid dates. | |
Formats the family name portion of a FHIR HumanName element. | |
Formats the given name portion of a FHIR HumanName element. | |
Formats an ISO date/time string into an HL7 date/time string. | |
Formats a FHIR HumanName as a string. | |
Formats a FHIR Observation resource value as a string. | |
Formats a FHIR Period as a human readable string. | |
Returns a human-readable string for a FHIR Quantity datatype, taking into account units and comparators | |
Returns a human-readable string for a FHIR Range datatype, taking into account one-sided ranges | |
Formats a FHIR Reference as a string. | |
Formats a search definition object into a query string. Note: The return value does not include the resource type. | |
Formats a FHIR time string as a human readable string. Handles missing values and invalid dates. | |
Formats a FHIR Timing as a human readable string. | |
Formats a FHIR time string as a human readable string. The viewer's timezone does not affect the display. | |
Cross platform random UUID generator | |
Returns an array of questionnaire answers as a map by link ID. | |
Returns the global Buffer constructor if available. | |
Tries to find a code string for a given system within a given codeable concept. | |
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) | |
Returns a display string for the resource. | |
Returns an element definition by type and property name. | |
Returns an element definition from mapping of elements by property name. | |
Returns the type name for an ElementDefinition. | |
Returns an extension by extension URLs. | |
Returns an extension value by extension URLs. | |
Returns the resource identifier for the given system. If multiple identifiers exist with the same system, the first one is returned. If the system is not found, then returns undefined. | |
Returns an image URL for the resource, if one is available. | |
Reads the medication-order iframe launch URL from MedicationRequest extensions. | |
getParsedDerivedIdentifierExpression(originalExpression, atom) | |
getParsedExpressionForResourceType(resourceType, expression) | |
Returns the difference between two paths which is often suitable to use as a key in a | |
Returns a human friendly display name for a FHIR element definition path. | |
Reads the pending medication-order id from MedicationRequest identifiers. | |
Reads the pending medication-order status code from MedicationRequest extensions. | |
getPreferredPharmaciesFromPatient(patient, preferenceTypeSystem) | Extracts preferred pharmacies from a Patient resource's extensions. |
Returns a human friendly display name for a FHIR element property or slice name | |
Converts the given | |
Returns all questionnaire answers as a map by link ID. | |
Returns a cryptographically secure random string. | |
Returns a reference string for a resource. | |
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. | |
Returns a search parameter for a resource type by search code. | |
Returns the type details of a SearchParameter. The SearchParameter resource has a "type" parameter, but that is missing some critical information. 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. | |
Returns the search parameters for the resource type indexed by search code. | |
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. | |
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. | |
Returns the value of the property and the property type using a type schema. | |
getValueSliceName(value, slices, discriminators, profileUrl) | |
Concatenates a given base URL and path, ensuring the URL has the appropriate | |
Returns the global window object if available. | |
Returns whether a Schedule or HealthcareService has a SchedulingParameters extension. | |
Indexes a SearchParameter resource for fast lookup. Indexes by SearchParameter.code, which is the query string parameter name. | |
Indexes a bundle of SearchParameter resources for faster lookup. | |
Parses and indexes structure definitions | |
List the keys that shared by all The semantics of what constitutes a "key" is described in subtract(). | |
Type guard for a valid HL7 acknowledgment code (MSA-1). | |
Type guard to validate an add pharmacy bot response. | |
Returns true if running in a browser environment with window available. | |
Returns true if the input value is a CodeableConcept object. This is a heuristic check based on the presence of the "coding" property. | |
Returns true if the input value is a Coding object. This is a heuristic check based on the presence of the "code" property. | |
Returns true if the input value is a YYYY-MM-DD date string. | |
Returns true if the input value is a YYYY-MM-DDThh:mm:ss.sssZ date/time string. | |
Helper function to narrow a type by excluding undefined/null values. | |
Returns true if the value is empty (null, undefined, empty string, or empty object). | |
Returns true if the input is an Error object. This should be replaced with | |
Checks if a | |
isFhirCriteriaMet(subscription, currentResource, getPreviousResource) | |
Returns true if the token is a JWT. | |
Type guard: validates an array of Medication resources (drug search bot output). Walks every entry rather than spot-checking the first so a tuple-shaped payload like | |
Type guard: validates a cart-management bot response. | |
Type guard: validates a checkout-medications bot response. | |
Type guard: validates an order-medication bot response. | |
Type guard: validates an order-set widget-URL bot response. | |
Returns true if the access token was issued by a Medplum server. | |
Returns true if running in Node.js environment with Buffer available. | |
Returns true if the input is an object. | |
Type guard to validate that a value is an array of Organization resources. | |
Determines if the input is a Period object. This is heuristic based, as we do not have strong typing at runtime. | |
Returns true if the value is a non-empty string, an object with a length property greater than zero, or a non-empty object | |
Returns true if the type code is a primitive type. | |
Returns true if the resource is a "ProfileResource". | |
Determines if the input is a Quantity object. This is heuristic based, as we do not have strong typing at runtime. | |
Type guard to validate that an object is a FHIR reference | |
Type guard to validate that an object is a FHIR resource | |
Returns true if the given string is a valid FHIR resource type. | |
Returns true if the type schema is a non-abstract FHIR resource. | |
Returns true if the input value is a string. | |
Returns true if the input array is an array of strings. | |
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. | |
Returns true if the value is a TypedValue. | |
Returns true if the input string is a UUID. | |
Returns true if the given date object is a valid date. Dates can be invalid if created by parsing an invalid string. | |
Tests whether a given input is a valid hostname. __NOTE: Does not validate that the input is a valid domain name, only a valid hostname.__ | |
Tests that a given version string follows the basic semver pattern of | |
Memoizes the result of a parameterless function | |
Returns a Map of resources from a bundle, using the specified identifier system as the key. | |
Returns true if the value is in the range accounting for precision. | |
Determines if the resource matches the search request. | |
Encodes a MedicationCartClearRequest as a FHIR | |
Encodes a MedicationCartRemoveRequest as a FHIR | |
Encodes a MedicationCheckoutRequest as a FHIR
| |
Encodes a MedicationOrderRequest as a FHIR Nested arrays ( | |
Encodes a MedicationOrderSetRequest as a FHIR
| |
Encodes a MedicationSearchParams as a FHIR | |
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. 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. TODO: throw if the check described in the previous paragraph fails. | |
No operation function. | |
Normalizes an This is useful in cases where you need to operate on the raw bytes of an | |
Normalizes the various
| |
Normalizes an error object into a displayable error string. | |
Normalizes an error object into an OperationOutcome. | |
Returns a string representation of the operation outcome issue. | |
Returns a string representation of the operation outcome. | |
Decodes the | |
Decodes the The repeating | |
Decodes the | |
Decodes the Echoed vendor ids ( | |
Decodes the | |
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. | |
Parses a FHIRPath Patch | |
Parses a FHIR _filter parameter expression into an AST. | |
Returns a formatted string representing the date in ISO-8601 format. HL7-Definition V2 Specifies a point in time using a 24-hour clock notation. Format: YYYY[MM[DD[HH[MM[SS[. S[S[S[S]]]]]]]]][+/-ZZZZ]. | |
Parses the JWT payload. | |
Parses a FHIR Mapping Language document into an AST. | |
Parses a reference and returns a tuple of [ResourceType, ID]. | |
Parses a search URL into a search request. | |
Parses a StructureDefinition resource into an internal schema better suited for programmatic validation and usage in internal systems | |
Parses an extended FHIR search criteria string (i.e. application/x-fhir-query). | |
Translates a path emitted by this crawler into an RFC6902 JSON Patch pointer | |
Returns true if the two numbers are equal to the given precision. | |
Returns true if the first number is greater than the second number to the given precision. | |
Returns true if the first number is greater than or equal to the second number to the given precision. | |
Returns true if the first number is less than the second number to the given precision. | |
Returns true if the first number is less than or equal to the second number to the given precision. | |
Returns the input number rounded to the specified number of digits. | |
The "remove" operation removes the value at the target location. The target location MUST exist for the operation to be successful. | |
Removes duplicates in array using FHIRPath equality rules. | |
Removes a preferred pharmacy extension from a Patient. | |
Removes the supplied profileUrl from the resource.meta.profile if it is present | |
Topologically sorts a 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 | |
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. 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. Even more simply, it's like the add operation with an existence check. | |
Replaces prefetch query variables with values from the context or user profile. 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. Prefetch tokens MUST be delimited by Note that the spec says: Individual hooks specify which of their Unfortunately, many CDS Hooks services do not follow this rule. Therefore, this implementation allows access to nested fields. | |
Returns the ID portion of a reference. | |
Checks that there is an access policy permitting the given resource interaction, returning the matching policy object. | |
Serializes an Error object into a plain object, including nested causes and custom properties. | |
Creates a serialized url-encoded payload for a | |
Returns whether any serviceType concept refers to the given HealthcareService. | |
Sets a code for a given system within a given codeable concept. | |
Sets a resource identifier for the given system. 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. If the identifier already exists, then the value is updated. Otherwise a new identifier is added. | |
Sleeps for the specified number of milliseconds. | |
Sorts an array of strings in place using the localeCompare method. This method will mutate the input array. | |
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. | |
Splits a FHIR search value on commas. Respects backslash escape. | |
Reads data from a Readable stream and returns a Promise that resolves with a Buffer containing all the data. | |
Returns the FHIR JSON string representation of the input value. Removes properties with empty string values. Removes objects with zero properties. 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. | |
Output the string representation of a value, suitable for use as part of a search query. | |
Transforms input values using a FHIR StructureMap. | |
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. | |
List the keys in 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. | |
summarizeObservations(observations, summaryCode, summarizeFn) | Summarizes a group of Observations into a single computed summary value, with the individual values preserved in |
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. | |
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. | |
Tries to convert an unknown input value to a Period object. | |
Converts a HealthcareService into the CodeableConcept values used by | |
Returns a "best guess" TypedValue for a given value. | |
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. | |
Returns the JWT expiration time in number of milliseconds elapsed since the epoch. | |
Converts a typed value to a string. | |
Unescape token part of a JSON Pointer string
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). Here's my take: ~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. | |
Validates that a | |
Validates that the given string is a valid FHIR resource type. On success, silently returns void. On failure, throws an OperationOutcomeError. | |
Checks if a newer version of Medplum is available and logs a warning if so. | |
Returns a word-wrapped string. Based on: https://stackoverflow.com/a/38709683 |
Interfaces
Interface | Description |
|---|---|
Parameters for adding a pharmacy to a patient's favorites. | |
Response from adding a pharmacy to a patient's favorites. | |
Statistics about the running agent. Known fields are typed; additional fields may be present and are preserved as unknown values. | |
Response stream interface for bot streaming responses. Compatible with both VMContext and AWS Lambda runtimes. | |
CDS Card definition. See CDS Cards for full details. | |
CDS Create Action. See CDS Actions for full details. | |
CDS Delete Action. See CDS Actions for full details. | |
CDS Discovery Response definition. See CDS Hooks Discovery for full details. | |
CDS FHIR Authorization definition. | |
CDS Link definition. See CDS Link for full details. | |
CDS Request definition. See Calling a CDS Service for full details. | |
CDS Request with FHIR authorization. | |
CDS Response definition. See CDS Service Response for full details. | |
CDS Service definition. See CDS Hooks Discovery for full details. | |
CDS Source definition. See CDS Source for full details. | |
CDS Suggestion definition. See CDS Suggestions for full details. | |
CDS Update Action. See CDS Actions for full details. | |
Binary upload options. | |
PDF upload options. | |
An IndexedStructureDefinition is a lookup-optimized version of a StructureDefinition. StructureDefinition resources contain schema information for other resource types. These schemas can be used to automatically generate user interface elements for resources. 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 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. Instead, we create an indexed version of the StructureDefinition, called IndexedStructureDefinition. In an IndexedStructureDefinition, retrieving a property definition is a hashtable lookup. The hierarchy is: IndexedStructureDefinition - top level for one resource type TypeSchema - one per resource type and all contained BackboneElements PropertySchema - one per property/field | |
Internal representation of a non-primitive FHIR type, suitable for use in resource validation | |
Generic interface that an implementation of
The
| |
Recognized JWT Claims Set members, any other members may also be present. | |
Email address definition. Compatible with nodemailer Mail.Address. | |
Email attachment definition. Compatible with nodemailer Mail.Options. | |
Email message definition. Compatible with nodemailer Mail.Options. | |
Vendor-neutral input to clear the patient's whole vendor cart ( | |
Per-item outcome from a cart remove/clear. | |
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). | |
Vendor-neutral input to remove a single draft | |
Per-line outcome from a cart checkout. A single bad line is reported here as | |
Vendor-neutral input for a cart-checkout bot: submit a set of draft | |
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. | |
Vendor-neutral drug line for MedicationOrderRequest. | |
Vendor-neutral mapping of the extension URLs / identifier systems used to read pending medication-order state stamped on a | |
Vendor-neutral input for an order-medication bot (matches the ScriptSure bot shape). | |
Vendor-neutral output from an order-medication bot. | |
Vendor-neutral input for an order-set widget-URL bot. One of | |
Vendor-neutral output from an order-set widget-URL bot. 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 ( | |
Parameters for a drug search bot used by MedicationOrderRequest flows. | |
The MedplumClientOptions interface defines configuration options for MedplumClient. All configuration settings are optional. | |
Vendor-neutral decoded response from the | |
Per-action outcome from the vendor-neutral | |
JSONPatch patch operation. Compatible with fast-json-patch and rfc6902 Operation. | |
Parameters for searching pharmacies. | |
Payload of the Emitted by T - The type of the modified resource. Defaults to | |
Represents a "selection structure" in the SQL-on-FHIR specification. In practice, this can be a ViewDefinition or ViewDefinitionSelect. TypeScript does not like checks for properties that are not part of the type, so we use this interface instead. | |
Sleep options. | |
An indexed TypeSchema. Example: The IndexedStructureDefinition for "Patient" would include the following TypeSchemas: 1) Patient 2) Patient_Contact 3) Patient_Communication 4) Patient_Link | |
ValueSet $expand operation parameters. See FHIR ValueSet $expand Operation Parameters for full details. |
Variables
Variable | Description |
|---|---|
Interactions with a resource that can be controlled via an access policy. Codes taken from http://hl7.org/fhir/codesystem-restful-interaction.html | |
Content type constants. | |
Constant empty array. | |
Global schema singleton. | |
Stable error when a cart-management bot response does not match MedicationCartManageResponse. | |
Stable error when a checkout-medications bot response does not match MedicationCheckoutResponse. | |
Stable error when a bot response does not match MedicationOrderResponse. | |
Stable error when an order-set widget-url response is missing | |
Stable error when a bot response is not a Medication array. | |
Location helpers that can be mocked alongside the rest of this module. Centralizes | |
Logging level, with greater values representing more detailed logs emitted. The zero value means no server logs will be emitted. | |
Code stamped on | |
Canonical CodeSystem URL for Downstream reconciliation (vendor webhook bots, audit reports) should match | |
OAuth 2.0 Client Authentication Methods See RFC 7523 Section 2.2 for full details. | |
OAuth 2.0 Grant Type Identifiers Standard identifiers: 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 Token exchange extension: 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 | |
OAuth Signing Algorithms See RFC 7519 for full details. | |
OAuth 2.0 Client Authentication Methods See: https://openid.net/specs/openid-connect-core-1\_0.html\#ClientAuthentication | |
OAuth 2.0 Token Type Identifiers See RFC 8693 Section 3.1 for full details. | |
Search operators. These operators represent "modifiers" and "prefixes" in FHIR search. See: https://www.hl7.org/fhir/search.html | |
Operator precedence See: https://hl7.org/fhirpath/\#operator-precedence | |
Default pharmacy preference type system URL. Vendors may define their own system URL and pass it to the pharmacy functions. | |
Project admin resource types are special resources that are only accessible to project administrators. | |
List of property types. http://www.hl7.org/fhir/R4/valueset-defined-types.html The list here includes additions found from StructureDefinition resources. | |
Protected resource types are in the "medplum" project. Reading and writing is limited to the system account. | |
Extension URI holding a In R5/R6, Example: a Schedule whose serviceType refers to a HealthcareService: | |
Type Aliases
Type Alias | Description |
|---|---|
Source for a FHIR Binary. | |
CDS Action. See CDS Actions for full details. | |
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) | |
Allowed values for | |
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. | |
The FhirFilterExpression type is the base type of all filter expressions. | |
This map exists separately from | |
Email destination definition. | |
This map enumerates all the lifecycle events that | |
SQL on FHIR output row. | |
QueryTypes defines the different ways to specify FHIR search parameters. Can be any valid input to the URLSearchParams() constructor. 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 | |
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. | |
A Can be passed to | |
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. | |