@medplum/core 0.9.22 → 0.9.25
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.
- package/dist/cjs/index.js +51 -5
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/index.min.js +1 -1
- package/dist/cjs/index.min.js.map +1 -1
- package/dist/esm/index.js +50 -6
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/index.min.js +1 -1
- package/dist/esm/index.min.js.map +1 -1
- package/dist/types/client.d.ts +31 -6
- package/dist/types/index.d.ts +1 -0
- package/dist/types/utils.d.ts +8 -0
- package/package.json +3 -3
package/dist/esm/index.js
CHANGED
|
@@ -611,6 +611,17 @@ function findObservationInterval(definition, patient, value, category) {
|
|
|
611
611
|
(category === undefined || interval.category === category);
|
|
612
612
|
});
|
|
613
613
|
}
|
|
614
|
+
/**
|
|
615
|
+
* Tries to find an observation reference range for the given patient and condition names.
|
|
616
|
+
* @param definition The observation definition.
|
|
617
|
+
* @param patient The patient.
|
|
618
|
+
* @param names The condition names.
|
|
619
|
+
* @returns The observation interval if found; otherwise undefined.
|
|
620
|
+
*/
|
|
621
|
+
function findObservationReferenceRange(definition, patient, names) {
|
|
622
|
+
var _a;
|
|
623
|
+
return (_a = definition.qualifiedInterval) === null || _a === void 0 ? void 0 : _a.find((interval) => observationIntervalMatchesPatient(interval, patient) && names.includes(interval.condition));
|
|
624
|
+
}
|
|
614
625
|
/**
|
|
615
626
|
* Returns true if the patient matches the observation interval.
|
|
616
627
|
* @param interval The observation interval.
|
|
@@ -6336,15 +6347,48 @@ class MedplumClient extends EventTarget {
|
|
|
6336
6347
|
return __classPrivateFieldGet(this, _MedplumClient_instances, "m", _MedplumClient_request).call(this, 'DELETE', url, options);
|
|
6337
6348
|
}
|
|
6338
6349
|
/**
|
|
6339
|
-
*
|
|
6350
|
+
* Initiates a new user flow.
|
|
6351
|
+
*
|
|
6352
|
+
* This method is part of the two different user registration flows:
|
|
6353
|
+
* 1) New Practitioner and new Project
|
|
6354
|
+
* 2) New Patient registration
|
|
6355
|
+
*
|
|
6340
6356
|
* @category Authentication
|
|
6341
|
-
* @param request
|
|
6357
|
+
* @param registerRequest Register request including email and password.
|
|
6358
|
+
* @returns Promise to the authentication response.
|
|
6359
|
+
*/
|
|
6360
|
+
startNewUser(registerRequest) {
|
|
6361
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
6362
|
+
yield __classPrivateFieldGet(this, _MedplumClient_instances, "m", _MedplumClient_startPkce).call(this);
|
|
6363
|
+
return this.post('auth/newuser', Object.assign(Object.assign({}, registerRequest), { codeChallengeMethod: 'S256', codeChallenge: __classPrivateFieldGet(this, _MedplumClient_storage, "f").getString('codeChallenge') }));
|
|
6364
|
+
});
|
|
6365
|
+
}
|
|
6366
|
+
/**
|
|
6367
|
+
* Initiates a new project flow.
|
|
6368
|
+
*
|
|
6369
|
+
* This requires a partial login from `startNewUser` or `startNewGoogleUser`.
|
|
6370
|
+
*
|
|
6371
|
+
* @param registerRequest Register request including email and password.
|
|
6372
|
+
* @param login The partial login to complete. This should come from the `startNewUser` method.
|
|
6373
|
+
* @returns Promise to the authentication response.
|
|
6374
|
+
*/
|
|
6375
|
+
startNewProject(registerRequest, login) {
|
|
6376
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
6377
|
+
return this.post('auth/newproject', Object.assign(Object.assign({}, registerRequest), login));
|
|
6378
|
+
});
|
|
6379
|
+
}
|
|
6380
|
+
/**
|
|
6381
|
+
* Initiates a new patient flow.
|
|
6382
|
+
*
|
|
6383
|
+
* This requires a partial login from `startNewUser` or `startNewGoogleUser`.
|
|
6384
|
+
*
|
|
6385
|
+
* @param registerRequest Register request including email and password.
|
|
6386
|
+
* @param login The partial login to complete. This should come from the `startNewUser` method.
|
|
6342
6387
|
* @returns Promise to the authentication response.
|
|
6343
6388
|
*/
|
|
6344
|
-
|
|
6389
|
+
startNewPatient(registerRequest, login) {
|
|
6345
6390
|
return __awaiter(this, void 0, void 0, function* () {
|
|
6346
|
-
|
|
6347
|
-
yield this.setActiveLogin(response);
|
|
6391
|
+
return this.post('auth/newpatient', Object.assign(Object.assign({}, registerRequest), login));
|
|
6348
6392
|
});
|
|
6349
6393
|
}
|
|
6350
6394
|
/**
|
|
@@ -10716,5 +10760,5 @@ function simplifyExpression(input) {
|
|
|
10716
10760
|
return result;
|
|
10717
10761
|
}
|
|
10718
10762
|
|
|
10719
|
-
export { AndAtom, ArithemticOperatorAtom, AsAtom, COMPONENT_SEPARATOR, ConcatAtom, ContainsAtom, DEFAULT_SEARCH_COUNT, DotAtom, EmptySetAtom, EqualsAtom, EquivalentAtom, FIELD_SEPARATOR, FhirPathAtom, FunctionAtom, Hl7Field, Hl7Message, Hl7Segment, InAtom, IndexerAtom, IsAtom, LRUCache, LiteralAtom, MedplumClient, NotEqualsAtom, NotEquivalentAtom, OperationOutcomeError, Operator, OrAtom, PropertyType, ReadablePromise, SEGMENT_SEPARATOR, SearchParameterType, SymbolAtom, UnaryOperatorAtom, UnionAtom, XorAtom, accessDenied, allOk, arrayBufferToBase64, arrayBufferToHex, assertOk, badRequest, booleanToTypedValue, buildTypeName, calculateAge, calculateAgeString, capitalize, createReference, createSchema, createTypeSchema, created, deepEquals$1 as deepEquals, evalFhirPath, evalFhirPathTyped, fhirPathArrayEquals, fhirPathArrayEquivalent, fhirPathEquals, fhirPathEquivalent, fhirPathIs, fhirPathNot, findObservationInterval, formatAddress, formatFamilyName, formatGivenName, formatHumanName, formatSearchQuery, getCodeBySystem, getDateProperty, getDisplayString, getExpressionForResourceType, getExtensionValue, getIdentifier, getImageSrc, getPropertyDisplayName, getQuestionnaireAnswers, getReferenceString, getSearchParameterDetails, getStatus, getTypedPropertyValue, globalSchema, gone, indexSearchParameter, indexStructureDefinition, indexStructureDefinitionBundle, isGone, isLowerCase, isNotFound, isObject$1 as isObject, isOk, isPeriod, isProfileResource, isQuantity, isQuantityEquivalent, isStringArray, isUUID, matchesRange, notFound, notModified, parseFhirPath, parseSearchDefinition, preciseEquals, preciseGreaterThan, preciseGreaterThanOrEquals, preciseLessThan, preciseLessThanOrEquals, removeDuplicates, resolveId, setCodeBySystem, stringify, toJsBoolean, toTypedValue, tokenize };
|
|
10763
|
+
export { AndAtom, ArithemticOperatorAtom, AsAtom, COMPONENT_SEPARATOR, ConcatAtom, ContainsAtom, DEFAULT_SEARCH_COUNT, DotAtom, EmptySetAtom, EqualsAtom, EquivalentAtom, FIELD_SEPARATOR, FhirPathAtom, FunctionAtom, Hl7Field, Hl7Message, Hl7Segment, InAtom, IndexerAtom, IsAtom, LRUCache, LiteralAtom, MedplumClient, NotEqualsAtom, NotEquivalentAtom, OperationOutcomeError, Operator, OrAtom, PropertyType, ReadablePromise, SEGMENT_SEPARATOR, SearchParameterType, SymbolAtom, UnaryOperatorAtom, UnionAtom, XorAtom, accessDenied, allOk, arrayBufferToBase64, arrayBufferToHex, assertOk, badRequest, booleanToTypedValue, buildTypeName, calculateAge, calculateAgeString, capitalize, createReference, createSchema, createTypeSchema, created, deepEquals$1 as deepEquals, evalFhirPath, evalFhirPathTyped, fhirPathArrayEquals, fhirPathArrayEquivalent, fhirPathEquals, fhirPathEquivalent, fhirPathIs, fhirPathNot, findObservationInterval, findObservationReferenceRange, formatAddress, formatFamilyName, formatGivenName, formatHumanName, formatSearchQuery, getCodeBySystem, getDateProperty, getDisplayString, getExpressionForResourceType, getExtensionValue, getIdentifier, getImageSrc, getPropertyDisplayName, getQuestionnaireAnswers, getReferenceString, getSearchParameterDetails, getStatus, getTypedPropertyValue, globalSchema, gone, indexSearchParameter, indexStructureDefinition, indexStructureDefinitionBundle, isGone, isLowerCase, isNotFound, isObject$1 as isObject, isOk, isPeriod, isProfileResource, isQuantity, isQuantityEquivalent, isStringArray, isUUID, matchesRange, notFound, notModified, parseFhirPath, parseJWTPayload, parseSearchDefinition, preciseEquals, preciseGreaterThan, preciseGreaterThanOrEquals, preciseLessThan, preciseLessThanOrEquals, removeDuplicates, resolveId, setCodeBySystem, stringify, toJsBoolean, toTypedValue, tokenize };
|
|
10720
10764
|
//# sourceMappingURL=index.js.map
|