2.0 Message Ordering

The general reasons behind the need for message ordering are:

There are several possibilities to realize this:


Option A):

intrinsic ordering only:

Sender Responsibility: The sender is responsible for ensuring the desired order of calls to the Connect APIs.  If api calls are to be scheduled / batched, it is suggested that the sender maintain a queue of outgoing calls / messages so that message sequence is persistent in the event of system failure.

Receiver Responsibility:  The receiver is responsible for monitoring the availableMessages queue and process retrieval calls to the Connect APIs in the order specified.

Pro:

Con:


Option B):

ordering via local sequence number:

Sender Responsibility: The sender has to add a reciever specific sequence to each and every message.

Receiver Responsibility: The sequence number would be part of each message itself . The reciever has to check that the sequence number is correct (no number missing) and only process the messages if that is ok. Otherwise go back to the central system and claim the missing message.

Pro:

Con:


Option C):

central sequence number provided by SMC:

option C1: one number per receiving registry

option C2: one number per sending / receiving registry combination

Sender Responsibility:  

The sender is responsible for ensuring the desired order of calls to the Connect APIs.  If api calls are to be scheduled / batched, it is suggested that the sender maintain a queue of outgoing calls / messages so that message sequence is persistent in the event of system failure. Make sure the next message is sent only when the status of the previous one has been marked OK by SMC.

Central system:

Central system provides the sequence number as part of the meta block as anwser in each connect message (messages to another Registry).

Option: not add it to the message_response (and others)?

Receiver Responsibility: 

The sequence number would be part of the meta block. The receiver has to check that the sequence number is correct (no numbers missing) and only process the messages if that is ok. Otherwise go back to the central system and claim the missing message.

Pro:

Con:

2.1 Rules

MessageNEWXXXXNNNN
PAT_UPDYDRB3/4/5DRB3/4/5
Donor_DIFFYDRB3/4/5DRB3/4/5
TYP_RESYDRB3/4/5DRB3/4/5
SMP_RESYDRB3/4/5DRB3/4/5


2.2 How to read the new semantics if you know EMDIS

As one can see from the first sentence above, the API documentation is part of the new documentation set. This API documentation is called "swagger" for shortness. It is located at this publicly available address: https://apispecs.wmda.info/

At this address one can find both Search & Match API specifications and Connect API specifications:

Since the communication is now split to communication with WMDA's Search & Match and messaging with other registries, each API request in the Semantics may be represented in two styles:

  1. Communication with S&M
    1. Most of the Patient API endpoints and all Search API endpoints consist of such messages.
  2. Messaging with other registries

    1. One Patient API and all Connect APIs are represented in this style.

Wherever suitable, we included EMDIS names of the messages in parentheses, e.g. 5.1 - Extended Typing Request (TYP_REQ).

In many cases, the current implementation of EMDIS messages will require a conversion of the flat EMDIS message structure into the nested (multi-level) structure of the API messages. All the fields in API have better names: e.g., REQ_DATE becomes requestDate.

EMDIS rules from the EMDIS Semantics are modified accordingly to the new reality and are added to each message, where applicable.

The table below shows recommended sets of API endpoints to be implemented depending on your use of services:

                                  Service in use

API endpoint \ 

Commentmandatory for Patient & Searchmandatory for Patient & Search, download Registrymandatory for Connectmandatory for Connect, download RegistryComment
SEARCH & MATCH





PATIENTS





​/patients [POST]Create a patientyesnoyesno
​/patients [PUT]Update an existing patientnonoyesno
​/patients [GET]Retrieved patients listnonononoSearch and Match Service Graphical User Interface (GUI) content, optional for participating organisations
​/patients​/{wmdaId} [GET]Retrieve nonononoSearch and Match Service GUI content, optional for participating organisations
/patients/status [PUT]
yesnonono
​/patients​/user [PUT]
nonononoSearch and Match Service GUI content, optional for participating organisations
SEARCH





/searches [POST]
yesnoyesnofor recommendations see semantics (warning)
/searches/patientSearches/{wmdaId} [GET]
yesnoyesno
/searches/refreshAllPatientSearches [POST]
nonononoSearch and Match Service GUI content, optional for participating organisations
/searches/{searchId} [GET]
nonononohighly recommended
/searches/refreshAllPatientSearches [POST]
nononono
/searches/searchResults/donors [POST]
yesnoyesnoat least one of those is mandatory, 
/searches/searchResults/cbus [POST]
/searches/{searchId}/searchResults/adcu [GET]
​/searches​/{searchId}​/searchResults​/registries [GET]
nonononoSearch and Match Service GUI content, optional for participating organisations
/searches/{searchId}/searchResults/cbbs [GET]
nonononoSearch and Match Service GUI content, optional for participating organisations
/searches/selected/donors [POST]
nonononoSearch and Match Service GUI content, optional for participating organisations
​/searches​/selected​/cbus [POST]
nonononoSearch and Match Service GUI content, optional for participating organisations
/searches/donors/{searchResultsId} [GET]
nonononoSearch and Match Service GUI content, optional for participating organisations
​/searches​/cbus​/{searchResultsId} [GET]
nonononoSearch and Match Service GUI content, optional for participating organisations
DASHBOARD





