@opencrvs/toolkit 1.9.6-rc.e1e4717 → 1.9.6-rc.e8f0bd3
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/commons/events/DeduplicationConfig.d.ts +0 -24
- package/dist/commons/events/deduplication.d.ts +0 -44
- package/dist/events/deduplication.d.ts +0 -44
- package/dist/events/deduplication.js +0 -41
- package/dist/events/index.js +8 -36
- package/dist/notification/index.js +4 -35
- package/package.json +1 -1
|
@@ -10,13 +10,10 @@ declare const FuzzyMatcher: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
10
10
|
fieldId: z.ZodString;
|
|
11
11
|
options: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
12
12
|
boost: z.ZodOptional<z.ZodNumber>;
|
|
13
|
-
matchAgainst: z.ZodOptional<z.ZodString>;
|
|
14
13
|
}, "strip", z.ZodTypeAny, {
|
|
15
14
|
boost?: number | undefined;
|
|
16
|
-
matchAgainst?: string | undefined;
|
|
17
15
|
}, {
|
|
18
16
|
boost?: number | undefined;
|
|
19
|
-
matchAgainst?: string | undefined;
|
|
20
17
|
}>>>;
|
|
21
18
|
}, {
|
|
22
19
|
type: z.ZodLiteral<"fuzzy">;
|
|
@@ -28,14 +25,11 @@ declare const FuzzyMatcher: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
28
25
|
*/
|
|
29
26
|
fuzziness: z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
30
27
|
boost: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
31
|
-
matchAgainst: z.ZodOptional<z.ZodString>;
|
|
32
28
|
}, "strip", z.ZodTypeAny, {
|
|
33
29
|
boost: number;
|
|
34
30
|
fuzziness: string | number;
|
|
35
|
-
matchAgainst?: string | undefined;
|
|
36
31
|
}, {
|
|
37
32
|
boost?: number | undefined;
|
|
38
|
-
matchAgainst?: string | undefined;
|
|
39
33
|
fuzziness?: string | number | undefined;
|
|
40
34
|
}>>>;
|
|
41
35
|
}>, "strip", z.ZodTypeAny, {
|
|
@@ -43,7 +37,6 @@ declare const FuzzyMatcher: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
43
37
|
options: {
|
|
44
38
|
boost: number;
|
|
45
39
|
fuzziness: string | number;
|
|
46
|
-
matchAgainst?: string | undefined;
|
|
47
40
|
};
|
|
48
41
|
fieldId: string;
|
|
49
42
|
}, {
|
|
@@ -51,7 +44,6 @@ declare const FuzzyMatcher: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
51
44
|
fieldId: string;
|
|
52
45
|
options?: {
|
|
53
46
|
boost?: number | undefined;
|
|
54
|
-
matchAgainst?: string | undefined;
|
|
55
47
|
fuzziness?: string | number | undefined;
|
|
56
48
|
} | undefined;
|
|
57
49
|
}>;
|
|
@@ -66,13 +58,10 @@ declare const StrictMatcher: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
66
58
|
fieldId: z.ZodString;
|
|
67
59
|
options: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
68
60
|
boost: z.ZodOptional<z.ZodNumber>;
|
|
69
|
-
matchAgainst: z.ZodOptional<z.ZodString>;
|
|
70
61
|
}, "strip", z.ZodTypeAny, {
|
|
71
62
|
boost?: number | undefined;
|
|
72
|
-
matchAgainst?: string | undefined;
|
|
73
63
|
}, {
|
|
74
64
|
boost?: number | undefined;
|
|
75
|
-
matchAgainst?: string | undefined;
|
|
76
65
|
}>>>;
|
|
77
66
|
}, {
|
|
78
67
|
type: z.ZodLiteral<"strict">;
|
|
@@ -82,22 +71,18 @@ declare const StrictMatcher: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
82
71
|
* The constant value to be present in the field for both records
|
|
83
72
|
*/
|
|
84
73
|
value: z.ZodOptional<z.ZodString>;
|
|
85
|
-
matchAgainst: z.ZodOptional<z.ZodString>;
|
|
86
74
|
}, "strip", z.ZodTypeAny, {
|
|
87
75
|
boost: number;
|
|
88
76
|
value?: string | undefined;
|
|
89
|
-
matchAgainst?: string | undefined;
|
|
90
77
|
}, {
|
|
91
78
|
value?: string | undefined;
|
|
92
79
|
boost?: number | undefined;
|
|
93
|
-
matchAgainst?: string | undefined;
|
|
94
80
|
}>>>;
|
|
95
81
|
}>, "strip", z.ZodTypeAny, {
|
|
96
82
|
type: "strict";
|
|
97
83
|
options: {
|
|
98
84
|
boost: number;
|
|
99
85
|
value?: string | undefined;
|
|
100
|
-
matchAgainst?: string | undefined;
|
|
101
86
|
};
|
|
102
87
|
fieldId: string;
|
|
103
88
|
}, {
|
|
@@ -106,7 +91,6 @@ declare const StrictMatcher: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
106
91
|
options?: {
|
|
107
92
|
value?: string | undefined;
|
|
108
93
|
boost?: number | undefined;
|
|
109
|
-
matchAgainst?: string | undefined;
|
|
110
94
|
} | undefined;
|
|
111
95
|
}>;
|
|
112
96
|
export type StrictMatcherOptions = z.input<typeof StrictMatcher>['options'];
|
|
@@ -120,13 +104,10 @@ declare const DateRangeMatcher: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
120
104
|
fieldId: z.ZodString;
|
|
121
105
|
options: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
122
106
|
boost: z.ZodOptional<z.ZodNumber>;
|
|
123
|
-
matchAgainst: z.ZodOptional<z.ZodString>;
|
|
124
107
|
}, "strip", z.ZodTypeAny, {
|
|
125
108
|
boost?: number | undefined;
|
|
126
|
-
matchAgainst?: string | undefined;
|
|
127
109
|
}, {
|
|
128
110
|
boost?: number | undefined;
|
|
129
|
-
matchAgainst?: string | undefined;
|
|
130
111
|
}>>>;
|
|
131
112
|
}, {
|
|
132
113
|
type: z.ZodLiteral<"dateRange">;
|
|
@@ -138,16 +119,13 @@ declare const DateRangeMatcher: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
138
119
|
pivot: z.ZodOptional<z.ZodNumber>;
|
|
139
120
|
days: z.ZodNumber;
|
|
140
121
|
boost: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
141
|
-
matchAgainst: z.ZodOptional<z.ZodString>;
|
|
142
122
|
}, "strip", z.ZodTypeAny, {
|
|
143
123
|
boost: number;
|
|
144
124
|
days: number;
|
|
145
|
-
matchAgainst?: string | undefined;
|
|
146
125
|
pivot?: number | undefined;
|
|
147
126
|
}, {
|
|
148
127
|
days: number;
|
|
149
128
|
boost?: number | undefined;
|
|
150
|
-
matchAgainst?: string | undefined;
|
|
151
129
|
pivot?: number | undefined;
|
|
152
130
|
}>;
|
|
153
131
|
}>, "strip", z.ZodTypeAny, {
|
|
@@ -155,7 +133,6 @@ declare const DateRangeMatcher: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
155
133
|
options: {
|
|
156
134
|
boost: number;
|
|
157
135
|
days: number;
|
|
158
|
-
matchAgainst?: string | undefined;
|
|
159
136
|
pivot?: number | undefined;
|
|
160
137
|
};
|
|
161
138
|
fieldId: string;
|
|
@@ -164,7 +141,6 @@ declare const DateRangeMatcher: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
164
141
|
options: {
|
|
165
142
|
days: number;
|
|
166
143
|
boost?: number | undefined;
|
|
167
|
-
matchAgainst?: string | undefined;
|
|
168
144
|
pivot?: number | undefined;
|
|
169
145
|
};
|
|
170
146
|
fieldId: string;
|
|
@@ -8,7 +8,6 @@ export declare function field(fieldId: string): {
|
|
|
8
8
|
type: "fuzzy";
|
|
9
9
|
options: {
|
|
10
10
|
boost?: number | undefined;
|
|
11
|
-
matchAgainst?: string | undefined;
|
|
12
11
|
fuzziness?: string | number | undefined;
|
|
13
12
|
} | undefined;
|
|
14
13
|
};
|
|
@@ -18,57 +17,14 @@ export declare function field(fieldId: string): {
|
|
|
18
17
|
options: {
|
|
19
18
|
value?: string | undefined;
|
|
20
19
|
boost?: number | undefined;
|
|
21
|
-
matchAgainst?: string | undefined;
|
|
22
20
|
} | undefined;
|
|
23
21
|
};
|
|
24
|
-
/**
|
|
25
|
-
* Creates a date range matcher that finds records where date fields fall within a specified range.
|
|
26
|
-
*
|
|
27
|
-
* By default, matches against the field specified in `field()` (e.g., 'mother.dob').
|
|
28
|
-
* When `matchAgainst` is provided, it overwrites the default field and searches across multiple fields with OR logic .
|
|
29
|
-
*
|
|
30
|
-
* @param options - Configuration for the date range matching
|
|
31
|
-
* @param options.days - Number of days before and after the target date to search (creates a ±days range)
|
|
32
|
-
* @param options.pivot - Optional. Distance in days where relevance scoring drops by 50%. Defaults to ⌊(days * 2) / 3⌋
|
|
33
|
-
* @param options.boost - Optional. Scoring boost multiplier for matching results. Defaults to 1
|
|
34
|
-
* @param options.matchAgainst - Optional. Additional fields to match against. When provided,
|
|
35
|
-
* the query matches if any of these fields fall within the date range. The default field is always excluded in the search in that case.
|
|
36
|
-
* If you want to add the default field, you have to explicitly add that field in `matchAgainst` option
|
|
37
|
-
*
|
|
38
|
-
* @returns A clause that matches records where at least one of the specified date fields is within the range
|
|
39
|
-
*
|
|
40
|
-
* @example
|
|
41
|
-
* // Matches only against mother.dob (±365 days)
|
|
42
|
-
* field('mother.dob').dateRangeMatches({ days: 365 })
|
|
43
|
-
*
|
|
44
|
-
* @example
|
|
45
|
-
* // Matches against mother.age OR spouse.dob, not mother.dob
|
|
46
|
-
* field('mother.dob').dateRangeMatches({
|
|
47
|
-
* days: 365,
|
|
48
|
-
* matchAgainst: [$field('mother.age'), $field('spouse.dob')]
|
|
49
|
-
* })
|
|
50
|
-
*
|
|
51
|
-
* If you want to add mother.dob, then
|
|
52
|
-
* field('mother.dob').dateRangeMatches({
|
|
53
|
-
* days: 365,
|
|
54
|
-
* matchAgainst: [$field('mother.age'), $field('spouse.dob'), $field('mother.dob')]
|
|
55
|
-
* })
|
|
56
|
-
*
|
|
57
|
-
* @example
|
|
58
|
-
* // With custom pivot and boost
|
|
59
|
-
* field('mother.dob').dateRangeMatches({
|
|
60
|
-
* days: 730,
|
|
61
|
-
* pivot: 365,
|
|
62
|
-
* boost: 2
|
|
63
|
-
* })
|
|
64
|
-
*/
|
|
65
22
|
dateRangeMatches: (options: DateRangeMatcherOptions) => {
|
|
66
23
|
fieldId: string;
|
|
67
24
|
type: "dateRange";
|
|
68
25
|
options: {
|
|
69
26
|
days: number;
|
|
70
27
|
boost?: number | undefined;
|
|
71
|
-
matchAgainst?: string | undefined;
|
|
72
28
|
pivot?: number | undefined;
|
|
73
29
|
};
|
|
74
30
|
};
|
|
@@ -8,7 +8,6 @@ export declare function field(fieldId: string): {
|
|
|
8
8
|
type: "fuzzy";
|
|
9
9
|
options: {
|
|
10
10
|
boost?: number | undefined;
|
|
11
|
-
matchAgainst?: string | undefined;
|
|
12
11
|
fuzziness?: string | number | undefined;
|
|
13
12
|
} | undefined;
|
|
14
13
|
};
|
|
@@ -18,57 +17,14 @@ export declare function field(fieldId: string): {
|
|
|
18
17
|
options: {
|
|
19
18
|
value?: string | undefined;
|
|
20
19
|
boost?: number | undefined;
|
|
21
|
-
matchAgainst?: string | undefined;
|
|
22
20
|
} | undefined;
|
|
23
21
|
};
|
|
24
|
-
/**
|
|
25
|
-
* Creates a date range matcher that finds records where date fields fall within a specified range.
|
|
26
|
-
*
|
|
27
|
-
* By default, matches against the field specified in `field()` (e.g., 'mother.dob').
|
|
28
|
-
* When `matchAgainst` is provided, it overwrites the default field and searches across multiple fields with OR logic .
|
|
29
|
-
*
|
|
30
|
-
* @param options - Configuration for the date range matching
|
|
31
|
-
* @param options.days - Number of days before and after the target date to search (creates a ±days range)
|
|
32
|
-
* @param options.pivot - Optional. Distance in days where relevance scoring drops by 50%. Defaults to ⌊(days * 2) / 3⌋
|
|
33
|
-
* @param options.boost - Optional. Scoring boost multiplier for matching results. Defaults to 1
|
|
34
|
-
* @param options.matchAgainst - Optional. Additional fields to match against. When provided,
|
|
35
|
-
* the query matches if any of these fields fall within the date range. The default field is always excluded in the search in that case.
|
|
36
|
-
* If you want to add the default field, you have to explicitly add that field in `matchAgainst` option
|
|
37
|
-
*
|
|
38
|
-
* @returns A clause that matches records where at least one of the specified date fields is within the range
|
|
39
|
-
*
|
|
40
|
-
* @example
|
|
41
|
-
* // Matches only against mother.dob (±365 days)
|
|
42
|
-
* field('mother.dob').dateRangeMatches({ days: 365 })
|
|
43
|
-
*
|
|
44
|
-
* @example
|
|
45
|
-
* // Matches against mother.age OR spouse.dob, not mother.dob
|
|
46
|
-
* field('mother.dob').dateRangeMatches({
|
|
47
|
-
* days: 365,
|
|
48
|
-
* matchAgainst: [$field('mother.age'), $field('spouse.dob')]
|
|
49
|
-
* })
|
|
50
|
-
*
|
|
51
|
-
* If you want to add mother.dob, then
|
|
52
|
-
* field('mother.dob').dateRangeMatches({
|
|
53
|
-
* days: 365,
|
|
54
|
-
* matchAgainst: [$field('mother.age'), $field('spouse.dob'), $field('mother.dob')]
|
|
55
|
-
* })
|
|
56
|
-
*
|
|
57
|
-
* @example
|
|
58
|
-
* // With custom pivot and boost
|
|
59
|
-
* field('mother.dob').dateRangeMatches({
|
|
60
|
-
* days: 730,
|
|
61
|
-
* pivot: 365,
|
|
62
|
-
* boost: 2
|
|
63
|
-
* })
|
|
64
|
-
*/
|
|
65
22
|
dateRangeMatches: (options: DateRangeMatcherOptions) => {
|
|
66
23
|
fieldId: string;
|
|
67
24
|
type: "dateRange";
|
|
68
25
|
options: {
|
|
69
26
|
days: number;
|
|
70
27
|
boost?: number | undefined;
|
|
71
|
-
matchAgainst?: string | undefined;
|
|
72
28
|
pivot?: number | undefined;
|
|
73
29
|
};
|
|
74
30
|
};
|
|
@@ -58,47 +58,6 @@ function field(fieldId) {
|
|
|
58
58
|
type: "strict",
|
|
59
59
|
options
|
|
60
60
|
}),
|
|
61
|
-
/**
|
|
62
|
-
* Creates a date range matcher that finds records where date fields fall within a specified range.
|
|
63
|
-
*
|
|
64
|
-
* By default, matches against the field specified in `field()` (e.g., 'mother.dob').
|
|
65
|
-
* When `matchAgainst` is provided, it overwrites the default field and searches across multiple fields with OR logic .
|
|
66
|
-
*
|
|
67
|
-
* @param options - Configuration for the date range matching
|
|
68
|
-
* @param options.days - Number of days before and after the target date to search (creates a ±days range)
|
|
69
|
-
* @param options.pivot - Optional. Distance in days where relevance scoring drops by 50%. Defaults to ⌊(days * 2) / 3⌋
|
|
70
|
-
* @param options.boost - Optional. Scoring boost multiplier for matching results. Defaults to 1
|
|
71
|
-
* @param options.matchAgainst - Optional. Additional fields to match against. When provided,
|
|
72
|
-
* the query matches if any of these fields fall within the date range. The default field is always excluded in the search in that case.
|
|
73
|
-
* If you want to add the default field, you have to explicitly add that field in `matchAgainst` option
|
|
74
|
-
*
|
|
75
|
-
* @returns A clause that matches records where at least one of the specified date fields is within the range
|
|
76
|
-
*
|
|
77
|
-
* @example
|
|
78
|
-
* // Matches only against mother.dob (±365 days)
|
|
79
|
-
* field('mother.dob').dateRangeMatches({ days: 365 })
|
|
80
|
-
*
|
|
81
|
-
* @example
|
|
82
|
-
* // Matches against mother.age OR spouse.dob, not mother.dob
|
|
83
|
-
* field('mother.dob').dateRangeMatches({
|
|
84
|
-
* days: 365,
|
|
85
|
-
* matchAgainst: [$field('mother.age'), $field('spouse.dob')]
|
|
86
|
-
* })
|
|
87
|
-
*
|
|
88
|
-
* If you want to add mother.dob, then
|
|
89
|
-
* field('mother.dob').dateRangeMatches({
|
|
90
|
-
* days: 365,
|
|
91
|
-
* matchAgainst: [$field('mother.age'), $field('spouse.dob'), $field('mother.dob')]
|
|
92
|
-
* })
|
|
93
|
-
*
|
|
94
|
-
* @example
|
|
95
|
-
* // With custom pivot and boost
|
|
96
|
-
* field('mother.dob').dateRangeMatches({
|
|
97
|
-
* days: 730,
|
|
98
|
-
* pivot: 365,
|
|
99
|
-
* boost: 2
|
|
100
|
-
* })
|
|
101
|
-
*/
|
|
102
61
|
dateRangeMatches: (options) => ({
|
|
103
62
|
fieldId,
|
|
104
63
|
type: "dateRange",
|
package/dist/events/index.js
CHANGED
|
@@ -2557,8 +2557,7 @@ var Matcher = import_zod19.z.object({
|
|
|
2557
2557
|
*/
|
|
2558
2558
|
fieldId: FieldReference2,
|
|
2559
2559
|
options: import_zod19.z.object({
|
|
2560
|
-
boost: import_zod19.z.number().optional()
|
|
2561
|
-
matchAgainst: FieldReference2.optional()
|
|
2560
|
+
boost: import_zod19.z.number().optional()
|
|
2562
2561
|
}).optional().default({
|
|
2563
2562
|
boost: 1
|
|
2564
2563
|
})
|
|
@@ -2572,8 +2571,7 @@ var FuzzyMatcher = Matcher.extend({
|
|
|
2572
2571
|
* Names of length >7 characters = 2 edits allowed
|
|
2573
2572
|
*/
|
|
2574
2573
|
fuzziness: import_zod19.z.union([import_zod19.z.string(), import_zod19.z.number()]).optional().default("AUTO:4,7"),
|
|
2575
|
-
boost: import_zod19.z.number().optional().default(1)
|
|
2576
|
-
matchAgainst: FieldReference2.optional()
|
|
2574
|
+
boost: import_zod19.z.number().optional().default(1)
|
|
2577
2575
|
}).optional().default({
|
|
2578
2576
|
fuzziness: "AUTO:4,7",
|
|
2579
2577
|
boost: 1
|
|
@@ -2586,8 +2584,7 @@ var StrictMatcher = Matcher.extend({
|
|
|
2586
2584
|
/**
|
|
2587
2585
|
* The constant value to be present in the field for both records
|
|
2588
2586
|
*/
|
|
2589
|
-
value: import_zod19.z.string().optional()
|
|
2590
|
-
matchAgainst: FieldReference2.optional()
|
|
2587
|
+
value: import_zod19.z.string().optional()
|
|
2591
2588
|
}).optional().default({
|
|
2592
2589
|
boost: 1
|
|
2593
2590
|
})
|
|
@@ -2601,8 +2598,7 @@ var DateRangeMatcher = Matcher.extend({
|
|
|
2601
2598
|
*/
|
|
2602
2599
|
pivot: import_zod19.z.number().optional(),
|
|
2603
2600
|
days: import_zod19.z.number(),
|
|
2604
|
-
boost: import_zod19.z.number().optional().default(1)
|
|
2605
|
-
matchAgainst: FieldReference2.optional()
|
|
2601
|
+
boost: import_zod19.z.number().optional().default(1)
|
|
2606
2602
|
})
|
|
2607
2603
|
});
|
|
2608
2604
|
var Not = import_zod19.z.object({
|
|
@@ -3900,11 +3896,14 @@ function isRequestedAction(a) {
|
|
|
3900
3896
|
function isAcceptedAction(a) {
|
|
3901
3897
|
return a.status === ActionStatus.Accepted;
|
|
3902
3898
|
}
|
|
3899
|
+
function isRejectedAction(a) {
|
|
3900
|
+
return a.status === ActionStatus.Rejected;
|
|
3901
|
+
}
|
|
3903
3902
|
function getPendingAction(actions) {
|
|
3904
3903
|
const requestedActions = actions.filter(isRequestedAction);
|
|
3905
3904
|
const pendingActions = requestedActions.filter(
|
|
3906
3905
|
({ id }) => !actions.some(
|
|
3907
|
-
(action) => isAcceptedAction(action) && action.originalActionId === id
|
|
3906
|
+
(action) => (isAcceptedAction(action) || isRejectedAction(action)) && action.originalActionId === id
|
|
3908
3907
|
)
|
|
3909
3908
|
);
|
|
3910
3909
|
if (pendingActions.length !== 1) {
|
|
@@ -7817,35 +7816,8 @@ var mother = defineFormPage({
|
|
|
7817
7816
|
secured: true,
|
|
7818
7817
|
validation: [],
|
|
7819
7818
|
label: generateTranslationConfig("Date of birth"),
|
|
7820
|
-
conditionals: [
|
|
7821
|
-
{
|
|
7822
|
-
type: "SHOW",
|
|
7823
|
-
conditional: not(field("mother.dobUnknown").isEqualTo(true))
|
|
7824
|
-
}
|
|
7825
|
-
]
|
|
7826
|
-
},
|
|
7827
|
-
{
|
|
7828
|
-
id: "mother.dobUnknown",
|
|
7829
|
-
type: "CHECKBOX",
|
|
7830
|
-
label: generateTranslationConfig("Exact date of birth unknown"),
|
|
7831
7819
|
conditionals: []
|
|
7832
7820
|
},
|
|
7833
|
-
{
|
|
7834
|
-
id: "mother.age",
|
|
7835
|
-
type: FieldType.AGE,
|
|
7836
|
-
required: true,
|
|
7837
|
-
analytics: true,
|
|
7838
|
-
label: generateTranslationConfig("Age of mother"),
|
|
7839
|
-
configuration: {
|
|
7840
|
-
asOfDate: field("child.dob")
|
|
7841
|
-
},
|
|
7842
|
-
conditionals: [
|
|
7843
|
-
{
|
|
7844
|
-
type: "SHOW",
|
|
7845
|
-
conditional: field("mother.dobUnknown").isEqualTo(true)
|
|
7846
|
-
}
|
|
7847
|
-
]
|
|
7848
|
-
},
|
|
7849
7821
|
{
|
|
7850
7822
|
id: "mother.idType",
|
|
7851
7823
|
type: FieldType.SELECT,
|
|
@@ -2079,8 +2079,7 @@ var Matcher = import_zod19.z.object({
|
|
|
2079
2079
|
*/
|
|
2080
2080
|
fieldId: FieldReference2,
|
|
2081
2081
|
options: import_zod19.z.object({
|
|
2082
|
-
boost: import_zod19.z.number().optional()
|
|
2083
|
-
matchAgainst: FieldReference2.optional()
|
|
2082
|
+
boost: import_zod19.z.number().optional()
|
|
2084
2083
|
}).optional().default({
|
|
2085
2084
|
boost: 1
|
|
2086
2085
|
})
|
|
@@ -2094,8 +2093,7 @@ var FuzzyMatcher = Matcher.extend({
|
|
|
2094
2093
|
* Names of length >7 characters = 2 edits allowed
|
|
2095
2094
|
*/
|
|
2096
2095
|
fuzziness: import_zod19.z.union([import_zod19.z.string(), import_zod19.z.number()]).optional().default("AUTO:4,7"),
|
|
2097
|
-
boost: import_zod19.z.number().optional().default(1)
|
|
2098
|
-
matchAgainst: FieldReference2.optional()
|
|
2096
|
+
boost: import_zod19.z.number().optional().default(1)
|
|
2099
2097
|
}).optional().default({
|
|
2100
2098
|
fuzziness: "AUTO:4,7",
|
|
2101
2099
|
boost: 1
|
|
@@ -2108,8 +2106,7 @@ var StrictMatcher = Matcher.extend({
|
|
|
2108
2106
|
/**
|
|
2109
2107
|
* The constant value to be present in the field for both records
|
|
2110
2108
|
*/
|
|
2111
|
-
value: import_zod19.z.string().optional()
|
|
2112
|
-
matchAgainst: FieldReference2.optional()
|
|
2109
|
+
value: import_zod19.z.string().optional()
|
|
2113
2110
|
}).optional().default({
|
|
2114
2111
|
boost: 1
|
|
2115
2112
|
})
|
|
@@ -2123,8 +2120,7 @@ var DateRangeMatcher = Matcher.extend({
|
|
|
2123
2120
|
*/
|
|
2124
2121
|
pivot: import_zod19.z.number().optional(),
|
|
2125
2122
|
days: import_zod19.z.number(),
|
|
2126
|
-
boost: import_zod19.z.number().optional().default(1)
|
|
2127
|
-
matchAgainst: FieldReference2.optional()
|
|
2123
|
+
boost: import_zod19.z.number().optional().default(1)
|
|
2128
2124
|
})
|
|
2129
2125
|
});
|
|
2130
2126
|
var Not = import_zod19.z.object({
|
|
@@ -6070,35 +6066,8 @@ var mother = defineFormPage({
|
|
|
6070
6066
|
secured: true,
|
|
6071
6067
|
validation: [],
|
|
6072
6068
|
label: generateTranslationConfig("Date of birth"),
|
|
6073
|
-
conditionals: [
|
|
6074
|
-
{
|
|
6075
|
-
type: "SHOW",
|
|
6076
|
-
conditional: not(field("mother.dobUnknown").isEqualTo(true))
|
|
6077
|
-
}
|
|
6078
|
-
]
|
|
6079
|
-
},
|
|
6080
|
-
{
|
|
6081
|
-
id: "mother.dobUnknown",
|
|
6082
|
-
type: "CHECKBOX",
|
|
6083
|
-
label: generateTranslationConfig("Exact date of birth unknown"),
|
|
6084
6069
|
conditionals: []
|
|
6085
6070
|
},
|
|
6086
|
-
{
|
|
6087
|
-
id: "mother.age",
|
|
6088
|
-
type: FieldType.AGE,
|
|
6089
|
-
required: true,
|
|
6090
|
-
analytics: true,
|
|
6091
|
-
label: generateTranslationConfig("Age of mother"),
|
|
6092
|
-
configuration: {
|
|
6093
|
-
asOfDate: field("child.dob")
|
|
6094
|
-
},
|
|
6095
|
-
conditionals: [
|
|
6096
|
-
{
|
|
6097
|
-
type: "SHOW",
|
|
6098
|
-
conditional: field("mother.dobUnknown").isEqualTo(true)
|
|
6099
|
-
}
|
|
6100
|
-
]
|
|
6101
|
-
},
|
|
6102
6071
|
{
|
|
6103
6072
|
id: "mother.idType",
|
|
6104
6073
|
type: FieldType.SELECT,
|