@medplum/core 0.10.1 → 0.10.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,9 @@
1
+ import { Resource } from '@medplum/fhirtypes';
2
+ import { SearchRequest } from './search';
3
+ /**
4
+ * Determines if the resource matches the search request.
5
+ * @param resource The resource that was created or updated.
6
+ * @param searchRequest The subscription criteria as a search request.
7
+ * @returns True if the resource satisfies the search request.
8
+ */
9
+ export declare function matchesSearchRequest(resource: Resource, searchRequest: SearchRequest): boolean;
@@ -133,19 +133,26 @@ export declare function createSchema(): IndexedStructureDefinition;
133
133
  /**
134
134
  * Indexes a bundle of StructureDefinitions for faster lookup.
135
135
  * @param bundle A FHIR bundle StructureDefinition resources.
136
+ * @see {@link IndexedStructureDefinition} for more details on indexed StructureDefinitions.
136
137
  */
137
138
  export declare function indexStructureDefinitionBundle(bundle: Bundle): void;
138
139
  /**
139
140
  * Indexes a StructureDefinition for fast lookup.
140
- * See comments on IndexedStructureDefinition for more details.
141
141
  * @param structureDefinition The original StructureDefinition.
142
+ * @see {@link IndexedStructureDefinition} for more details on indexed StructureDefinitions.
142
143
  */
143
144
  export declare function indexStructureDefinition(structureDefinition: StructureDefinition): void;
145
+ /**
146
+ * Indexes a bundle of SearchParameter resources for faster lookup.
147
+ * @param bundle A FHIR bundle SearchParameter resources.
148
+ * @see {@link IndexedStructureDefinition} for more details on indexed StructureDefinitions.
149
+ */
150
+ export declare function indexSearchParameterBundle(bundle: Bundle<SearchParameter>): void;
144
151
  /**
145
152
  * Indexes a SearchParameter resource for fast lookup.
146
153
  * Indexes by SearchParameter.code, which is the query string parameter name.
147
- * @param schema The output IndexedStructureDefinition.
148
154
  * @param searchParam The SearchParameter resource.
155
+ * @see {@link IndexedStructureDefinition} for more details on indexed StructureDefinitions.
149
156
  */
150
157
  export declare function indexSearchParameter(searchParam: SearchParameter): void;
151
158
  export declare function buildTypeName(components: string[]): string;
@@ -11,7 +11,7 @@ import { createReference, arrayBufferToBase64 } from './utils.js';
11
11
  // PKCE auth based on:
12
12
  // https://aws.amazon.com/blogs/security/how-to-add-authentication-single-page-web-application-with-amazon-cognito-oauth2-implementation/
13
13
  var _MedplumClient_instances, _MedplumClient_fetch, _MedplumClient_createPdf, _MedplumClient_storage, _MedplumClient_requestCache, _MedplumClient_cacheTime, _MedplumClient_baseUrl, _MedplumClient_clientId, _MedplumClient_authorizeUrl, _MedplumClient_tokenUrl, _MedplumClient_logoutUrl, _MedplumClient_onUnauthenticated, _MedplumClient_accessToken, _MedplumClient_refreshToken, _MedplumClient_refreshPromise, _MedplumClient_profilePromise, _MedplumClient_profile, _MedplumClient_config, _MedplumClient_addLogin, _MedplumClient_refreshProfile, _MedplumClient_getCacheEntry, _MedplumClient_setCacheEntry, _MedplumClient_request, _MedplumClient_addFetchOptionsDefaults, _MedplumClient_setRequestContentType, _MedplumClient_setRequestBody, _MedplumClient_handleUnauthenticated, _MedplumClient_requestAuthorization, _MedplumClient_refresh, _MedplumClient_fetchTokens, _MedplumClient_verifyTokens, _MedplumClient_setupStorageListener;
14
- const MEDPLUM_VERSION = "0.10.1-221e9b95";
14
+ const MEDPLUM_VERSION = "0.10.2-f713edf5";
15
15
  const DEFAULT_BASE_URL = 'https://api.medplum.com/';
16
16
  const DEFAULT_SCOPE = 'launch/patient openid fhirUser offline_access user/*.*';
17
17
  const DEFAULT_RESOURCE_CACHE_SIZE = 1000;
@@ -4,6 +4,7 @@ export * from './fhirpath';
4
4
  export * from './format';
5
5
  export * from './hl7';
6
6
  export * from './jwt';
7
+ export * from './match';
7
8
  export * from './outcomes';
8
9
  export * from './readablepromise';
9
10
  export * from './search';
package/dist/esm/index.js CHANGED
@@ -7,10 +7,11 @@ export { booleanToTypedValue, fhirPathArrayEquals, fhirPathArrayEquivalent, fhir
7
7
  export { formatAddress, formatDate, formatDateTime, formatFamilyName, formatGivenName, formatHumanName, formatPeriod, formatTime, formatTiming, isValidDate } from './format.js';
8
8
  export { COMPONENT_SEPARATOR, FIELD_SEPARATOR, Hl7Field, Hl7Message, Hl7Segment, SEGMENT_SEPARATOR } from './hl7.js';
9
9
  export { parseJWTPayload } from './jwt.js';
10
+ export { matchesSearchRequest } from './match.js';
10
11
  export { OperationOutcomeError, allOk, assertOk, badRequest, created, forbidden, getStatus, gone, isGone, isNotFound, isOk, normalizeErrorString, notFound, notModified, tooManyRequests, unauthorized } from './outcomes.js';
11
12
  export { ReadablePromise } from './readablepromise.js';
12
13
  export { DEFAULT_SEARCH_COUNT, Operator, formatSearchQuery, parseSearchDefinition } from './search.js';
13
14
  export { SearchParameterType, getExpressionForResourceType, getSearchParameterDetails } from './searchparams.js';
14
- export { PropertyType, buildTypeName, createSchema, getElementDefinition, getPropertyDisplayName, globalSchema, indexSearchParameter, indexStructureDefinition, indexStructureDefinitionBundle } from './types.js';
15
+ export { PropertyType, buildTypeName, createSchema, getElementDefinition, getPropertyDisplayName, globalSchema, indexSearchParameter, indexSearchParameterBundle, indexStructureDefinition, indexStructureDefinitionBundle } from './types.js';
15
16
  export { arrayBufferToBase64, arrayBufferToHex, calculateAge, calculateAgeString, capitalize, createReference, deepClone, deepEquals, findObservationInterval, findObservationReferenceRange, getCodeBySystem, getDateProperty, getDisplayString, getExtensionValue, getIdentifier, getImageSrc, getQuestionnaireAnswers, getReferenceString, isEmpty, isLowerCase, isObject, isProfileResource, isStringArray, isUUID, matchesRange, preciseEquals, preciseGreaterThan, preciseGreaterThanOrEquals, preciseLessThan, preciseLessThanOrEquals, resolveId, setCodeBySystem, stringify } from './utils.js';
16
17
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;"}