Got feedback or spotted a mistake?

Leave a comment at the end of this page or email contact@krishagni.com

Merging two participants

URL: http[s]:<host>:<port>/openspecimen/rest/ng/collection-protocol-registrations/{reg_id_merging_from}

Use the following REST API details to merge two participants from API. (Refer this wiki-page for more information on how merging participant works)

URL

http[s]:<host>:<port>/rest/ng/collection-protocol-registrations/{reg_id_merging_from}

Method

PUT

Content-Type

application/JSON

Request

{ "participant":{ "id": {participant_id_merging_to} } }

Example:

Say, you want to merge two participants:

{ "opComments": null, "id": 24, "participant": { "id": 24, "source": "wcmc", "firstName": "Samu", "lastName": "KRATOS1", "middleName": "M", "birthDate": 347135400000, "gender": "Male", "races": [], "pmis": [ { "siteName": "UKBB - Laboratory", "mrn": "UKBB_MRN_1" } ], "ethnicities": [], "activityStatus": "Active", "empi": "PatientId1", "phiAccess": true, "registeredCps": [], "extensionDetail": { "id": 452, "objectId": 24, "formId": 151, "formCaption": "Participant_Custom_fields", "attrs": [ { "name": "NT2", "udn": "siteContactNumber", "caption": "Site Contact Number", "value": null, "type": "numberField", "displayValue": null }, { "name": "FC3", "udn": "city", "caption": "City", "value": null, "type": "pvField", "displayValue": null } ], "useUdn": false }, "cpId": -1, "reqRegInfo": false, "forceDelete": false, "birthDateStr": "1981-01-01" }, "cpId": 14, "cpTitle": "TCP2", "cpShortTitle": "TCP2", "ppid": "PPID_1", "barcode": null, "activityStatus": "Active", "registrationDate": 1581013800000, "externalSubjectId": null, "site": "Pune Site", "consentDetails": null, "specimenLabelFmt": "", "aliquotLabelFmt": null, "derivativeLabelFmt": "%PSPEC_LABEL%.D.%PSPEC_UID%", "forceDelete": false }
{ "opComments": null, "id": 1726, "participant": { "id": 1723, "source": "OpenSpecimen", "gender": "Female", "races": [], "pmis": [], "ethnicities": [], "activityStatus": "Active", "empi": "TCP2_1148_MRN", "phiAccess": true, "registeredCps": [], "extensionDetail": { "id": 2683, "objectId": 1723, "formId": 151, "formCaption": "Participant_Custom_fields", "attrs": [ { "name": "NT2", "udn": "siteContactNumber", "caption": "Site Contact Number", "value": null, "type": "numberField", "displayValue": null }, { "name": "FC3", "udn": "city", "caption": "City", "value": null, "type": "pvField", "displayValue": null } ], "useUdn": false }, "cpId": -1, "reqRegInfo": false, "forceDelete": false }, "cpId": 14, "cpTitle": "TCP2", "cpShortTitle": "TCP2", "ppid": "TCP2_1148", "barcode": null, "activityStatus": "Active", "registrationDate": 1577817000000, "externalSubjectId": null, "site": null, "consentDetails": null, "specimenLabelFmt": "", "aliquotLabelFmt": null, "derivativeLabelFmt": "%PSPEC_LABEL%.D.%PSPEC_UID%", "forceDelete": false }

To merge participant#1 to participant#2, we need to make the following API call:

 

Got feedback or spotted a mistake?

Leave a comment at the end of this page or email contact@krishagni.com