Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

// Returns true if there's no healthCode and the reservation timestamp minus time of request is 
// less than some timeout value (or zero/unset). If it is going to return true, it sets the reservation
// field to current timestamp, preventing other callers from proceeding to use the ID. If the call that
// reserved the ID fails, it will become available again after the timeout.
boolean reserveExternalId(StudyIdentifier studyId, String externalIdentifier);

// Assigns the ID once you have the healthCode. If reservation failed, the caller should not 
// proceed to call this method. After this of course, any attempts to assign or reserve should fail.
assignExternalId(StudyIdentifier studyId, String externalIdentifier, String healthCode);

// Call as part of deleting a user.
unassignExternalId(StudyIdentifier studyId, String externalIdentifier);

ExternalIdController / Other controllers

GET /v3/studies/self/externalIds?offsetBy=n&pageSize=n&idFilter=<string>&assignmentFilter=<boolean>
get paged list of identifiers, should be able to filter on assigned/unassigned for Lilly. Would basically just return the IDs and assignment status

...

POST /v3/participants/member/options
Should validate that the externalId, if provided, is valid and unassigned (in studies that do this) 

POST /v3/users/self/externalId
Should validate that the externalId, if provided, is valid and unassigned (in studies that do this) 

DELETE /v3/users
Unassigns the external ID associated with the user

...