...
Introduction
Sometimes users wants to close one collection protocol and merge all registrations/data of that protocol with another protocol. In this case, this API is useful to merge two collection protocols . on the basis of the PPID or the participant ID.
Merge happens in following way.Lets say
Source CP - The protocol which wanted is to closebe closed.
Target CP - The protocol in which source CP's registrations wanted are to mergebe merged.
Pre-
...
requisites
- Only super admin can merge two collection protocols.
...
- Both CPs must have same label formats for PPI, visit and specimens.
- Both CPs must belong to same sites.
Merge Logic
...
- Move all participant registrations to target CP.If
- participant match found in target CP, then move Match found - Move all visits and specimens of source registration to target registration. If no matched participant found then make source registration
- If participant with same PPID is found in target CP
- If the participant is registered on both source and target CP
- Match not found: If participant with same PPID or participant ID is not found, then register the source CP participant to target CP.
- Matching Matching of participants is done on basic basis of PPID and participant ID.
- Map all visits of source CP registration to first event of target CP and mark all created specimens as unplanned.
- Forms data handling
- Participant Level Forms :
1. For matching registrations,
the system will not merge forms of source registration to target. So in this case forms will deleted along with source registration.
2.For
non matching participants, forms will be merged along with source registration. Here forms will merge even if that form
does not exist at
participant level for source cp.
Visit and Specimen Level Forms:
All visit and specimen level forms will merge along with visit and specimens.Here same as participant those forms are not a part of target CP those also get merged.
- Participant Level Forms :
Note: We
...
have not handled/checked container restriction while merging. i.e
...
if specimens are stored in container only for source CP even then
...
registrations will be merged with target CP. We need to handle this manually like change restrictions of container.
Use HTTP POST method to call this API by passing the below details in JSON format.
...
URL | http://<host>:<port>/ openspecimen/rest/ng/collection-protocols/merge | |
Method | POST | |
Request | application/json | |
json |
| |
Response | { "srcCpShortTitle" : "Brain Cancer v2", "tgtCpShortTitle" : "Brain Cancer" } |