for all
nonononoSearch and Match Service GUI content, optional for participating organisations







CONNECT API





ATTACHMENT





​/api​/v1​/attachmentTicket [POST]


nonoOptional for participating organisations
/api/v1/attachmentDownloadURL [POST]


nonoOptional for participating organisations
​/api​/v1​/attachmentDownloadedNotification [POST]


nonoOptional for participating organisations
RETRIEVE





​/api​/v1​/availableMessages [POST]


yesyes(warning) check with Mark
ADMIN





/api/v1/alertRetrieve [GET]


nonorecommended
/api/v1/alertUpdateRetrieve [GET]


nonorecommended
PATIENT





/api/v1/updateRegisteredPatient [POST]


yes (PR)yes (PR)
​/api​/v1​/updateRegisteredPatientRetrieve [GET]


yes (DR)yes (DR)
PING





​/api​/v1​/pingRequest [POST]


nonoOptional for participating organisations
/api/v1/pingRetrieve [POST]


nonoOptional for participating organisations
TEXT MESSAGE





/api/v1/textMessageRequest [POST]


nonoOptional for participating organisations
​/api​/v1​/TextMessageRetrieve [GET]


nonoOptional for participating organisations
REQUEST





/api/v1/genericRequestRequest [POST]


nono
/api/v1/genericRequestRetrieve [GET]


nono
/api/v1/extendedTypingRequestRequest [POST]


yes (PR)yes (PR)
/api/v1/extendedTypingRequestRetrieve [POST]


nonorecommended for DCs with incompletely typed donors
/api/v1/extendedTypingResponseRequest [POST]


nonorecommended for DCs with incompletely typed donors
/api/v1/extendedTypingResponseRetrieve [POST]


yes (PR)yes (PR)
​/api​/v1​/sampleRequestRequest [POST]


yes (PR)yes (PR)
​/api​/v1​/sampleRequestRetrieve [POST]


yes (DR, CBB)yes (DR, CBB)
​/api​/v1​/sampleInfoRequest [POST]


yes (DR, CBB)yes (DR, CBB)
​/api​/v1​/sampleInfoRetrieve [POST]


yes (PR)yes (PR)
​/api​/v1​/sampleArrivalRequest [POST]


yes (DR, CBB)yes (DR, CBB)
​/api​/v1​/sampleArrivalRetrieve [POST]


yes (PR)yes (PR)
/api/v1/sampleResponseRequest [POST]


yes (PR)yes (PR)
/api/v1/sampleResponseRetrieve [POST]


yes (DR, CBB)yes (DR, CBB)
/api/v1/infectiousDiseaseMarkerRequest [POST]


yes (PR)yes (PR)
/api/v1/infectiousDiseaseMarkerRequestRetrieve [POST]


yes (DR)yes (DR)
​/api​/v1​/infectiousDiseaseMarkerResultRequest [POST]


yes (DR)yes (DR)
/api/v1/infectiousDiseaseMarkerResultRetrieve [POST]


yes (PR)yes (PR)
​/api​/v1​/reservationRequestRequest [POST]


yes (PR)yes (PR)(warning) under discussion in user group
​/api​/v1​/reservationRequestRetrieve [POST]


yes (DR)yes (DR)
​/api​/v1​/reservationResponseRequest [POST]


yes (DR)yes (DR)
/api/v1/reservationResponseRetrieve [POST]


yes (PR)yes (PR)
​/api​/v1​/reservationReleaseRequest [POST]


yes (PR)yes (PR)
​/api​/v1​/reservationReleaseRetrieve [POST]


yes (DR)yes (DR)
/api/v1/requestCancellationRequest [POST]


yes (PR)yes (PR)
/api/v1/requestCancellationRetrieve [POST]


yes (DR)yes (DR)
​/api​/v1​/requestRejectedRequest [POST]


yes (DR)yes (DR)
/api/v1/requestRejectedRetrieve [POST]


yes (PR)yes (PR)
​/api​/v1​/resultReminderRequest [POST]


nonorecommended
/api/v1/resultReminderRetrieve [POST]


nonorecommended
GENERAL





/api/v1/messageResponse [POST]


yesyes
​/api​/v1​/messageResponseRetrieve [POST]


yesyes
/api/v1/messageAcknowledgementRequest [POST]




all replaced by the messageResponse
/api/v1/messageAcknowledgementRetrieve [POST]




​/api​/v1​/warningRequest [POST]




/api/v1/warningRetrieve [POST]




​/api​/v1​/messageDenialRequest [POST]




/api/v1/messageDenialRetrieve [POST]




CBU





/api/v1/cordBloodUnitReportRequestRequeston hold

nonoshould be generalised to CBU and ADCUs, etc...
/api/v1/cordBloodUnitReportRequestRetrieveon hold

yes (CBB)yes (CBB)
/api/v1/cordBloodUnitReportResponseRequeston hold

nono
​/api​/v1​/cordBloodUnitReportResponseRetrieveon hold

yes (CBB)yes (CBB)














2.3 API authentication