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
@@ -158,7 +58,7 @@ The **Identity Mapper** component addresses this need by resolving person identi
158
58
159
59
The **Identity Mapper** is a standalone component that maps person identifiers of two organizations. The **Identity Mapper** is intended to be populated by an internal system having knowledge of the relationship between identifiers used by two organizations. It is invoked by the **Query Planner** when there is a need to translate an external person identifier into an internal identifier.
160
60
161
-

61
+

162
62
163
63
*Image 1: A simple diagram depicting how the Identity Mapper functions at a high-level*
164
64
@@ -173,7 +73,7 @@ This component has the following specific requirements:
173
73
via an API
174
74
175
75
3. Ability to populate identity mapping database through a bulk upload
176
-
process
76
+
process (Possible Future Roadmap Item)
177
77
178
78
## Interaction with Other LIF Components
179
79
@@ -197,7 +97,7 @@ This component primarily interacts with the **Query Planner**, which invokes it
197
97
198
98
### Performance
199
99
200
-
The component should provide consistent performance irrespective of the volume of the requests and number of identity mapping records.
100
+
(Possible Future Roadmap Item) The component should provide consistent performance irrespective of the volume of the requests and number of identity mapping records.
201
101
202
102
### Concurrency
203
103
@@ -207,7 +107,7 @@ Concurrent endpoint requests are addressed through parallel threads implemented
207
107
208
108
The **Identity Mapper** is a standalone component that enables the conversion of a person identifier from an external organization to an internal identifier. As depicted below, the proposed design envisions Identity Mapper storage, along with an Identity Mapper service that provides CRUD operation endpoints.
209
109
210
-

110
+

211
111
212
112
*Image 2: Simple diagram depicting the relationship between the ID Mapper Service and ID Mapper Storage*
213
113
@@ -233,37 +133,37 @@ A uniqueness constraint should be enforced on the combination of LIF Organizatio
233
133
234
134
The following methods should be implemented in the Identity Mapper Service to save, retrieve, and delete mappings:
235
135
236
-
1.**Save Mappings:** POST Organizations/{Org id}/Persons/{Person id}/mappings
136
+
1.**Save Mappings:** POST organizations/{org_id}/persons/{person_id}/mappings
237
137
238
-
2.**List Mappings:** GET Organizations/{Org id}/Persons/{Person id}/
138
+
2.**List Mappings:** GET organizations/{org_id}/persons/{person_id}/mappings
The diagrams in the following section illustrate the internal steps the service should implement to enable the above methods.
243
143
244
144
1.**Save Mappings:** A collection of mappings should be passed to the method for saving the mappings in the storage.
245
145
246
-

146
+

247
147
248
148
*Image 3: Workflow diagram for the Save Mappings method*
249
149
250
150
2.**List Mappings:** The workflow below illustrates the steps the service should implement to list the mappings for a given organization and person.
251
151
252
-

152
+

253
153
254
154
*Image 4: Workflow diagram for the List Mappings method*
255
155
256
156
3.**Delete Mappings:** The workflow below illustrates the steps the service should implement to delete the mapping for a given organization and person.
257
157
258
-

158
+

259
159
260
160
*Image 5: Workflow diagram for the Delete Mappings method*
261
161
262
162
## Design Requirements
263
163
264
164
### Performance
265
165
266
-
The component should provide consistent performance irrespective of the volume of the requests and number of identity mapping records.
166
+
(Possible Future Roadmap Item) The component should provide consistent performance irrespective of the volume of the requests and number of identity mapping records.
267
167
268
168
### Concurrency
269
169
@@ -283,54 +183,7 @@ This exception occurs when uniqueness constrains for External and Internal Ident
283
183
284
184
TBD
285
185
286
-
# Detailed Design
287
-
288
-
This component is designed to be implemented as a serverless component that can be scaled on demand.
289
-
290
-
## Implementation Model
291
-
292
-
TBD
293
-
294
-
## Tools and Technologies
295
-
296
-
The component is implemented using Python.
297
-
298
-
## Implementation Requirements
299
-
300
-
### Data Storage
301
-
302
-
This component stores data in a SQL database.
303
-
304
-
### State
305
-
306
-
This component is stateless and does not maintain any information about any run.
307
-
308
-
### Concurrency
309
-
310
-
Being a stateless component, it should be able to scale on demand to address multiple concurrent requests.
311
-
312
-
### Sync/Async
313
-
314
-
This component operates in sync mode and the client waits for it to return the result before performing any other activity.
315
-
316
-
### External Services
317
-
318
-
This component does not call any external services.
319
-
320
-
# Deployment Design
321
-
322
-
## Deployment Environment
323
-
324
-
The component can be deployed in the cloud using serverless infrastructure such as AWS Step Function or Azure Function. In the on-prem deployment environment, the component can be deployed in a docker container running the data pipeline.
325
-
326
-
## Deployment Model
327
-
328
-
TBD
329
-
330
-
## Deployment Requirements
331
-
332
-
TBD
333
-
334
-
## Dependencies
186
+
## Possible Future Roadmap Items
335
187
336
-
TBD
188
+
-[Issue #12: Add Identity Mapper Support for Bulk Upload Process](https://github.com/LIF-Initiative/lif-core/issues/12)
189
+
-[Issue #13: Investigate and Improve Identity Mapper Performance](https://github.com/LIF-Initiative/lif-core/issues/13)
The **Identity Mapper API** facilitates the resolution of person identifiers from external partner organizations to the internal identifiers utilized within the organization. It enables cross-organizational sharing of LIF records for individuals using the respective identifiers from each organization. The API provides simple CRUD operations for managing the mappings.
4
+
5
+
# Example Usage
6
+
7
+
## Build the project
8
+
9
+
Navigate to this folder (where the `pyproject.toml` file is)
10
+
11
+
```shell
12
+
./build.sh
13
+
14
+
```
15
+
16
+
## Build a docker image from root
17
+
18
+
```shell
19
+
./build-docker.sh
20
+
```
21
+
22
+
## Run the image
23
+
24
+
```shell
25
+
docker run --rm --name lif_identity_mapper_api -p 8006:8006 lif-identity-mapper-api
26
+
```
27
+
28
+
The OpenAPI specification of this FastAPI app can now be accessed at http://localhost:8006/docs#
29
+
30
+
# Example API Usage
31
+
32
+
## List
33
+
34
+
GET http://localhost:8006/organizations/Org1/persons/100075/mappings/
35
+
36
+
## Save
37
+
38
+
POST http://localhost:8006/organizations/Org1/persons/100075/mappings/
0 commit comments