@awell-health/ui-library 0.1.65 → 0.1.68
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/index.js +65 -23
- package/dist/types/atoms/inputField/InputField.d.ts +1 -1
- package/dist/types/hooks/useForm/helpers.d.ts +4 -1
- package/dist/types/hooks/useForm/types.d.ts +1 -0
- package/dist/types/hooks/useValidate/useValidate.d.ts +5 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/molecules/question/helpers/isValidEmail.d.ts +1 -0
- package/dist/types/types/generated/types-orchestration.d.ts +84 -72
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -16114,8 +16114,11 @@ Check the top-level render call using <` + t + ">.");
|
|
|
16114
16114
|
})(exports.AllowedDatesOptions || (exports.AllowedDatesOptions = {}));
|
|
16115
16115
|
exports.ApiCallRequestMethod = void 0;
|
|
16116
16116
|
(function (ApiCallRequestMethod) {
|
|
16117
|
+
ApiCallRequestMethod["Delete"] = "DELETE";
|
|
16117
16118
|
ApiCallRequestMethod["Get"] = "GET";
|
|
16119
|
+
ApiCallRequestMethod["Patch"] = "PATCH";
|
|
16118
16120
|
ApiCallRequestMethod["Post"] = "POST";
|
|
16121
|
+
ApiCallRequestMethod["Put"] = "PUT";
|
|
16119
16122
|
})(exports.ApiCallRequestMethod || (exports.ApiCallRequestMethod = {}));
|
|
16120
16123
|
exports.ApiCallStatus = void 0;
|
|
16121
16124
|
(function (ApiCallStatus) {
|
|
@@ -16153,6 +16156,8 @@ Check the top-level render call using <` + t + ">.");
|
|
|
16153
16156
|
ConditionOperator["IsInRange"] = "IS_IN_RANGE";
|
|
16154
16157
|
ConditionOperator["IsLessThan"] = "IS_LESS_THAN";
|
|
16155
16158
|
ConditionOperator["IsLessThanOrEqualTo"] = "IS_LESS_THAN_OR_EQUAL_TO";
|
|
16159
|
+
ConditionOperator["IsLessThanXDaysAgo"] = "IS_LESS_THAN_X_DAYS_AGO";
|
|
16160
|
+
ConditionOperator["IsMoreThanXDaysAgo"] = "IS_MORE_THAN_X_DAYS_AGO";
|
|
16156
16161
|
ConditionOperator["IsNoneOf"] = "IS_NONE_OF";
|
|
16157
16162
|
ConditionOperator["IsNotEmpty"] = "IS_NOT_EMPTY";
|
|
16158
16163
|
ConditionOperator["IsNotEqualTo"] = "IS_NOT_EQUAL_TO";
|
|
@@ -16268,27 +16273,11 @@ Check the top-level render call using <` + t + ">.");
|
|
|
16268
16273
|
StakeholderClinicalAppRole["Patient"] = "PATIENT";
|
|
16269
16274
|
StakeholderClinicalAppRole["Physician"] = "PHYSICIAN";
|
|
16270
16275
|
})(exports.StakeholderClinicalAppRole || (exports.StakeholderClinicalAppRole = {}));
|
|
16271
|
-
exports.SwimlaneItemCategory = void 0;
|
|
16272
|
-
(function (SwimlaneItemCategory) {
|
|
16273
|
-
SwimlaneItemCategory["Action"] = "ACTION";
|
|
16274
|
-
SwimlaneItemCategory["PathwayEnd"] = "PATHWAY_END";
|
|
16275
|
-
SwimlaneItemCategory["PathwayStart"] = "PATHWAY_START";
|
|
16276
|
-
SwimlaneItemCategory["Step"] = "STEP";
|
|
16277
|
-
SwimlaneItemCategory["Track"] = "TRACK";
|
|
16278
|
-
SwimlaneItemCategory["TrackEnd"] = "TRACK_END";
|
|
16279
|
-
SwimlaneItemCategory["TrackStart"] = "TRACK_START";
|
|
16280
|
-
})(exports.SwimlaneItemCategory || (exports.SwimlaneItemCategory = {}));
|
|
16281
|
-
exports.SwimlaneItemType = void 0;
|
|
16282
|
-
(function (SwimlaneItemType) {
|
|
16283
|
-
SwimlaneItemType["Active"] = "active";
|
|
16284
|
-
SwimlaneItemType["Completed"] = "completed";
|
|
16285
|
-
SwimlaneItemType["Pending"] = "pending";
|
|
16286
|
-
SwimlaneItemType["Possible"] = "possible";
|
|
16287
|
-
})(exports.SwimlaneItemType || (exports.SwimlaneItemType = {}));
|
|
16288
16276
|
exports.UserQuestionType = void 0;
|
|
16289
16277
|
(function (UserQuestionType) {
|
|
16290
16278
|
UserQuestionType["Date"] = "DATE";
|
|
16291
16279
|
UserQuestionType["Description"] = "DESCRIPTION";
|
|
16280
|
+
UserQuestionType["Email"] = "EMAIL";
|
|
16292
16281
|
UserQuestionType["LongText"] = "LONG_TEXT";
|
|
16293
16282
|
UserQuestionType["MultipleChoice"] = "MULTIPLE_CHOICE";
|
|
16294
16283
|
UserQuestionType["MultipleChoiceGrid"] = "MULTIPLE_CHOICE_GRID";
|
|
@@ -37275,6 +37264,11 @@ Check the top-level render call using <` + t + ">.");
|
|
|
37275
37264
|
};
|
|
37276
37265
|
PhoneInputField.displayName = 'PhoneInputField';
|
|
37277
37266
|
|
|
37267
|
+
var isValidEmail = function (email) {
|
|
37268
|
+
var emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
37269
|
+
return emailRegex.test(email);
|
|
37270
|
+
};
|
|
37271
|
+
|
|
37278
37272
|
var handleUSException = function (number, originalValidation) {
|
|
37279
37273
|
var _a;
|
|
37280
37274
|
var areaCodes = (_a = originalValidation.country) === null || _a === void 0 ? void 0 : _a.areaCodes;
|
|
@@ -37426,6 +37420,23 @@ Check the top-level render call using <` + t + ">.");
|
|
|
37426
37420
|
return {
|
|
37427
37421
|
isValid: true };
|
|
37428
37422
|
|
|
37423
|
+
};
|
|
37424
|
+
var validateEmailResponse = function (questionConfig, value) {
|
|
37425
|
+
var inputRequired = questionConfig === null || questionConfig === void 0 ? void 0 : questionConfig.mandatory;
|
|
37426
|
+
if (inputRequired === false && lodash.exports.isEmpty(value)) {
|
|
37427
|
+
return {
|
|
37428
|
+
isValid: true };
|
|
37429
|
+
|
|
37430
|
+
}
|
|
37431
|
+
if (!isValidEmail(value)) {
|
|
37432
|
+
return {
|
|
37433
|
+
isValid: false,
|
|
37434
|
+
errorType: 'INVALID_FORMAT' };
|
|
37435
|
+
|
|
37436
|
+
}
|
|
37437
|
+
return {
|
|
37438
|
+
isValid: true };
|
|
37439
|
+
|
|
37429
37440
|
};
|
|
37430
37441
|
return {
|
|
37431
37442
|
isValidE164Number: isValidE164Number,
|
|
@@ -37433,7 +37444,8 @@ Check the top-level render call using <` + t + ">.");
|
|
|
37433
37444
|
validatePhoneNumber: validatePhoneNumber,
|
|
37434
37445
|
numberMatchesAvailableCountries: numberMatchesAvailableCountries,
|
|
37435
37446
|
validateDateResponse: validateDateResponse,
|
|
37436
|
-
validateNumberResponse: validateNumberResponse
|
|
37447
|
+
validateNumberResponse: validateNumberResponse,
|
|
37448
|
+
validateEmailResponse: validateEmailResponse };
|
|
37437
37449
|
|
|
37438
37450
|
};
|
|
37439
37451
|
|
|
@@ -37488,6 +37500,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
37488
37500
|
var _b, _c, _d, _e, _f;
|
|
37489
37501
|
var question = _a.question,control = _a.control,getValues = _a.getValues,labels = _a.labels,_g = _a.inputAutoFocus,inputAutoFocus = _g === void 0 ? false : _g,_h = _a.submitAndMoveToNextQuestion,submitAndMoveToNextQuestion = _h === void 0 ? lodash.exports.noop : _h,_j = _a.onAnswerChange,onAnswerChange = _j === void 0 ? lodash.exports.noop : _j,_k = _a.shouldAutoProgress,shouldAutoProgress = _k === void 0 ? function () {return false;} : _k;
|
|
37490
37502
|
var config = question === null || question === void 0 ? void 0 : question.questionConfig;
|
|
37503
|
+
useValidate().validateDateResponse;
|
|
37491
37504
|
switch (question.userQuestionType) {
|
|
37492
37505
|
case exports.UserQuestionType.YesNo:
|
|
37493
37506
|
return jsxRuntime.exports.jsx(Controller, { name: question.id, control: control, defaultValue: "", rules: { required: config === null || config === void 0 ? void 0 : config.mandatory }, render: function (_a) {
|
|
@@ -37618,6 +37631,19 @@ Check the top-level render call using <` + t + ">.");
|
|
|
37618
37631
|
onAnswerChange();
|
|
37619
37632
|
}, touchTooltipLabel: (_b = labels.slider) === null || _b === void 0 ? void 0 : _b.tooltip_guide, id: question.id, sliderConfig: config === null || config === void 0 ? void 0 : config.slider, value: value === '' ? undefined : value, mandatory: config === null || config === void 0 ? void 0 : config.mandatory });
|
|
37620
37633
|
} });
|
|
37634
|
+
case exports.UserQuestionType.Email:
|
|
37635
|
+
return jsxRuntime.exports.jsx(Controller, { name: question.id, control: control, defaultValue: "", rules: {
|
|
37636
|
+
required: config === null || config === void 0 ? void 0 : config.mandatory,
|
|
37637
|
+
validate: function (value) {
|
|
37638
|
+
return isValidEmail(value);
|
|
37639
|
+
} },
|
|
37640
|
+
render: function (_a) {
|
|
37641
|
+
var _b = _a.field,onChange = _b.onChange,value = _b.value;
|
|
37642
|
+
return jsxRuntime.exports.jsx(InputField, { autoFocus: inputAutoFocus, type: "email", onChange: function (e) {
|
|
37643
|
+
onChange(e.target.value);
|
|
37644
|
+
onAnswerChange();
|
|
37645
|
+
}, label: question.title, id: question.id, value: value, mandatory: config === null || config === void 0 ? void 0 : config.mandatory, placeholder: "name@example.com" });
|
|
37646
|
+
} });
|
|
37621
37647
|
case exports.UserQuestionType.Date:
|
|
37622
37648
|
return jsxRuntime.exports.jsx(Controller, { name: question.id, control: control, rules: {
|
|
37623
37649
|
required: config === null || config === void 0 ? void 0 : config.mandatory },
|
|
@@ -37843,7 +37869,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
37843
37869
|
}
|
|
37844
37870
|
return Math.round((currentQuestionIndex + 1) / allQuestions.length * 100);
|
|
37845
37871
|
};
|
|
37846
|
-
var getErrorsForQuestion = function (currentQuestion, formMethods, errorLabels, isValidE164Number, validateDateResponse, validateNumberResponse) {
|
|
37872
|
+
var getErrorsForQuestion = function (currentQuestion, formMethods, errorLabels, isValidE164Number, validateDateResponse, validateNumberResponse, validateEmailResponse) {
|
|
37847
37873
|
var _a;
|
|
37848
37874
|
if ((currentQuestion === null || currentQuestion === void 0 ? void 0 : currentQuestion.userQuestionType) === exports.UserQuestionType.Description) {
|
|
37849
37875
|
return [];
|
|
@@ -37917,6 +37943,21 @@ Check the top-level render call using <` + t + ">.");
|
|
|
37917
37943
|
|
|
37918
37944
|
|
|
37919
37945
|
|
|
37946
|
+
}
|
|
37947
|
+
}
|
|
37948
|
+
if ((currentQuestion === null || currentQuestion === void 0 ? void 0 : currentQuestion.userQuestionType) === exports.UserQuestionType.Email) {
|
|
37949
|
+
var error = validateEmailResponse(currentQuestion === null || currentQuestion === void 0 ? void 0 : currentQuestion.questionConfig, valueOfCurrentQuestion);
|
|
37950
|
+
if (error.isValid === false) {
|
|
37951
|
+
switch (error.errorType) {
|
|
37952
|
+
case 'INVALID_FORMAT':
|
|
37953
|
+
return [
|
|
37954
|
+
{
|
|
37955
|
+
id: currentQuestion.id,
|
|
37956
|
+
error: errorLabels.emailInvalidFormat ||
|
|
37957
|
+
'Value must be a valid email address' }];}
|
|
37958
|
+
|
|
37959
|
+
|
|
37960
|
+
|
|
37920
37961
|
}
|
|
37921
37962
|
}
|
|
37922
37963
|
return [];
|
|
@@ -37956,7 +37997,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
37956
37997
|
var _d = React.useState([]),errors = _d[0],setErrors = _d[1];
|
|
37957
37998
|
var _e = React.useState(false),formHasErrors = _e[0],setFormHasErrors = _e[1];
|
|
37958
37999
|
var _f = React.useState(false),isSubmittingForm = _f[0],setIsSubmittingForm = _f[1];
|
|
37959
|
-
var _g = useValidate(),isValidE164Number = _g.isValidE164Number,validateDateResponse = _g.validateDateResponse,validateNumberResponse = _g.validateNumberResponse;
|
|
38000
|
+
var _g = useValidate(),isValidE164Number = _g.isValidE164Number,validateDateResponse = _g.validateDateResponse,validateNumberResponse = _g.validateNumberResponse,validateEmailResponse = _g.validateEmailResponse;
|
|
37960
38001
|
var updateQuestionVisibility = React.useCallback(function () {return __awaiter(void 0, void 0, void 0, function () {
|
|
37961
38002
|
var formValuesInput, evaluationResults, updatedQuestions;
|
|
37962
38003
|
return __generator(this, function (_a) {
|
|
@@ -38025,7 +38066,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
38025
38066
|
case 1:
|
|
38026
38067
|
_a.sent();
|
|
38027
38068
|
formErrors = visibleQuestions.flatMap(function (vq) {
|
|
38028
|
-
return getErrorsForQuestion(vq, formMethods, errorLabels, isValidE164Number, validateDateResponse, validateNumberResponse);
|
|
38069
|
+
return getErrorsForQuestion(vq, formMethods, errorLabels, isValidE164Number, validateDateResponse, validateNumberResponse, validateEmailResponse);
|
|
38029
38070
|
});
|
|
38030
38071
|
setErrors(formErrors);
|
|
38031
38072
|
if (formErrors.length === 0) {
|
|
@@ -38053,7 +38094,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
38053
38094
|
var useConversationalForm = function (_a) {
|
|
38054
38095
|
var questions = _a.questions,evaluateDisplayConditions = _a.evaluateDisplayConditions,onSubmit = _a.onSubmit,errorLabels = _a.errorLabels,storedAnswers = _a.storedAnswers,_b = _a.autosaveAnswers,autosaveAnswers = _b === void 0 ? true : _b,onAnswersChange = _a.onAnswersChange;
|
|
38055
38096
|
var initialValues = convertToFormFormat(storedAnswers, questions);
|
|
38056
|
-
var _c = useValidate(),isValidE164Number = _c.isValidE164Number,validateDateResponse = _c.validateDateResponse,validateNumberResponse = _c.validateNumberResponse;
|
|
38097
|
+
var _c = useValidate(),isValidE164Number = _c.isValidE164Number,validateDateResponse = _c.validateDateResponse,validateNumberResponse = _c.validateNumberResponse,validateEmailResponse = _c.validateEmailResponse;
|
|
38057
38098
|
var formMethods = useForm({
|
|
38058
38099
|
defaultValues: getInitialValues(questions),
|
|
38059
38100
|
shouldUnregister: false,
|
|
@@ -38122,7 +38163,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
38122
38163
|
}, []);
|
|
38123
38164
|
var handleCheckForErrors = function (currentQuestion) {
|
|
38124
38165
|
var errorsWithoutCurrent = errors.filter(function (err) {return err.id !== (currentQuestion === null || currentQuestion === void 0 ? void 0 : currentQuestion.id);});
|
|
38125
|
-
var existingErrors = getErrorsForQuestion(currentQuestion, formMethods, errorLabels, isValidE164Number, validateDateResponse, validateNumberResponse);
|
|
38166
|
+
var existingErrors = getErrorsForQuestion(currentQuestion, formMethods, errorLabels, isValidE164Number, validateDateResponse, validateNumberResponse, validateEmailResponse);
|
|
38126
38167
|
setErrors(__spreadArray(__spreadArray([], errorsWithoutCurrent, true), existingErrors, true));
|
|
38127
38168
|
return existingErrors.length > 0;
|
|
38128
38169
|
};
|
|
@@ -52131,6 +52172,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
52131
52172
|
exports.useScrollHint = useScrollHint;
|
|
52132
52173
|
exports.useTheme = useTheme;
|
|
52133
52174
|
exports.useTraditionalForm = useTraditionalForm;
|
|
52175
|
+
exports.useValidate = useValidate;
|
|
52134
52176
|
|
|
52135
52177
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
52136
52178
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ChangeEventHandler, InputHTMLAttributes, MouseEventHandler } from 'react';
|
|
2
2
|
export interface InputFieldProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
3
|
-
type: 'number' | 'text' | 'date';
|
|
3
|
+
type: 'number' | 'text' | 'date' | 'email';
|
|
4
4
|
label: string;
|
|
5
5
|
id: string;
|
|
6
6
|
onChange: ChangeEventHandler<HTMLInputElement>;
|
|
@@ -3,7 +3,7 @@ import { Question, QuestionWithVisibility, FormError } from '../../types';
|
|
|
3
3
|
import { AnswerValue, ErrorLabels, QuestionRuleResult } from './types';
|
|
4
4
|
import { CountryIso2 } from 'react-international-phone';
|
|
5
5
|
import { Maybe, QuestionConfig } from '../../types/generated/types-orchestration';
|
|
6
|
-
import { DateValidationErrorType, NumberValidationErrorType } from '../useValidate/useValidate';
|
|
6
|
+
import { DateValidationErrorType, EmailValidationErrorType, NumberValidationErrorType } from '../useValidate/useValidate';
|
|
7
7
|
export declare const getDefaultValue: (question: Question) => AnswerValue;
|
|
8
8
|
export declare const getInitialValues: (questions: Array<Question>) => Record<string, AnswerValue>;
|
|
9
9
|
export declare const convertToAwellInput: (formResponse: any) => {
|
|
@@ -24,6 +24,9 @@ export declare const getErrorsForQuestion: (currentQuestion: QuestionWithVisibil
|
|
|
24
24
|
}, validateNumberResponse: (questionConfig: Maybe<QuestionConfig> | undefined, value: string) => {
|
|
25
25
|
isValid: boolean;
|
|
26
26
|
errorType?: NumberValidationErrorType;
|
|
27
|
+
}, validateEmailResponse: (questionConfig: Maybe<QuestionConfig> | undefined, value: string) => {
|
|
28
|
+
isValid: boolean;
|
|
29
|
+
errorType?: EmailValidationErrorType;
|
|
27
30
|
}) => Array<FormError>;
|
|
28
31
|
export declare const getDirtyFieldValues: (formMethods: UseFormReturn) => Record<string, AnswerValue>;
|
|
29
32
|
export declare const markInitialValuesAsDirty: ({ formMethods, defaultValues, initialValues, }: {
|
|
@@ -25,6 +25,7 @@ export declare type ErrorLabels = {
|
|
|
25
25
|
dateCannotBeToday?: string;
|
|
26
26
|
notANumber?: string;
|
|
27
27
|
numberOutOfRange?: string;
|
|
28
|
+
emailInvalidFormat?: string;
|
|
28
29
|
};
|
|
29
30
|
export declare type AnswerValue = string | number | number[] | undefined;
|
|
30
31
|
export interface FormSettingsContextProps {
|
|
@@ -2,6 +2,7 @@ import { ValidatePhoneReturn, CountryIso2 } from './types';
|
|
|
2
2
|
import { Maybe, QuestionConfig } from '../../types/generated/types-orchestration';
|
|
3
3
|
export declare type DateValidationErrorType = 'DATE_CANNOT_BE_IN_THE_FUTURE' | 'DATE_CANNOT_BE_IN_THE_PAST' | 'DATE_CANNOT_BE_TODAY';
|
|
4
4
|
export declare type NumberValidationErrorType = 'NOT_A_NUMBER' | 'OUT_OF_RANGE';
|
|
5
|
+
export declare type EmailValidationErrorType = 'INVALID_FORMAT';
|
|
5
6
|
export interface UseValidateHook {
|
|
6
7
|
validatePhoneNumber: (number: string, availableCountries?: Array<CountryIso2>) => ValidatePhoneReturn;
|
|
7
8
|
isValidE164Number: (number: string, availableCountries?: Array<CountryIso2>) => boolean;
|
|
@@ -15,6 +16,10 @@ export interface UseValidateHook {
|
|
|
15
16
|
isValid: boolean;
|
|
16
17
|
errorType?: NumberValidationErrorType;
|
|
17
18
|
};
|
|
19
|
+
validateEmailResponse: (questionConfig: Maybe<QuestionConfig> | undefined, value: string) => {
|
|
20
|
+
isValid: boolean;
|
|
21
|
+
errorType?: EmailValidationErrorType;
|
|
22
|
+
};
|
|
18
23
|
}
|
|
19
24
|
export declare const handleUSException: (number: string, originalValidation: ValidatePhoneReturn) => ValidatePhoneReturn;
|
|
20
25
|
export declare const useValidate: () => UseValidateHook;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { Button, CheckboxButton, DatePicker, Description, InputField, QuestionLabel, Logo, LongTextField, RadioButton, RangeInput, RichTextViewer, HeadingMain, HeadingSecondary, HeadingTertiary, SubHeading, Heading5, Heading6, Text, InlineText, ExternalLink, InnerText, CircularSpinner, HorizontalSpinner, ThemeProvider, useTheme, ScrollIndicator, Modal, CalDotComScheduling, type CalDotComBookingSuccessfulFunction, ProgressIndicator, TypingCaret, WithTypingCaret, Select, } from './atoms';
|
|
2
2
|
export { MultipleChoiceQuestion, Navbar, Question, SingleChoiceQuestion, AttachmentList, } from './molecules';
|
|
3
3
|
export { Checklist, ConversationalForm, TraditionalForm, WizardForm, Message, HostedPageLayout, CloseButton, CloudinaryUpload, CloudinarySingleFileUpload, HostedPageFooter, LoadActivityPlaceholder, CollectMedication, } from './hostedPages';
|
|
4
|
-
export { useClickOutsideNotifier, useScrollHint, useConversationalForm, useTraditionalForm, } from './hooks';
|
|
4
|
+
export { useClickOutsideNotifier, useScrollHint, useConversationalForm, useTraditionalForm, useValidate, } from './hooks';
|
|
5
5
|
export * from './types';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const isValidEmail: (email: string) => boolean;
|
|
@@ -249,8 +249,11 @@ export declare type ApiCallRequest = {
|
|
|
249
249
|
method: ApiCallRequestMethod;
|
|
250
250
|
};
|
|
251
251
|
export declare enum ApiCallRequestMethod {
|
|
252
|
+
Delete = "DELETE",
|
|
252
253
|
Get = "GET",
|
|
253
|
-
|
|
254
|
+
Patch = "PATCH",
|
|
255
|
+
Post = "POST",
|
|
256
|
+
Put = "PUT"
|
|
254
257
|
}
|
|
255
258
|
export declare type ApiCallResponse = {
|
|
256
259
|
__typename?: 'ApiCallResponse';
|
|
@@ -389,6 +392,8 @@ export declare enum ConditionOperator {
|
|
|
389
392
|
IsInRange = "IS_IN_RANGE",
|
|
390
393
|
IsLessThan = "IS_LESS_THAN",
|
|
391
394
|
IsLessThanOrEqualTo = "IS_LESS_THAN_OR_EQUAL_TO",
|
|
395
|
+
IsLessThanXDaysAgo = "IS_LESS_THAN_X_DAYS_AGO",
|
|
396
|
+
IsMoreThanXDaysAgo = "IS_MORE_THAN_X_DAYS_AGO",
|
|
392
397
|
IsNoneOf = "IS_NONE_OF",
|
|
393
398
|
IsNotEmpty = "IS_NOT_EMPTY",
|
|
394
399
|
IsNotEqualTo = "IS_NOT_EQUAL_TO",
|
|
@@ -429,6 +434,16 @@ export declare type CurrentUserPayload = Payload & {
|
|
|
429
434
|
success: Scalars['Boolean'];
|
|
430
435
|
user: CurrentUser;
|
|
431
436
|
};
|
|
437
|
+
export declare type DataPoint = {
|
|
438
|
+
__typename?: 'DataPoint';
|
|
439
|
+
activity_id?: Maybe<Scalars['String']>;
|
|
440
|
+
data_point_definition_id: Scalars['String'];
|
|
441
|
+
data_set_id: Scalars['String'];
|
|
442
|
+
date: Scalars['String'];
|
|
443
|
+
id: Scalars['ID'];
|
|
444
|
+
serialized_value?: Maybe<Scalars['String']>;
|
|
445
|
+
valueType: DataPointValueType;
|
|
446
|
+
};
|
|
432
447
|
export declare type DataPointDefinition = {
|
|
433
448
|
__typename?: 'DataPointDefinition';
|
|
434
449
|
category: DataPointSourceType;
|
|
@@ -453,6 +468,14 @@ export declare type DataPointMetaDataItem = {
|
|
|
453
468
|
key: Scalars['String'];
|
|
454
469
|
value: Scalars['String'];
|
|
455
470
|
};
|
|
471
|
+
export declare type DataPointPayload = PaginationAndSortingPayload & {
|
|
472
|
+
__typename?: 'DataPointPayload';
|
|
473
|
+
code: Scalars['String'];
|
|
474
|
+
dataPoints: Array<DataPoint>;
|
|
475
|
+
pagination?: Maybe<PaginationOutput>;
|
|
476
|
+
sorting?: Maybe<SortingOutput>;
|
|
477
|
+
success: Scalars['Boolean'];
|
|
478
|
+
};
|
|
456
479
|
export declare type DataPointPossibleValue = {
|
|
457
480
|
__typename?: 'DataPointPossibleValue';
|
|
458
481
|
label?: Maybe<Scalars['String']>;
|
|
@@ -497,6 +520,11 @@ export declare type DeletePathwayInput = {
|
|
|
497
520
|
export declare type DeletePatientInput = {
|
|
498
521
|
patient_id: Scalars['String'];
|
|
499
522
|
};
|
|
523
|
+
export declare type EmrRequest = {
|
|
524
|
+
__typename?: 'EMRRequest';
|
|
525
|
+
id?: Maybe<Scalars['String']>;
|
|
526
|
+
status?: Maybe<Scalars['String']>;
|
|
527
|
+
};
|
|
500
528
|
export declare type Element = {
|
|
501
529
|
__typename?: 'Element';
|
|
502
530
|
activity_type?: Maybe<ActionType>;
|
|
@@ -633,9 +661,6 @@ export declare type FilterPathwayDataPointDefinitionsParams = {
|
|
|
633
661
|
category?: InputMaybe<StringArrayFilter>;
|
|
634
662
|
value_type?: InputMaybe<StringArrayFilter>;
|
|
635
663
|
};
|
|
636
|
-
export declare type FilterPathwayDefinitionsParams = {
|
|
637
|
-
search?: InputMaybe<TextFilterContains>;
|
|
638
|
-
};
|
|
639
664
|
export declare type FilterPathways = {
|
|
640
665
|
pathway_definition_id?: InputMaybe<IdFilter>;
|
|
641
666
|
patient_id?: InputMaybe<StringArrayFilter>;
|
|
@@ -689,17 +714,18 @@ export declare type FormResponsePayload = Payload & {
|
|
|
689
714
|
response: FormResponse;
|
|
690
715
|
success: Scalars['Boolean'];
|
|
691
716
|
};
|
|
692
|
-
export declare type FormattedText = {
|
|
693
|
-
__typename?: 'FormattedText';
|
|
694
|
-
content: TranslatedText;
|
|
695
|
-
format: Scalars['String'];
|
|
696
|
-
};
|
|
697
717
|
export declare type FormsPayload = Payload & {
|
|
698
718
|
__typename?: 'FormsPayload';
|
|
699
719
|
code: Scalars['String'];
|
|
700
720
|
forms?: Maybe<Array<Form>>;
|
|
701
721
|
success: Scalars['Boolean'];
|
|
702
722
|
};
|
|
723
|
+
export declare type GenerateRetoolEmbedUrlPayload = Payload & {
|
|
724
|
+
__typename?: 'GenerateRetoolEmbedUrlPayload';
|
|
725
|
+
code: Scalars['String'];
|
|
726
|
+
success: Scalars['Boolean'];
|
|
727
|
+
url?: Maybe<Scalars['String']>;
|
|
728
|
+
};
|
|
703
729
|
export declare type GeneratedClinicalNote = {
|
|
704
730
|
__typename?: 'GeneratedClinicalNote';
|
|
705
731
|
context: Array<GeneratedClinicalNoteContextField>;
|
|
@@ -787,6 +813,12 @@ export declare type IdentifierSystem = {
|
|
|
787
813
|
name: Scalars['String'];
|
|
788
814
|
system: Scalars['String'];
|
|
789
815
|
};
|
|
816
|
+
export declare type IdentityVerificationPayload = Payload & {
|
|
817
|
+
__typename?: 'IdentityVerificationPayload';
|
|
818
|
+
code: Scalars['String'];
|
|
819
|
+
is_verified: Scalars['Boolean'];
|
|
820
|
+
success: Scalars['Boolean'];
|
|
821
|
+
};
|
|
790
822
|
export declare type MarkMessageAsReadInput = {
|
|
791
823
|
activity_id: Scalars['String'];
|
|
792
824
|
};
|
|
@@ -865,9 +897,11 @@ export declare type Mutation = {
|
|
|
865
897
|
submitFormResponse: SubmitFormResponsePayload;
|
|
866
898
|
unscheduleTracks: CancelScheduledTracksPayload;
|
|
867
899
|
updateBaselineInfo: EmptyPayload;
|
|
900
|
+
updateEmrReportStatus: UpdateEmrReportStatusPayload;
|
|
868
901
|
updatePatient: UpdatePatientPayload;
|
|
869
902
|
updatePatientDemographicsQuery: UpdatePatientDemographicsQueryPayload;
|
|
870
903
|
updatePatientLanguage: UpdatePatientLanguagePayload;
|
|
904
|
+
verify_identity: IdentityVerificationPayload;
|
|
871
905
|
};
|
|
872
906
|
export declare type MutationAddIdentifierToPatientArgs = {
|
|
873
907
|
input: AddIdentifierToPatientInput;
|
|
@@ -880,7 +914,6 @@ export declare type MutationCompleteExtensionActivityArgs = {
|
|
|
880
914
|
};
|
|
881
915
|
export declare type MutationCreatePatientArgs = {
|
|
882
916
|
input?: InputMaybe<CreatePatientInput>;
|
|
883
|
-
mycare?: InputMaybe<MyCareOptions>;
|
|
884
917
|
};
|
|
885
918
|
export declare type MutationDeletePathwayArgs = {
|
|
886
919
|
input: DeletePathwayInput;
|
|
@@ -966,6 +999,9 @@ export declare type MutationUnscheduleTracksArgs = {
|
|
|
966
999
|
export declare type MutationUpdateBaselineInfoArgs = {
|
|
967
1000
|
input: UpdateBaselineInfoInput;
|
|
968
1001
|
};
|
|
1002
|
+
export declare type MutationUpdateEmrReportStatusArgs = {
|
|
1003
|
+
input: UpdateEmrReportStatusInput;
|
|
1004
|
+
};
|
|
969
1005
|
export declare type MutationUpdatePatientArgs = {
|
|
970
1006
|
input: UpdatePatientInput;
|
|
971
1007
|
};
|
|
@@ -975,8 +1011,8 @@ export declare type MutationUpdatePatientDemographicsQueryArgs = {
|
|
|
975
1011
|
export declare type MutationUpdatePatientLanguageArgs = {
|
|
976
1012
|
input: UpdatePatientLanguageInput;
|
|
977
1013
|
};
|
|
978
|
-
export declare type
|
|
979
|
-
|
|
1014
|
+
export declare type MutationVerify_IdentityArgs = {
|
|
1015
|
+
input: VerifyIdentityInput;
|
|
980
1016
|
};
|
|
981
1017
|
export declare type NumberArrayFilter = {
|
|
982
1018
|
in?: InputMaybe<Array<Scalars['Float']>>;
|
|
@@ -1038,7 +1074,6 @@ export declare type Pathway = {
|
|
|
1038
1074
|
__typename?: 'Pathway';
|
|
1039
1075
|
activities?: Maybe<Array<Activity>>;
|
|
1040
1076
|
complete_date?: Maybe<Scalars['SafeDate']>;
|
|
1041
|
-
dashboards?: Maybe<PathwayDashboard>;
|
|
1042
1077
|
id: Scalars['ID'];
|
|
1043
1078
|
latestActivities: Array<Activity>;
|
|
1044
1079
|
pathway_definition_id: Scalars['String'];
|
|
@@ -1049,7 +1084,6 @@ export declare type Pathway = {
|
|
|
1049
1084
|
status: PathwayStatus;
|
|
1050
1085
|
status_explanation?: Maybe<Scalars['String']>;
|
|
1051
1086
|
stop_date?: Maybe<Scalars['SafeDate']>;
|
|
1052
|
-
swimlanes: Swimlanes;
|
|
1053
1087
|
title: Scalars['String'];
|
|
1054
1088
|
tracks: Array<Track>;
|
|
1055
1089
|
version?: Maybe<Scalars['Float']>;
|
|
@@ -1062,12 +1096,6 @@ export declare type PathwayContext = {
|
|
|
1062
1096
|
step_id?: Maybe<Scalars['String']>;
|
|
1063
1097
|
track_id?: Maybe<Scalars['String']>;
|
|
1064
1098
|
};
|
|
1065
|
-
export declare type PathwayDashboard = {
|
|
1066
|
-
__typename?: 'PathwayDashboard';
|
|
1067
|
-
cumulio_auth_id: Scalars['String'];
|
|
1068
|
-
cumulio_auth_token: Scalars['String'];
|
|
1069
|
-
dashboard_ids: Array<Scalars['String']>;
|
|
1070
|
-
};
|
|
1071
1099
|
export declare type PathwayDataPointDefinitionsPayload = Payload & {
|
|
1072
1100
|
__typename?: 'PathwayDataPointDefinitionsPayload';
|
|
1073
1101
|
code: Scalars['String'];
|
|
@@ -1261,6 +1289,7 @@ export declare type Query = {
|
|
|
1261
1289
|
form: FormPayload;
|
|
1262
1290
|
formResponse: FormResponsePayload;
|
|
1263
1291
|
forms: FormsPayload;
|
|
1292
|
+
generateRetoolEmbedUrl: GenerateRetoolEmbedUrlPayload;
|
|
1264
1293
|
getOrchestrationFactsFromPrompt: OrchestrationFactsPromptPayload;
|
|
1265
1294
|
getStatusForPublishedPathwayDefinitions: PublishedPathwayDefinitionsPayload;
|
|
1266
1295
|
hostedPagesLink: HostedPagesLinkPayload;
|
|
@@ -1273,6 +1302,7 @@ export declare type Query = {
|
|
|
1273
1302
|
pathway: PathwayPayload;
|
|
1274
1303
|
pathwayActivities: ActivitiesPayload;
|
|
1275
1304
|
pathwayDataPointDefinitions: PathwayDataPointDefinitionsPayload;
|
|
1305
|
+
pathwayDataPoints: DataPointPayload;
|
|
1276
1306
|
pathwayElements: ElementsPayload;
|
|
1277
1307
|
pathwayFacts: OrchestrationFactsPayload;
|
|
1278
1308
|
pathwayStepActivities: ActivitiesPayload;
|
|
@@ -1283,7 +1313,6 @@ export declare type Query = {
|
|
|
1283
1313
|
patientPathways: PatientPathwaysPayload;
|
|
1284
1314
|
patients: PatientsPayload;
|
|
1285
1315
|
publishedPathwayDefinitions: PublishedPathwayDefinitionsPayload;
|
|
1286
|
-
publishedPathwayDefinitionsDashboard: PublishedPathwayDefinitionsPayload;
|
|
1287
1316
|
scheduledSteps: ScheduledStepsPayload;
|
|
1288
1317
|
scheduledTracksForPathway: ScheduledTracksPayload;
|
|
1289
1318
|
searchPatientsByNationalRegistryNumber: SearchPatientsPayload;
|
|
@@ -1352,6 +1381,11 @@ export declare type QueryFormsArgs = {
|
|
|
1352
1381
|
pathway_definition_id: Scalars['String'];
|
|
1353
1382
|
release_id?: InputMaybe<Scalars['String']>;
|
|
1354
1383
|
};
|
|
1384
|
+
export declare type QueryGenerateRetoolEmbedUrlArgs = {
|
|
1385
|
+
groupIds: Array<Scalars['String']>;
|
|
1386
|
+
landingPageUuid: Scalars['String'];
|
|
1387
|
+
userInfo: UserInfoParams;
|
|
1388
|
+
};
|
|
1355
1389
|
export declare type QueryGetOrchestrationFactsFromPromptArgs = {
|
|
1356
1390
|
pathway_id: Scalars['String'];
|
|
1357
1391
|
prompt: Scalars['String'];
|
|
@@ -1384,6 +1418,13 @@ export declare type QueryPathwayDataPointDefinitionsArgs = {
|
|
|
1384
1418
|
pathway_definition_id?: InputMaybe<Scalars['String']>;
|
|
1385
1419
|
release_id: Scalars['String'];
|
|
1386
1420
|
};
|
|
1421
|
+
export declare type QueryPathwayDataPointsArgs = {
|
|
1422
|
+
activity_id?: InputMaybe<Scalars['String']>;
|
|
1423
|
+
data_point_definition_id?: InputMaybe<Scalars['String']>;
|
|
1424
|
+
pagination?: InputMaybe<PaginationParams>;
|
|
1425
|
+
pathway_id: Scalars['String'];
|
|
1426
|
+
sorting?: InputMaybe<SortingParams>;
|
|
1427
|
+
};
|
|
1387
1428
|
export declare type QueryPathwayElementsArgs = {
|
|
1388
1429
|
pathway_id: Scalars['String'];
|
|
1389
1430
|
};
|
|
@@ -1417,11 +1458,6 @@ export declare type QueryPatientsArgs = {
|
|
|
1417
1458
|
pagination?: InputMaybe<PaginationParams>;
|
|
1418
1459
|
sorting?: InputMaybe<SortingParams>;
|
|
1419
1460
|
};
|
|
1420
|
-
export declare type QueryPublishedPathwayDefinitionsDashboardArgs = {
|
|
1421
|
-
filters?: InputMaybe<FilterPathwayDefinitionsParams>;
|
|
1422
|
-
pagination?: InputMaybe<PaginationParams>;
|
|
1423
|
-
sorting?: InputMaybe<SortingParams>;
|
|
1424
|
-
};
|
|
1425
1461
|
export declare type QueryScheduledStepsArgs = {
|
|
1426
1462
|
pathway_id: Scalars['String'];
|
|
1427
1463
|
};
|
|
@@ -1856,52 +1892,6 @@ export declare type SubscriptionWebhookCallCreatedArgs = {
|
|
|
1856
1892
|
export declare type SubscriptionWebhookCallUpdatedArgs = {
|
|
1857
1893
|
pathway_id: Scalars['String'];
|
|
1858
1894
|
};
|
|
1859
|
-
export declare type Swimlane = {
|
|
1860
|
-
__typename?: 'Swimlane';
|
|
1861
|
-
id: Scalars['ID'];
|
|
1862
|
-
title: Scalars['String'];
|
|
1863
|
-
};
|
|
1864
|
-
export declare type SwimlaneItem = {
|
|
1865
|
-
__typename?: 'SwimlaneItem';
|
|
1866
|
-
category: SwimlaneItemCategory;
|
|
1867
|
-
column_index: Scalars['Float'];
|
|
1868
|
-
date?: Maybe<Scalars['SafeDate']>;
|
|
1869
|
-
documentation?: Maybe<FormattedText>;
|
|
1870
|
-
id: Scalars['ID'];
|
|
1871
|
-
info?: Maybe<Scalars['String']>;
|
|
1872
|
-
lane_id: Scalars['ID'];
|
|
1873
|
-
row_index: Scalars['Float'];
|
|
1874
|
-
title: Scalars['String'];
|
|
1875
|
-
track_id?: Maybe<Scalars['ID']>;
|
|
1876
|
-
type: SwimlaneItemType;
|
|
1877
|
-
};
|
|
1878
|
-
export declare enum SwimlaneItemCategory {
|
|
1879
|
-
Action = "ACTION",
|
|
1880
|
-
PathwayEnd = "PATHWAY_END",
|
|
1881
|
-
PathwayStart = "PATHWAY_START",
|
|
1882
|
-
Step = "STEP",
|
|
1883
|
-
Track = "TRACK",
|
|
1884
|
-
TrackEnd = "TRACK_END",
|
|
1885
|
-
TrackStart = "TRACK_START"
|
|
1886
|
-
}
|
|
1887
|
-
export declare enum SwimlaneItemType {
|
|
1888
|
-
Active = "active",
|
|
1889
|
-
Completed = "completed",
|
|
1890
|
-
Pending = "pending",
|
|
1891
|
-
Possible = "possible"
|
|
1892
|
-
}
|
|
1893
|
-
export declare type SwimlaneLink = {
|
|
1894
|
-
__typename?: 'SwimlaneLink';
|
|
1895
|
-
destination_id: Scalars['ID'];
|
|
1896
|
-
id: Scalars['ID'];
|
|
1897
|
-
origin_id: Scalars['ID'];
|
|
1898
|
-
};
|
|
1899
|
-
export declare type Swimlanes = {
|
|
1900
|
-
__typename?: 'Swimlanes';
|
|
1901
|
-
items: Array<SwimlaneItem>;
|
|
1902
|
-
lanes: Array<Swimlane>;
|
|
1903
|
-
links: Array<SwimlaneLink>;
|
|
1904
|
-
};
|
|
1905
1895
|
export declare type Tenant = {
|
|
1906
1896
|
__typename?: 'Tenant';
|
|
1907
1897
|
accent_color: Scalars['String'];
|
|
@@ -1942,6 +1932,17 @@ export declare type UpdateBaselineInfoInput = {
|
|
|
1942
1932
|
baseline_info: Array<BaselineInfoInput>;
|
|
1943
1933
|
pathway_id: Scalars['String'];
|
|
1944
1934
|
};
|
|
1935
|
+
export declare type UpdateEmrReportStatusInput = {
|
|
1936
|
+
reason: Scalars['String'];
|
|
1937
|
+
request_id: Scalars['String'];
|
|
1938
|
+
status: Scalars['String'];
|
|
1939
|
+
};
|
|
1940
|
+
export declare type UpdateEmrReportStatusPayload = Payload & {
|
|
1941
|
+
__typename?: 'UpdateEmrReportStatusPayload';
|
|
1942
|
+
code: Scalars['String'];
|
|
1943
|
+
request?: Maybe<EmrRequest>;
|
|
1944
|
+
success: Scalars['Boolean'];
|
|
1945
|
+
};
|
|
1945
1946
|
export declare type UpdatePatientDemographicsQueryInput = {
|
|
1946
1947
|
created_patient_entry_index: Scalars['Float'];
|
|
1947
1948
|
created_patient_id: Scalars['String'];
|
|
@@ -1979,6 +1980,12 @@ export declare type User = {
|
|
|
1979
1980
|
profile?: Maybe<UserProfile>;
|
|
1980
1981
|
tenant_id: Scalars['String'];
|
|
1981
1982
|
};
|
|
1983
|
+
export declare type UserInfoParams = {
|
|
1984
|
+
email: Scalars['String'];
|
|
1985
|
+
firstName: Scalars['String'];
|
|
1986
|
+
id: Scalars['String'];
|
|
1987
|
+
lastName: Scalars['String'];
|
|
1988
|
+
};
|
|
1982
1989
|
export declare type UserProfile = {
|
|
1983
1990
|
__typename?: 'UserProfile';
|
|
1984
1991
|
address?: Maybe<Address>;
|
|
@@ -1998,6 +2005,7 @@ export declare type UserProfile = {
|
|
|
1998
2005
|
export declare enum UserQuestionType {
|
|
1999
2006
|
Date = "DATE",
|
|
2000
2007
|
Description = "DESCRIPTION",
|
|
2008
|
+
Email = "EMAIL",
|
|
2001
2009
|
LongText = "LONG_TEXT",
|
|
2002
2010
|
MultipleChoice = "MULTIPLE_CHOICE",
|
|
2003
2011
|
MultipleChoiceGrid = "MULTIPLE_CHOICE_GRID",
|
|
@@ -2009,6 +2017,10 @@ export declare enum UserQuestionType {
|
|
|
2009
2017
|
Telephone = "TELEPHONE",
|
|
2010
2018
|
YesNo = "YES_NO"
|
|
2011
2019
|
}
|
|
2020
|
+
export declare type VerifyIdentityInput = {
|
|
2021
|
+
dob?: InputMaybe<Scalars['String']>;
|
|
2022
|
+
pathway_id: Scalars['String'];
|
|
2023
|
+
};
|
|
2012
2024
|
export declare type WebhookCall = {
|
|
2013
2025
|
__typename?: 'WebhookCall';
|
|
2014
2026
|
created_at: Scalars['String'];
|