You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update API docs for /api/fhir operation paths, R4/R6 match route behavior, TEFCA mode, and default FHIR release.
Point Aidbox subscription links to the Health Samurai docs site and keep absolute-link lint focused on the legacy docs domain.
Copy file name to clipboardExpand all lines: docs/match-operation.md
+39-19Lines changed: 39 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,6 +15,12 @@ type `searchset`. MDMbox generalizes the operation to any configured FHIR
15
15
resource type and adds `modelId` and `threshold` parameters so callers can choose
16
16
the matching model and score cutoff.
17
17
18
+
Unversioned routes such as `/api/fhir/Patient/$match` use the FHIR release
19
+
selected by `MDMBOX_DEFAULT_FHIR_RELEASE`. Versioned routes are also available
20
+
as `/api/fhir/r4/:resource/$match` and `/api/fhir/r6/:resource/$match`.
21
+
Instance-level matching is available at
22
+
`/api/fhir/r4/:resource/:id/$match` and `/api/fhir/r6/:resource/:id/$match`.
23
+
18
24
## Match a resource
19
25
20
26
Send a FHIR Parameters resource containing the record to match:
@@ -66,36 +72,50 @@ will not be returned as its own match.
66
72
67
73
## Parameters
68
74
69
-
### Request body parameters (FHIR Parameters)
75
+
### Common request body parameters
70
76
71
77
| Name | Type | Required | Description |
72
78
| --- | --- | --- | --- |
73
79
|`modelId`| valueString | Yes | ID of the MatchingModel to use |
74
80
|`resource`| resource | Only for `/api/fhir/:resource/$match`| The FHIR resource to find matches for. Omit this parameter when matching an existing resource by ID. |
75
-
|`threshold`| valueDecimal | No | Override the model's `probable` threshold |
76
-
|`onlyCertainMatches`| valueBoolean | No | Only return matches above the `certain` threshold |
77
-
|`onlySingleMatch`| valueBoolean | No | Return the single most appropriate match |
78
-
|`count`| valueInteger | No | Maximum number of results (default: 10) |
81
+
|`threshold`| valueDecimal | No | Override the model's `probable` threshold in normal potential-match mode. Cannot be combined with `onlyCertainMatches`. |
82
+
|`count`| valueInteger | No | Maximum number of returned entries (default: 10). `Bundle.total` still reports the full number of matches above the effective threshold. |
79
83
80
84
The default `count` is controlled by `MDMBOX_MATCH_DEFAULT_COUNT` and is `10`
81
-
unless configured otherwise. When `onlyCertainMatches=false`, MDMbox returns no
82
-
more than 100 potential matches.
85
+
unless configured otherwise.
86
+
87
+
### R6 flag behavior
88
+
89
+
| Name | Type | Description |
90
+
| --- | --- | --- |
91
+
|`onlyCertainMatches`| valueBoolean | Sets the effective threshold to the model's `certain` threshold. Cannot be combined with `threshold` or `onlySingleMatch`. `count` still applies. |
92
+
|`onlySingleMatch`| valueBoolean | Returns one best candidate. Cannot be combined with `threshold`, `count`, or `onlyCertainMatches`. |
93
+
94
+
In normal R6 mode, MDMbox uses `threshold` when supplied, otherwise the model's
95
+
`probable` threshold. There is no 100-entry TEFCA cap for R6.
96
+
97
+
In R6 `onlySingleMatch=true` mode, MDMbox asks the server-side matching
98
+
algorithm to designate one best candidate. If several candidates are eligible,
99
+
MDMbox returns the highest-scored one; if scores are tied, MDMbox uses resource
100
+
ID as a stable tie-breaker. If no candidate is eligible, the response is an
101
+
empty searchset.
102
+
103
+
### R4 flag behavior
83
104
84
-
### Flag behavior
105
+
| Name | Type | Description |
106
+
| --- | --- | --- |
107
+
|`onlyCertainMatches`| valueBoolean | Sets the effective threshold to the model's `certain` threshold. Cannot be combined with `threshold`. `count` still applies. |
85
108
86
-
`onlyCertainMatches=true` returns only candidates above the model's `certain`
87
-
threshold. If `threshold` is also provided, MDMbox uses the stricter of the two
88
-
values.
109
+
R4 routes do not implement `onlySingleMatch`; use an R6 route when that behavior
110
+
is required.
89
111
90
-
`onlySingleMatch=true` returns the single most appropriate candidate above the
91
-
effective `certain` threshold. If more than one candidate passes, MDMbox returns
92
-
the highest-scored candidate. If scores are tied, MDMbox uses resource ID as a
93
-
stable tie-breaker. If no candidate passes, the response is an empty searchset.
94
-
`onlySingleMatch` ignores `count`.
112
+
In normal R4 potential-match mode (`onlyCertainMatches` omitted or `false`),
113
+
MDMbox uses `threshold` when supplied, otherwise the model's `probable`
114
+
threshold.
95
115
96
-
`count` limits the number of returned entries for normal matching and
97
-
`onlyCertainMatches=true`. In normal potential-match mode, MDMbox also applies a
98
-
100-result safety cap even when `count` is larger.
116
+
When `MDMBOX_TEFCA_MODE=true`, R4 potential-match responses return no more than
117
+
100 entries, even when `count` is larger. The TEFCA cap is not applied when
Copy file name to clipboardExpand all lines: docs/notifications.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ description: Subscribe to merge and unmerge events using Aidbox Topic-Based Subs
4
4
5
5
# Notifications
6
6
7
-
After a `$merge` or `$unmerge` operation completes, external systems often need to react — update search indexes, sync to a data warehouse, trigger workflows. MDMbox supports this via [Aidbox Topic-Based Subscriptions](https://docs.aidbox.app/modules/topic-based-subscriptions/aidbox-topic-based-subscriptions), a built-in publish/subscribe mechanism that delivers events to webhooks, Kafka, GCP Pub/Sub, and other destinations.
7
+
After a `$merge` or `$unmerge` operation completes, external systems often need to react — update search indexes, sync to a data warehouse, trigger workflows. MDMbox supports this via [Aidbox Topic-Based Subscriptions](https://www.health-samurai.io/docs/aidbox/modules/topic-based-subscriptions/aidbox-topic-based-subscriptions), a built-in publish/subscribe mechanism that delivers events to webhooks, Kafka, GCP Pub/Sub, and other destinations.
8
8
9
9
## How it works
10
10
@@ -93,4 +93,4 @@ Defines the delivery target and parameters. Example using a webhook with at-leas
93
93
|`topic`| Canonical URL of the AidboxSubscriptionTopic to subscribe to |
See [Aidbox Topic-Based Subscriptions docs](https://docs.aidbox.app/modules/topic-based-subscriptions/aidbox-topic-based-subscriptions) for the full list of destination kinds and their parameters.
96
+
See [Aidbox Topic-Based Subscriptions docs](https://www.health-samurai.io/docs/aidbox/modules/topic-based-subscriptions/aidbox-topic-based-subscriptions) for the full list of destination kinds and their parameters.
0 commit comments