@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/cjs/index.js
CHANGED
|
@@ -617,6 +617,17 @@
|
|
|
617
617
|
(category === undefined || interval.category === category);
|
|
618
618
|
});
|
|
619
619
|
}
|
|
620
|
+
/**
|
|
621
|
+
* Tries to find an observation reference range for the given patient and condition names.
|
|
622
|
+
* @param definition The observation definition.
|
|
623
|
+
* @param patient The patient.
|
|
624
|
+
* @param names The condition names.
|
|
625
|
+
* @returns The observation interval if found; otherwise undefined.
|
|
626
|
+
*/
|
|
627
|
+
function findObservationReferenceRange(definition, patient, names) {
|
|
628
|
+
var _a;
|
|
629
|
+
return (_a = definition.qualifiedInterval) === null || _a === void 0 ? void 0 : _a.find((interval) => observationIntervalMatchesPatient(interval, patient) && names.includes(interval.condition));
|
|
630
|
+
}
|
|
620
631
|
/**
|
|
621
632
|
* Returns true if the patient matches the observation interval.
|
|
622
633
|
* @param interval The observation interval.
|
|
@@ -6342,15 +6353,48 @@
|
|
|
6342
6353
|
return __classPrivateFieldGet(this, _MedplumClient_instances, "m", _MedplumClient_request).call(this, 'DELETE', url, options);
|
|
6343
6354
|
}
|
|
6344
6355
|
/**
|
|
6345
|
-
*
|
|
6356
|
+
* Initiates a new user flow.
|
|
6357
|
+
*
|
|
6358
|
+
* This method is part of the two different user registration flows:
|
|
6359
|
+
* 1) New Practitioner and new Project
|
|
6360
|
+
* 2) New Patient registration
|
|
6361
|
+
*
|
|
6346
6362
|
* @category Authentication
|
|
6347
|
-
* @param request
|
|
6363
|
+
* @param registerRequest Register request including email and password.
|
|
6364
|
+
* @returns Promise to the authentication response.
|
|
6365
|
+
*/
|
|
6366
|
+
startNewUser(registerRequest) {
|
|
6367
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
6368
|
+
yield __classPrivateFieldGet(this, _MedplumClient_instances, "m", _MedplumClient_startPkce).call(this);
|
|
6369
|
+
return this.post('auth/newuser', Object.assign(Object.assign({}, registerRequest), { codeChallengeMethod: 'S256', codeChallenge: __classPrivateFieldGet(this, _MedplumClient_storage, "f").getString('codeChallenge') }));
|
|
6370
|
+
});
|
|
6371
|
+
}
|
|
6372
|
+
/**
|
|
6373
|
+
* Initiates a new project flow.
|
|
6374
|
+
*
|
|
6375
|
+
* This requires a partial login from `startNewUser` or `startNewGoogleUser`.
|
|
6376
|
+
*
|
|
6377
|
+
* @param registerRequest Register request including email and password.
|
|
6378
|
+
* @param login The partial login to complete. This should come from the `startNewUser` method.
|
|
6379
|
+
* @returns Promise to the authentication response.
|
|
6380
|
+
*/
|
|
6381
|
+
startNewProject(registerRequest, login) {
|
|
6382
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
6383
|
+
return this.post('auth/newproject', Object.assign(Object.assign({}, registerRequest), login));
|
|
6384
|
+
});
|
|
6385
|
+
}
|
|
6386
|
+
/**
|
|
6387
|
+
* Initiates a new patient flow.
|
|
6388
|
+
*
|
|
6389
|
+
* This requires a partial login from `startNewUser` or `startNewGoogleUser`.
|
|
6390
|
+
*
|
|
6391
|
+
* @param registerRequest Register request including email and password.
|
|
6392
|
+
* @param login The partial login to complete. This should come from the `startNewUser` method.
|
|
6348
6393
|
* @returns Promise to the authentication response.
|
|
6349
6394
|
*/
|
|
6350
|
-
|
|
6395
|
+
startNewPatient(registerRequest, login) {
|
|
6351
6396
|
return __awaiter(this, void 0, void 0, function* () {
|
|
6352
|
-
|
|
6353
|
-
yield this.setActiveLogin(response);
|
|
6397
|
+
return this.post('auth/newpatient', Object.assign(Object.assign({}, registerRequest), login));
|
|
6354
6398
|
});
|
|
6355
6399
|
}
|
|
6356
6400
|
/**
|
|
@@ -10780,6 +10824,7 @@
|
|
|
10780
10824
|
exports.fhirPathIs = fhirPathIs;
|
|
10781
10825
|
exports.fhirPathNot = fhirPathNot;
|
|
10782
10826
|
exports.findObservationInterval = findObservationInterval;
|
|
10827
|
+
exports.findObservationReferenceRange = findObservationReferenceRange;
|
|
10783
10828
|
exports.formatAddress = formatAddress;
|
|
10784
10829
|
exports.formatFamilyName = formatFamilyName;
|
|
10785
10830
|
exports.formatGivenName = formatGivenName;
|
|
@@ -10818,6 +10863,7 @@
|
|
|
10818
10863
|
exports.notFound = notFound;
|
|
10819
10864
|
exports.notModified = notModified;
|
|
10820
10865
|
exports.parseFhirPath = parseFhirPath;
|
|
10866
|
+
exports.parseJWTPayload = parseJWTPayload;
|
|
10821
10867
|
exports.parseSearchDefinition = parseSearchDefinition;
|
|
10822
10868
|
exports.preciseEquals = preciseEquals;
|
|
10823
10869
|
exports.preciseGreaterThan = preciseGreaterThan;
|