@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.
@@ -145,13 +145,13 @@ export interface LoginRequest {
145
145
  readonly nonce?: string;
146
146
  }
147
147
  export interface RegisterRequest {
148
+ readonly projectName?: string;
148
149
  readonly firstName: string;
149
150
  readonly lastName: string;
150
- readonly projectName: string;
151
151
  readonly email: string;
152
- readonly password: string;
152
+ readonly password?: string;
153
153
  readonly remember?: boolean;
154
- readonly recaptchaToken: string;
154
+ readonly recaptchaToken?: string;
155
155
  }
156
156
  export interface GoogleCredentialResponse {
157
157
  readonly clientId: string;
@@ -400,12 +400,37 @@ export declare class MedplumClient extends EventTarget {
400
400
  */
401
401
  delete(url: URL | string, options?: RequestInit): Promise<any>;
402
402
  /**
403
- * Tries to register a new user.
403
+ * Initiates a new user flow.
404
+ *
405
+ * This method is part of the two different user registration flows:
406
+ * 1) New Practitioner and new Project
407
+ * 2) New Patient registration
408
+ *
404
409
  * @category Authentication
405
- * @param request The registration request.
410
+ * @param registerRequest Register request including email and password.
411
+ * @returns Promise to the authentication response.
412
+ */
413
+ startNewUser(registerRequest: RegisterRequest): Promise<LoginAuthenticationResponse>;
414
+ /**
415
+ * Initiates a new project flow.
416
+ *
417
+ * This requires a partial login from `startNewUser` or `startNewGoogleUser`.
418
+ *
419
+ * @param registerRequest Register request including email and password.
420
+ * @param login The partial login to complete. This should come from the `startNewUser` method.
421
+ * @returns Promise to the authentication response.
422
+ */
423
+ startNewProject(registerRequest: RegisterRequest, login: LoginAuthenticationResponse): Promise<LoginAuthenticationResponse>;
424
+ /**
425
+ * Initiates a new patient flow.
426
+ *
427
+ * This requires a partial login from `startNewUser` or `startNewGoogleUser`.
428
+ *
429
+ * @param registerRequest Register request including email and password.
430
+ * @param login The partial login to complete. This should come from the `startNewUser` method.
406
431
  * @returns Promise to the authentication response.
407
432
  */
408
- register(request: RegisterRequest): Promise<void>;
433
+ startNewPatient(registerRequest: RegisterRequest, login: LoginAuthenticationResponse): Promise<LoginAuthenticationResponse>;
409
434
  /**
410
435
  * Initiates a user login flow.
411
436
  * @category Authentication
@@ -3,6 +3,7 @@ export * from './client';
3
3
  export * from './fhirpath';
4
4
  export * from './format';
5
5
  export * from './hl7';
6
+ export * from './jwt';
6
7
  export * from './outcomes';
7
8
  export * from './readablepromise';
8
9
  export * from './search';
@@ -166,6 +166,14 @@ export declare function setCodeBySystem(concept: CodeableConcept, system: string
166
166
  * @returns The observation interval if found; otherwise undefined.
167
167
  */
168
168
  export declare function findObservationInterval(definition: ObservationDefinition, patient: Patient, value: number, category?: 'reference' | 'critical' | 'absolute'): ObservationDefinitionQualifiedInterval | undefined;
169
+ /**
170
+ * Tries to find an observation reference range for the given patient and condition names.
171
+ * @param definition The observation definition.
172
+ * @param patient The patient.
173
+ * @param names The condition names.
174
+ * @returns The observation interval if found; otherwise undefined.
175
+ */
176
+ export declare function findObservationReferenceRange(definition: ObservationDefinition, patient: Patient, names: string[]): ObservationDefinitionQualifiedInterval | undefined;
169
177
  /**
170
178
  * Returns true if the value is in the range accounting for precision.
171
179
  * @param value The numeric value.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@medplum/core",
3
- "version": "0.9.22",
3
+ "version": "0.9.25",
4
4
  "description": "Medplum TS/JS Library",
5
5
  "author": "Medplum <hello@medplum.com>",
6
6
  "license": "Apache-2.0",
@@ -17,8 +17,8 @@
17
17
  "test": "jest"
18
18
  },
19
19
  "devDependencies": {
20
- "@medplum/definitions": "0.9.22",
21
- "@medplum/fhirtypes": "0.9.22"
20
+ "@medplum/definitions": "0.9.25",
21
+ "@medplum/fhirtypes": "0.9.25"
22
22
  },
23
23
  "peerDependencies": {
24
24
  "pdfmake": "0.2.5"