{"openapi":"3.0.0","servers":[{"url":"/mpi-api/v1"}],"info":{"version":"1.0","title":"4medica Big Data MPI - REST API","description":"This is 4medica Big Data MPI - REST API specification document. It provides detailed information about all the REST endpoints, HTTP request parameters, HTTP return codes, HTTP response message formats etc. It conforms to OpenAPI specification (formerly known as the Swagger specification).<br/> <br/> Date Last Updated: <b><i>Dec 16, 2020</b></i>","contact":{"name":"Support","email":"support@4medica.com"},"license":{"name":"4medica Inc.","url":"http://www.4medica.com"}},"paths":{"/authtoken":{"post":{"summary":"user authentication","description":"Returns an authtoken to be used with other 4medica Big Data MPI APIs, along with user and role information. This token will expire after 30 minutes of inactivity.","parameters":[{"$ref":"#/components/parameters/txId"}],"responses":{"201":{"$ref":"#/components/responses/authenticationResponse"},"400":{"$ref":"#/components/responses/standard400Response"},"401":{"$ref":"#/components/responses/standard401Response"},"500":{"$ref":"#/components/responses/standard500Response"}},"tags":["login"],"requestBody":{"$ref":"#/components/requestBodies/usercredentials"}}},"/authtoken/{authtoken}":{"delete":{"summary":"logout / invalidate session","description":"The given authtoken will be invalidated or removed and will no longer be valid.","parameters":[{"name":"authtoken","description":"The authentication token to invalidate.","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/txId"}],"responses":{"204":{"description":"The given authtoken will be invalidated or removed and will no longer be valid."},"400":{"$ref":"#/components/responses/standard400Response"},"401":{"$ref":"#/components/responses/standard401Response"},"500":{"$ref":"#/components/responses/standard500Response"}},"tags":["logout"]}},"/identities":{"post":{"summary":"search and register","description":"Searches 4medica Big Data MPI based on the demographic information provided in the request body and if no matching record is found i.e. matchCode='M', a new identity record with all the demographic information provided is added in 4medica Big Data MPI. If matching record is found, the matched record might get updated with the demographic information provided in the request body, based on the datasource configuration defined for the input dataSrcId. Also in this case, the matching record's information is returned.","security":[{"Authorization":[]}],"parameters":[{"name":"forceAdd","description":"Optional parameter when set to 'true', will forcefully add this identity even though there may be a matching identity that already exists in the system. The use case for using this parameter is when there is a situation where similar matching records i.e. with matchcode='M' exists in 4medica Big Data MPI and this new record cannot be inserted under normal situation, i.e. identical twins with the same gender and other traits including their first and last names. In this scenario, there is no other option but to use this parameter to force add this identity in 4medica Big Data MPI. <br> <br> <b>Use this parameter with great caution!!</b>","in":"query","schema":{"type":"boolean"}},{"$ref":"#/components/parameters/txId"},{"name":"facilityId","description":"The facilityId for which the identities operation is to be performed. If the facilityId is invalid or if the user has no access to it then it will return an unauthorized error response.","in":"query","required":false,"schema":{"type":"string"}},{"name":"scoreVersion","description":"Score version to be applied for the registration request. If no value is provided, the latest score will be applied.","in":"query","required":false,"schema":{"type":"string"}},{"name":"detailedScore","description":"If set to 'true', the response will have the detailed score .","in":"query","schema":{"type":"boolean","default":false}},{"name":"datasourceRepresentation","description":"If set to 'true', the response will have the datasource representaion of the identity.","in":"query","schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"Match found in 4medica Big Data MPI. Returns the information of the identity that match the search criteria. Based on the configuration, some of the traits of the matched identity will be updated or appended.","content":{"application/json":{"schema":{"properties":{"requestDatasourceId":{"type":"string","example":"DefaultDS"},"txId":{"type":"string","example":"adf28af7-deef-kcd8-acfb-meaebffebdsm"},"matchFound":{"type":"boolean","example":true},"matchUpdated":{"type":"boolean","example":true},"enrichedMatchByAdd":{"type":"boolean","example":true},"enrichedMatchByUpdate":{"type":"boolean","example":true},"oldMatchedRecord":{"$ref":"#/components/schemas/identity"},"matchRecord":{"$ref":"#/components/schemas/identity"},"datasourceInfo":{"$ref":"#/components/schemas/identity"}}}}}},"201":{"description":"A new identity is added in 4medica Big Data MPI since there is no matching record present.","content":{"application/json":{"schema":{"properties":{"requestDatasourceId":{"type":"string","example":"DefaultDS"},"matchFound":{"type":"boolean","example":false},"matchUpdated":{"type":"boolean","example":false},"enrichedMatchByAdd":{"type":"boolean","example":false},"enrichedMatchByUpdate":{"type":"boolean","example":false},"txId":{"type":"string","example":"edffrafw-kmeq-rcdx-acfb-qeasbwesbdml"},"insertedRecord":{"$ref":"#/components/schemas/identity"}}}}}},"400":{"$ref":"#/components/responses/standard400Response"},"401":{"$ref":"#/components/responses/standard401Response"},"500":{"$ref":"#/components/responses/standard500Response"}},"tags":["search and register"],"requestBody":{"$ref":"#/components/requestBodies/identityRegistrationObject"}}},"/identities/{id}":{"get":{"summary":"Returns the identity of the given identifier, i.e. id.","description":"If the query parameter 'isAlternateId=true' is passed then the id parameter is considered to be the alternateId, otherwise, its considered to be the internal ID, which is the default.","security":[{"Authorization":[]}],"parameters":[{"name":"id","description":"Identifier that uniquely identifies the identity being seeked. If the query parameter 'isAlternateId=true' is passed, then the id is considered to be the alternateId, othwerise, its considered to be the internal Id, which is the default. Example : edffrafw-kmeq-rcdx-acfb-qeasbwesbdml","in":"path","required":true,"schema":{"type":"string"}},{"name":"dataSourceID","description":"Datasource ID of the identity being searched. This is applicable if the query parameter 'isAlternateId=true' or 'isCommonKey=true' is supplied. In this scenario, if no value is set for this parameter, the default datasource associated with the facility will be used.","in":"query","schema":{"type":"string"}},{"name":"facilityId","description":"The facilityId for which the identities operation is to be performed. If the facilityId is invalid or if the user has no access to it, then it will return an unauthorized error response.","in":"query","required":false,"schema":{"type":"string"}},{"$ref":"#/components/parameters/isAlternateId"},{"$ref":"#/components/parameters/isCommonKey"},{"$ref":"#/components/parameters/txId"}],"responses":{"200":{"description":"Returns the identity of the given identifier.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity"}}}},"400":{"$ref":"#/components/responses/standard400Response"},"401":{"$ref":"#/components/responses/standard401Response"},"404":{"$ref":"#/components/responses/standard404Response"},"500":{"$ref":"#/components/responses/standard500Response"}},"tags":["identity"]},"put":{"summary":"Updates the identity based on the id provided in the query parameter.","description":"Partial updates are allowed in which case only the identity traits/attributes given in the request body will be updated. If the request body contains an identity attribute/field that can hold a single value, then the update call will overwrite any existing value for that field. If it can hold multiple values (a multi-valued attribute), then it will append at the end of the list by default. This behaviour can be overridden using parameter replaceMultivalueFields. We can update nevermergeids also using the same API. Generally the unique id of the record which should not be allowed to merge with the current record is passed as nevermergeid. In this operation, the current record's id is also set as nevermergeid of other record.","security":[{"Authorization":[]}],"parameters":[{"name":"id","description":"Identifier that uniquely identifies this identity we are trying to update. If the query parameter 'isAlternateId' is set to 'true', then the id is considered to be an alternateId, othewise, its considered to be internal Id, which is the default. Example : edffrafw-kmeq-rcdx-acfb-qeasbwesbdml","in":"path","required":true,"schema":{"type":"string"}},{"name":"dataSourceID","description":"Datasource ID of the identity being updated. This is applicable if the query parameter 'isAlternateId=true' or 'isCommonKey=true' is supplied. In this scenario if no value is sent for this parameter, the default datasource associated with the facility will be used.","in":"query","schema":{"type":"string"}},{"name":"replaceMultivalueFields","description":"When this optional parameter is set to 'true', it will replace the value(s) in one or more multi-valued attributes with the value(s) that is passed in the request body as part of this update. Use this with caution as you may inadvertently overwrite an identity's value(s). You can use this parameter to re-order the items in one or more multi-valued attributes, such as address.","in":"query","schema":{"type":"boolean"}},{"name":"facilityId","description":"The facilityId into which the identities operation is to be performed. If the facilityId is invalid or if the user has no access to it, then it will return an unauthorized error response.","in":"query","required":false,"schema":{"type":"string"}},{"$ref":"#/components/parameters/txId"},{"$ref":"#/components/parameters/isCommonKey"},{"$ref":"#/components/parameters/isAlternateId"}],"responses":{"200":{"description":"Updates the identity based on the id provided in the query parameter.","content":{"application/json":{"schema":{"properties":{"requestDatasourceId":{"type":"string","example":"DefaultDS"},"txId":{"type":"string","example":"edffrafw-kmeq-rcdx-acfb-qeasbwesbdml"},"oldRecord":{"$ref":"#/components/schemas/identity"},"updatedRecord":{"$ref":"#/components/schemas/identity"}}}}}},"400":{"$ref":"#/components/responses/standard400Response"},"401":{"$ref":"#/components/responses/standard401Response"},"404":{"$ref":"#/components/responses/standard404Response"},"500":{"$ref":"#/components/responses/standard500Response"}},"tags":["identity"],"requestBody":{"$ref":"#/components/requestBodies/identityUpdateObject"}},"delete":{"summary":"Deletes the identity for the given identifier.","security":[{"Authorization":[]}],"parameters":[{"name":"id","description":"Identifier that uniquely identifies this identity we are trying to delete. Example : edffrafw-kmeq-rcdx-acfb-qeasbwesbdml","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/isAlternateId"},{"$ref":"#/components/parameters/isCommonKey"},{"name":"dataSourceID","description":"Datasource ID of the identity being deleted. This is applicable if the query parameter 'isAlternateId=true' or 'isCommonKey=true' is supplied. In this scenario if no value is sent for this parameter, the default datasource associated with the facility will be used.","in":"query","schema":{"type":"string"}},{"$ref":"#/components/parameters/txId"},{"name":"facilityId","description":"The facilityId into which the identities operation is to be performed. If the facilityId is invalid or if the user has no access to it, then it will return an unauthorized error response.","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"204":{"description":"Deletes the identity with the given parameter."},"400":{"$ref":"#/components/responses/standard400Response"},"401":{"$ref":"#/components/responses/standard401Response"},"404":{"$ref":"#/components/responses/standard404Response"},"500":{"$ref":"#/components/responses/standard500Response"}},"tags":["identity"]},"post":{"summary":"Undeletes the identity.","security":[{"Authorization":[]}],"parameters":[{"name":"id","description":"Identifier that uniquely identifies this identity we are trying to undelete. Example : edffrafw-kmeq-rcdx-acfb-qeasbwesbdml","in":"path","required":true,"schema":{"type":"string"}},{"name":"dataSourceID","description":"Datasource ID of the identity being undeleted. This is applicable if the query parameter 'isAlternateId=true' or 'isCommonKey=true' is supplied. In this scenario if no value is sent for this parameter, then the default datasource associated with the facility will be used.","in":"query","schema":{"type":"string"}},{"name":"facilityId","description":"The facilityId for which the identities operation is to be performed. If the facilityId is invalid or if the user has no access to it then it will return an unauthorized error response.","in":"query","required":false,"schema":{"type":"string"}},{"$ref":"#/components/parameters/txId"},{"$ref":"#/components/parameters/isAlternateId"},{"$ref":"#/components/parameters/isCommonKey"}],"responses":{"201":{"description":"Successfuly undelete the identity with the given parameter.","content":{"application/json":{"schema":{"properties":{"requestDatasourceId":{"type":"string","example":"DefaultDS"},"txId":{"type":"string","example":"edffrafw-kmeq-rcdx-acfb-qeasbwesbdml"},"unDeletedRecord":{"$ref":"#/components/schemas/identity"}}}}}},"400":{"$ref":"#/components/responses/standard400Response"},"401":{"$ref":"#/components/responses/standard401Response"},"404":{"$ref":"#/components/responses/standard404Response"},"500":{"$ref":"#/components/responses/standard500Response"}},"tags":["identity"]}},"/identities/search":{"post":{"summary":"searches for one or more identities based on the given search criteria.","description":"The Identities which will be returned will be scored based on the attributes/traits passed in the search criteria.","security":[{"Authorization":[]}],"parameters":[{"name":"filterCodes","description":"The filter codes for the searching identities. Each filter code should be separated with comma in the request. M and PM are the valid filterCodes that can be used to filter the search result. For e.g. 'M' or 'M,PM'.","in":"query","schema":{"type":"string"}},{"name":"filterScore","description":"The filter score for searching identities. Only records which has a score greater than or equal to this value will be returned.","in":"query","schema":{"type":"number","format":"float"}},{"name":"start","description":"Starting index for the searching identities","in":"query","schema":{"type":"integer"}},{"name":"maxRecords","description":"Max record count of Identities which can be returned in the resultset. Default is maximum 10 records.","in":"query","schema":{"type":"integer","default":10}},{"name":"detailedScore","description":"If set to 'true', each patient in the response will have the detailed score pertaining to each attribute of the corresponding patient with the search criteria.","in":"query","schema":{"type":"boolean","default":false}},{"name":"facilityId","description":"The facilityId for which the identities operation is to be performed. If the facilityId is invalid or if the user has no access to it then it will return an unauthorized error response.","in":"query","required":false,"schema":{"type":"string"}},{"$ref":"#/components/parameters/txId"}],"responses":{"200":{"description":"Success. Returns one or more matched identity record(s).","content":{"application/json":{"schema":{"properties":{"requestDatasourceId":{"type":"string","example":"DefaultDS"},"txId":{"type":"string","example":"edffrafw-kmeq-rcdx-acfb-qeasbwesbdml"},"searchResult":{"type":"array","items":{"$ref":"#/components/schemas/identity"}}}}}}},"400":{"$ref":"#/components/responses/standard400Response"},"401":{"$ref":"#/components/responses/standard401Response"},"404":{"$ref":"#/components/responses/standard404Response"},"500":{"$ref":"#/components/responses/standard500Response"}},"tags":["identity"],"requestBody":{"$ref":"#/components/requestBodies/identitySearchObject"}}},"/identities/{id}/{multiValuedAttributeName}/{indexPosition}":{"put":{"summary":"Removes a single value from an identity's multi-valued attribute based on the given index.","description":"All values to the right of this removed item will be shifted one place to the left after this operation is complete.","security":[{"Authorization":[]}],"parameters":[{"name":"id","description":"Identifier that uniquely identifies the master identity whose attribute value we are trying to remove. Example : edffrafw-kmeq-rcdx-acfb-qeasbwesbdml","in":"path","required":true,"schema":{"type":"string"}},{"name":"dataSourceID","description":"Datasource ID of the identity being updated. This is applicable if the query parameter 'isAlternateId=true' or 'isCommonKey=true' is supplied. In this scenario if no value is sent for this parameter, the default datasource associated with the facility will be used.","in":"query","schema":{"type":"string"}},{"name":"multiValuedAttributeName","description":"The name of the multi-valued attribute/trait of this identity which needs to be updated. Example : address","in":"path","required":true,"schema":{"type":"string"}},{"name":"indexPosition","description":"This parameter contains the index position of the multi-valued attribute/trait of this identity to be removed. The position value for the primary value is zero, secondary is 1 etc. Example: 0","in":"path","required":true,"example":0,"schema":{"type":"integer"}},{"name":"facilityId","description":"The facilityId into which the identities operation is to be performed. If the facilityId is invalid or if the user has no access to it then it will return an unauthorized error response.","in":"query","required":false,"schema":{"type":"string"}},{"$ref":"#/components/parameters/txId"},{"$ref":"#/components/parameters/isAlternateId"},{"$ref":"#/components/parameters/isCommonKey"}],"responses":{"204":{"description":"Removed the value at the given index position of the attribute/trait succesfully for this identity."},"400":{"$ref":"#/components/responses/standard400Response"},"401":{"$ref":"#/components/responses/standard401Response"},"404":{"$ref":"#/components/responses/standard404Response"},"500":{"$ref":"#/components/responses/standard500Response"}},"tags":["identity"]}},"/identities/{id}/{childId}":{"put":{"summary":"merges a given identity identified by the parameter childId under the identity identified by id (master identity).","security":[{"Authorization":[]}],"parameters":[{"name":"id","description":"Identifier that uniquely identifies the master identity we are trying to merge into. Example : abceggggiegghhhhceacv1","in":"path","required":true,"schema":{"type":"string"}},{"name":"childId","description":"Identifier that uniquely identifies the child identity we are trying to merge. Example : zuyeiodhskjdhaahee11j","in":"path","required":true,"schema":{"type":"string"}},{"name":"dataSourceID","description":"Datasource ID of the parent identity being merged. If no value is sent default datasource for the facility will be used.","in":"query","schema":{"type":"string"}},{"name":"childDataSourceID","description":"Datasource ID of the child identity being merged. If this parameter is not passed, then the value pertaining to parent identitiy's datasourceID  parameter will be used.","in":"query","schema":{"type":"string"}},{"name":"applyDataSrcConfig","description":"Whether datasource config file rule for each field should be applied while merging. This parameter when set to 'true' will use the datasource configuration for determing field level operation while merging record for both 'M' or 'PM' type match. When this parameter value is set to 'false', then the datasource configuration will not be used while merging 'M' or 'PM' match type records. If this paramter is not supplied, then default behaviour of using datasource configuration  only for 'M' type match will be applicable.","in":"query","schema":{"type":"boolean"}},{"name":"facilityId","description":"The facilityId for which the identities operation is to be performed. If the facilityId is invalid or if the user has no access to it then it will return an unauthorized error response.","in":"query","required":false,"schema":{"type":"string"}},{"$ref":"#/components/parameters/txId"},{"$ref":"#/components/parameters/isAlternateId"},{"$ref":"#/components/parameters/isCommonKey"}],"responses":{"200":{"description":"Merged successfully.","content":{"application/json":{"schema":{"properties":{"requestDatasourceId":{"type":"string","example":"DefaultDS"},"txId":{"type":"string","example":"edffrafw-kmeq-rcdx-acfb-qeasbwesbdml"},"oldRecord":{"$ref":"#/components/schemas/identity"},"mergedRecord":{"$ref":"#/components/schemas/identity"},"updatedRecord":{"$ref":"#/components/schemas/identity"}}}}}},"400":{"$ref":"#/components/responses/standard400Response"},"401":{"$ref":"#/components/responses/standard401Response"},"404":{"$ref":"#/components/responses/standard404Response"},"500":{"$ref":"#/components/responses/standard500Response"}},"tags":["identity"]},"post":{"summary":"unmerge a given identity identified by the parameter childId from the identity identified by id (master identity).","security":[{"Authorization":[]}],"parameters":[{"name":"id","description":"Identifier that uniquely identifies the master identity we are trying to unmerge from. Example : abceggggiegghhhhceacv1","in":"path","required":true,"schema":{"type":"string"}},{"name":"childId","description":"Identifier that uniquely identifies the child identity we are trying to unmerge. Example : zuyeiodhskjdhaahee11j","in":"path","required":true,"schema":{"type":"string"}},{"name":"dataSourceID","description":"Datasource ID of the parent identity being unmerged. If no value is sent default datasource for the facility will be used.","in":"query","schema":{"type":"string"}},{"name":"childDataSourceID","description":"Datasource ID of the child identity being unmerged. If this parameter is not passed, then the parent identity's datasource ID will be used.","in":"query","schema":{"type":"string"}},{"name":"neverMerge","description":"If set to 'true', these two identities will be marked as being separate entities and cannot be merged.","in":"query","schema":{"type":"boolean"}},{"name":"revertToOriginal","description":"If set to 'true', the master identity will be reverted back to the state before the merge took place.  <br> <br> <b>Use this parameter with caution!!</b>","in":"query","schema":{"type":"boolean"}},{"name":"facilityId","description":"The facilityId for which the identities operation is to be performed. If the facilityId is invalid or if the user has no access to it then it will return an unauthorized error response.","in":"query","required":false,"schema":{"type":"string"}},{"$ref":"#/components/parameters/txId"},{"$ref":"#/components/parameters/isAlternateId"},{"$ref":"#/components/parameters/isCommonKey"}],"responses":{"201":{"description":"Unmerged successfully.","content":{"application/json":{"schema":{"properties":{"requestDatasourceId":{"type":"string","example":"DefaultDS"},"txId":{"type":"string","example":"edffrafw-kmeq-rcdx-acfb-qeasbwesbdml"},"oldRecord":{"$ref":"#/components/schemas/identity"},"unMergedRecord":{"$ref":"#/components/schemas/identity"},"updatedRecord":{"$ref":"#/components/schemas/identity"}}}}}},"400":{"$ref":"#/components/responses/standard400Response"},"401":{"$ref":"#/components/responses/standard401Response"},"404":{"$ref":"#/components/responses/standard404Response"},"500":{"$ref":"#/components/responses/standard500Response"}},"tags":["identity"]}},"/identities/common-match":{"post":{"summary":"This API can be used to identify whether the identities provided as input are the same person or not. This API accepts more than one identity in the request body and returns whether all the identities matched with an existing identity that is common to all the identities provided as input in the request body. The master identity from 4medica Big Data MPI is returned as response, if a common identity is found.","security":[{"Authorization":[]}],"parameters":[{"name":"matchDetails","description":"Optional parameter when set to 'true', will return each identities matches in response","in":"query","schema":{"type":"boolean"}},{"$ref":"#/components/parameters/txId"},{"name":"facilityId","description":"The facilityId for which the identities operation is to be performed. If the facilityId is invalid or if the user has no access to it then it will return an unauthorized error response.","in":"query","required":false,"schema":{"type":"string"}}],"requestBody":{"description":"Need atleast two identities to get the common match. Please add it manually <br> <br>[<br> {identity1},<br> {identity2}<br>]<br>","content":{"application/json":{"schema":{"properties":{"identities":{"type":"array","minimum":2,"items":{"$ref":"#/components/schemas/common-match-input"}}}}}}},"responses":{"201":{"description":"Common match details.","content":{"application/json":{"schema":{"properties":{"txId":{"type":"string","example":"edffrafw-kmeq-rcdx-acfb-qeasbwesbdml"},"matchFlag":{"type":"string","example":"Y"},"matchIdentity":{"$ref":"#/components/schemas/identity"},"matchDetails":{"$ref":"#/components/schemas/commonMatchIdentities"}}}}}},"400":{"$ref":"#/components/responses/standard400Response"},"401":{"$ref":"#/components/responses/standard401Response"},"500":{"$ref":"#/components/responses/standard500Response"}},"tags":["identity"]}},"/file":{"post":{"summary":"Uploads a file with identities into the 4medica Big Data MPI and returns the uploaded loadDataId and the facility into which the data got uploaded.","security":[{"Authorization":[]}],"parameters":[{"name":"uploadType","description":"The upload type for the file to be uploaded. It can be either of three values:- \"loadAndRecalculate\" for Upload with Recalculation, \"loadOnly\" for Upload without Recalculation, \"searchAndRegister\" for upload with search and register. No other values will be accepted for this parameter and it is a mandatory parameter as well.","in":"query","required":true,"schema":{"type":"string"}},{"name":"facilityId","description":"The facilityId into which the file is to be uploaded. If the facilityId is invalid or if the user has no access to it then it will return unauthorized error response. By default, the authtoken's facilityId will be applied if not sent in request.","in":"query","required":false,"schema":{"type":"string"}},{"name":"dataSourceID","description":"Datasource ID into which the file is to be uploaded to the facility. If no value is sent for this parameter, the default datasource pertaining to the facility will be applied for the file upload process.","in":"query","required":false,"schema":{"type":"string"}},{"name":"fileVersion","description":"The data format version of the file which is to be uploaded.  The values can be \"V1\", \"V2\" or V2.1. By default the value will be \"V1\".","in":"query","required":false,"schema":{"type":"string"}},{"$ref":"#/components/parameters/txId"}],"responses":{"200":{"$ref":"#/components/responses/fileUploadResponse"},"400":{"$ref":"#/components/responses/standard400Response"},"401":{"$ref":"#/components/responses/standard401Response"},"500":{"$ref":"#/components/responses/standard500Response"}},"tags":["file upload"],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"description":"The file to be uploaded should be sent as a multipart request with name of the attribute as \"file\". The file can be of any extension. The content format in the file should be of 4medica upload format.","type":"string","format":"binary"}},"required":["file"]}}}}}},"/identities/full-text-search":{"get":{"summary":"Getting identities suggestions based on user inputs","security":[{"Authorization":[]}],"parameters":[{"name":"t","description":"The search term. The API will search the term in firstName, lastName, middleName, address1, address2, city, state, custom, facilityLocalId, personalId and return results","in":"query","required":true,"schema":{"type":"string"}},{"name":"facilityId","description":"FacilityId filter for identities, if not provided will take the facility id from user's current context.","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/fullTextSearchResponse"},"400":{"$ref":"#/components/responses/standard400Response"},"401":{"$ref":"#/components/responses/standard401Response"},"500":{"$ref":"#/components/responses/standard500Response"}},"tags":["full text search"]}},"/identities/suggest":{"get":{"summary":"Search identity based on firstName, lastName, address1, address2, city, state, postalcode, custom","security":[{"Authorization":[]}],"parameters":[{"name":"facilityId","description":"The facilityId into which the search operation is to be performed. If this parameter is not provided, it will take the root facility of the user","in":"query","required":false,"schema":{"type":"string"}},{"name":"firstName","description":"If this parameter is provided, it will return a list of first names starting with the value given for this parameter","in":"query","required":false,"schema":{"type":"string"}},{"name":"lastName","description":"If this parameter is provided, it will return a list of last names starting with the value given for this parameter","in":"query","required":false,"schema":{"type":"string"}},{"name":"middleName","description":"If this parameter is provided, it will return a list of middle names starting with the value given for this parameter","in":"query","required":false,"schema":{"type":"string"}},{"name":"address1","description":"If this parameter is provided, it will return a list of address1 starting with the value given for this parameter","in":"query","required":false,"schema":{"type":"string"}},{"name":"address2","description":"If this parameter is provided, it will return a list of address2 starting with the value given for this parameter","in":"query","required":false,"schema":{"type":"string"}},{"name":"city","description":"If this parameter is provided, it will return a list of city's starting with the value given for this parameter","in":"query","required":false,"schema":{"type":"string"}},{"name":"state","description":"If this parameter is provided, it will return a list of state starting with the value given for this parameter","in":"query","required":false,"schema":{"type":"string"}},{"name":"zipcode","description":"If this parameter is provided, it will return a list of zip code starting with the value given for this parameter","in":"query","required":false,"schema":{"type":"string"}},{"name":"custom","description":"If this parameter is provided, it will return a list of custom starting with the value given for this parameter","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/suggestResponse"},"401":{"$ref":"#/components/responses/standard401Response"},"500":{"$ref":"#/components/responses/standard500Response"}},"tags":["typeahead search"]}},"/app-info":{"get":{"summary":"Returns instance level information like identities count, organization config details, mongo db and solr size.","security":[{"Authorization":[]}],"responses":{"200":{"$ref":"#/components/responses/appInfoAPIResponse"},"401":{"$ref":"#/components/responses/standard401Response"},"500":{"$ref":"#/components/responses/standard500Response"}},"tags":["app-info"]}}},"components":{"securitySchemes":{"Authorization":{"description":"For accessing the auth protected API a valid access token must be passed in all the queries in the 'Authorization' header. A valid access token is generated by the API and retourned as answer of a call to the route /users/login giving a valid username & password.","type":"apiKey","name":"Authorization","in":"header"}},"requestBodies":{"usercredentials":{"description":"Username and password for authentication.","required":true,"content":{"application/json":{"schema":{"required":["username","password"],"properties":{"username":{"type":"string","pattern":"^[A-Fa-f0-9]{8,25}$","title":"Username","description":"The username used for authentication.","example":"jsmith"},"password":{"type":"string","format":"password","title":"Password","description":"The password used for authentication.","example":"W3lc0m3 to 4medica.com!"}}}}}},"identitySearchObject":{"description":"Traits about the identity that we are searching for.","required":true,"content":{"application/json":{"schema":{"properties":{"facilityLocalId":{"type":"array","title":"Ids assigned by the Facility/Organization.i.e Medical Record Numbers (MRN).","items":{"properties":{"id":{"type":"string","title":"The ID assigned by the facility to this identity.","example":"A178954"},"idSrc":{"type":"string","title":"Contains the identifier of the source Organization/facility which assigned the corresponding facilityLocalId to this identity.","example":"QL"}}}},"firstname":{"$ref":"#/components/schemas/firstname"},"lastname":{"$ref":"#/components/schemas/lastname"},"middlename":{"$ref":"#/components/schemas/middlename"},"suffix":{"$ref":"#/components/schemas/suffix"},"nickname":{"$ref":"#/components/schemas/nickname"},"sex":{"$ref":"#/components/schemas/sex"},"dateOfBirth":{"$ref":"#/components/schemas/dateOfBirth"},"personalId":{"$ref":"#/components/schemas/personalId"},"ssn":{"$ref":"#/components/schemas/ssn"},"address":{"$ref":"#/components/schemas/address"},"phone":{"$ref":"#/components/schemas/phone"},"email":{"$ref":"#/components/schemas/email"},"race":{"$ref":"#/components/schemas/race"},"ethnicity":{"$ref":"#/components/schemas/ethnicity"},"custom":{"$ref":"#/components/schemas/custom"},"datasourceId":{"type":"array","title":"The datasource identifier that this identity belongs to. An Identity may contain multiple datasources, if identities across different datasources were merged.","items":{"properties":{"id":{"type":"string","example":"DefaultDS"}}}},"deceased":{"$ref":"#/components/schemas/deceased"}}}}}},"identityUpdateObject":{"description":"Traits about the identity that we are trying to update.","required":true,"content":{"application/json":{"schema":{"properties":{"facilityLocalId":{"type":"array","title":"Ids assigned by the Facility/Organization like Medical Record Number (MRN).","items":{"properties":{"id":{"type":"string","title":"The ID assigned by the facility to this identity.","example":"A178954"},"idSrc":{"type":"string","title":"Contains the identifier of the source Organization/facility which assigned the corresponding facilityLocalId to this identity.","example":"QL"}}}},"firstname":{"$ref":"#/components/schemas/firstname"},"lastname":{"$ref":"#/components/schemas/lastname"},"middlename":{"$ref":"#/components/schemas/middlename"},"suffix":{"$ref":"#/components/schemas/suffix"},"nickname":{"$ref":"#/components/schemas/nickname"},"sex":{"$ref":"#/components/schemas/sex"},"dateOfBirth":{"$ref":"#/components/schemas/dateOfBirth"},"personalId":{"$ref":"#/components/schemas/personalId"},"ssn":{"$ref":"#/components/schemas/ssn"},"address":{"$ref":"#/components/schemas/address"},"phone":{"$ref":"#/components/schemas/phone"},"email":{"$ref":"#/components/schemas/email"},"race":{"$ref":"#/components/schemas/race"},"ethnicity":{"$ref":"#/components/schemas/ethnicity"},"custom":{"$ref":"#/components/schemas/custom"},"neverMerge":{"type":"array","title":"The never merge object where multiple alternateId or internal ID value can be supplied. If the query parameter 'isAlternateId=true' is passed, then this field will be considered to be the alternate ID. In this scenario, this field can contain a list of objects where each object has information about the alternate id and the corresponding datasource ID value i.e. the alternate id of a particular identity needs to be provided in the id field and the corresponding datasource ID value needs to be provided in the dataSrcId field of the object. If 'isAlternateId=true' parameter is not supplied in the query parameter, then this field will be considered to be the internal ID values. In this case the dataSrcId field is optional. The records pertaining to the supplied values will be marked to never merge with the record i.e. which is getting updated. If any of the IDs provided in this field is not present in 4medica Big Data MPI, then this API will throw an invalid request error code.","items":{"properties":{"id":{"type":"string","title":"The alternate id of the identity which needs to be marked as \"never merge\" with the record which is getting updated.","example":"31f52d34-806c-4d2f-9baa-4f88acf77a41"},"dataSrcId":{"type":"string","title":"The corresponding datasourceId of supplied id value.","example":"DefaultDS"}}}},"deceased":{"$ref":"#/components/schemas/deceased"}}}}}},"identityRegistrationObject":{"description":"Traits about the identity that we are trying to add or find a match if it exists already.","required":true,"content":{"application/json":{"schema":{"properties":{"id":{"type":"string","description":"Identifier that will uniquely identify this identity. This is an optional attribute. If no value is supplied in this field, 4medica Big Data MPI will asign a unique value to this field. This field is also refered as the internal identifier of a person record. Internal or external identifier assigned to this identity by 4medica Big Data MPI or the client during registration. Example : edffrafw-kmeq-rcdx-acfb-qeasbwesbdml"},"alternateId":{"type":"array","title":"Alternate ID that can unqiuely identify an identity (person).","description":"This is useful if the client does not want to manage 4medica Big Data MPI ID. The value supplied in this attribute needs to be unique within a particular datasource. If no value is supplied in this attribute, the internal ID i.e. the 'id' value will be used for this field.","items":{"properties":{"id":{"type":"string","example":"12345"}}}},"commonKey":{"$ref":"#/components/schemas/commonKey"},"datasourceId":{"type":"array","title":"The datasource identifier that this identity belongs to","description":"During registration only one datasource ID value needs to be supplied. This is a optional attribute. If no value is supplied in this field, the default datasource ID associated to the organization will be considered.","items":{"properties":{"id":{"type":"string","example":"DefaultDS"}}}},"facilityLocalId":{"type":"array","title":"Medical Record Numbers (MRN).","description":"IDs assigned by the Facility/Organization.","items":{"properties":{"id":{"type":"string","description":"The ID assigned by the facility to this identity.","example":"A178954"},"idSrc":{"type":"string","description":"Contains the identifier of the source Organization/facility which assigned the corresponding facilityLocalId to this identity.","example":"QL"}}}},"firstname":{"$ref":"#/components/schemas/firstname"},"lastname":{"$ref":"#/components/schemas/lastname"},"middlename":{"$ref":"#/components/schemas/middlename"},"suffix":{"$ref":"#/components/schemas/suffix"},"nickname":{"$ref":"#/components/schemas/nickname"},"sex":{"$ref":"#/components/schemas/sex"},"dateOfBirth":{"$ref":"#/components/schemas/dateOfBirth"},"personalId":{"$ref":"#/components/schemas/personalId"},"ssn":{"$ref":"#/components/schemas/ssn"},"address":{"$ref":"#/components/schemas/address"},"phone":{"$ref":"#/components/schemas/phone"},"email":{"$ref":"#/components/schemas/email"},"race":{"$ref":"#/components/schemas/race"},"ethnicity":{"$ref":"#/components/schemas/ethnicity"},"custom":{"$ref":"#/components/schemas/custom"},"deceased":{"$ref":"#/components/schemas/deceased"}}}}}},"searchCommonMatchIdentities":{"content":{"application/json":{"schema":{"properties":{"identities":{"type":"array","minimum":2,"items":{"$ref":"#/components/schemas/common-match-input"}}}}}}}},"responses":{"authenticationResponse":{"description":"Returns an authtoken to be used with other 4medica Big Data MPI APIs, along with user and role information. This token will expire after 30 minutes of inactivity.","content":{"application/json":{"schema":{"properties":{"authtoken":{"description":"The authtoken assigned to this user/client for this session.","type":"string","example":"kjkdjkdjs23kjk32232iuerq"},"rootOrg":{"description":"The id of the root (top most) organization that the authenticated user belongs to.","type":"string","example":"543f9a9497aec8ef4f1504b4"},"defaultFacilityId":{"description":"The default facilityID of the authenticated user.","type":"string","example":"P00001"},"userDetails":{"properties":{"firstname":{"description":"User's firstname.","type":"string","example":"APITester"},"lastName":{"description":"User's lastname.","type":"string","example":"Tester"},"username":{"description":"User's username that was used for authentication.","type":"string","example":"APITester"},"rootOrg":{"description":"Root organization of the user","type":"string","example":"543f9a9497aec8ef4f1504b4"},"validInChild":{"description":"Whether user is valid in child","type":"boolean","example":true}}},"roleDetails":{"properties":{"orgId":{"description":"User's currently selected Organization Id.","type":"string","example":"543f9a9497aec8ef4f1504b4"},"userId":{"description":"User's userId that was used for authentication.","type":"string","example":"425f9a8856aec8ef785h04b9"},"facilityId":{"description":"Root facility ID of the authenticated user","type":"string","example":"P00001"},"permissions":{"properties":{"orgPermsissions":{"description":"Org level permissions permissible to the authenticated user. This is the Authorization to perform a specific action within the system.","type":"array","items":{"type":"string","example":"ORGANIZATION_VIEW"}},"dataSrcPermissions":{"properties":{"dataSrcAccessList":{"description":"Accessible datasources for the user who has 4medica Big Data MPI permissions.","type":"array","items":{"type":"string","example":"DefaultDS"}},"dataSrcDetailedPermissions":{"properties":{"dataSourceName(s)":{"description":"The name of the datasource accessible to user. It will be set to '*', if all datasources are applicable to a set of permissions, otherwise that particular datasource and each of the other accessible datasource value will be returned with 4medica Big Data MPI permissions.","type":"array","items":{"type":"string","example":"AUTO_MERGE"}}}}}}}}}},"invalidatedAuthToken":{"description":"The system user authtoken which is invalidated due to re-login from same IP address. System user is the user that belongs to the System Role.","type":"string","example":"cbced8782iuiuwiu3345"},"reasonForInvalidation":{"description":"Reason for authtoken invalidation for system user.","type":"string","example":"Multiple login attempts with system account admin from IP 192.168.101.23."},"facilityShortName":{"description":"The default facilityShortName of the authenticated user.","type":"string","example":"4medica"},"facilityFullName":{"description":"The default facilityFullName of the authenticated user.","type":"string","example":"4medica"}}}}}},"standard400Response":{"description":"Invalid request. Please see 4medica Big Data MPI API documentation for more details.","content":{"application/json":{"schema":{"properties":{"status":{"type":"object","properties":{"code":{"description":"Error status code.","type":"string","example":400},"message":{"description":"Error message description.","type":"string","example":"Inbound message parse Error [Invalid JSON etc]"}}}}}}}},"standard500Response":{"description":"Server error. Please contact 4medica support if problem persists.","content":{"application/json":{"schema":{"properties":{"status":{"properties":{"code":{"description":"Error status code.","type":"string","example":500},"message":{"description":"Error message description.","type":"string","example":"Server error. Please contact 4medica support if problem persists"}}}}}}}},"standard404Response":{"description":"Unable to find identity with the given id.","content":{"text/plain":{"schema":{"type":"string","example":"Unable to find identities with the given ids"}}}},"standard401Response":{"description":"Invalid authToken.","content":{"application/json":{"schema":{"properties":{"status":{"properties":{"code":{"description":"Error status code.","type":"string","example":200},"message":{"description":"Error message description.","type":"string","example":"Invalid authToken"}}}}}}}},"fileUploadResponse":{"description":"Returns the loadDataID of the file which was uploaded and the facility where it was uploaded. The processing of the file can be monitored from 4medica Big Data MPI's Graphical User Interface (Upload Screen) under this facility.","content":{"application/json":{"schema":{"properties":{"loadDataId":{"description":"The loadDataID reference for the file uploaded.","type":"string","example":"543f9a9497aec8ef4f1504b4"},"fileDescription":{"description":"The uploaded file description.","type":"string","example":"UploadingFile (Uploaded from API).csv"},"uploadType":{"description":"The upload type used for uploadng the file.","type":"string","example":"searchAndRegister"},"dataSourceID":{"description":"The dataSourceId for which the file was uploaded.","type":"string","example":"DefaultDS"},"facilityId":{"description":"The facilityId of the organization into which the file got uploaded.","type":"string","example":"HOS8967"},"facilityFullName":{"description":"The organization's fullname into which the file got uploaded.","type":"string","example":"Upload API Facility"},"facilityShortName":{"description":"The organization's shortname into which the file got uploaded.","type":"string","example":"Upld_API_Faclity"}}}}}},"fullTextSearchResponse":{"description":"Returns the list of identity's under this facility.","content":{"application/json":{"schema":{"properties":{"searchResult":{"type":"array","items":{"$ref":"#/components/schemas/fullTextSearch"}}}}}}},"suggestResponse":{"description":"Returns the list of strings which contains firstname or lastname or middle name or address1 or address2 or city or state or postalcode or custom under this facility.","content":{"application/json":{"schema":{"properties":{"ArrayOfStrings":{"description":"list of strings.","type":"array","items":{"type":"string"},"example":["John","Smith","David","Andrew"]}}}}}},"appInfoAPIResponse":{"description":"common app info - facility configs, solr and mango db sizes.","content":{"application/json":{"schema":{"properties":{"environment":{"description":"app environment","type":"string","example":"dev"},"instance":{"description":"gcp pod instance","type":"string","example":"default"},"instanceType":{"description":"instance type (T for Test aand P for Production).","type":"string","example":"T"},"version":{"description":"application version","type":"string","example":"2019-12-20.2.3-6e3c454e"},"totalIdentities":{"description":"total number of identities","type":"integer","example":88824},"mongoDBSize":{"description":"mongo db size in MB.","type":"string","example":"318.12 MB"},"solrIndexSize":{"description":"solr index size.","type":"string","example":"56.16 MB"},"facilities":{"type":"array","items":{"$ref":"#/components/schemas/facilityInfo"}},"timestamp":{"type":"string","example":"2020-07-07T04:00:00.000Z"}}}}}},"commonMatchDetails":{"description":"Returns the list of strings which contains firstname or lastname or middle name or address1 or address2 or city or state or postalcode or custom under this facility. content:\n  application/json:\n    schema:\n      properties:\n        example:\n          type: array\n          items:\n            $ref: '#/components/responses/commonMatchIdentities'"}},"schemas":{"fullTextSearch":{"properties":{"id":{"type":"string","description":"Internal or external unique identifier assigned to this identity by 4medica Big Data MPI or the client during registration.","example":"31f52d34-806c-4d2f-9baa-4f88acf77a41"},"alternateId":{"type":"array","title":"Alternate ID that can unqiuely identify an identity (person).","description":"This is useful if the client does not want to manage 4medica Big Data MPI. ID.","items":{"type":"object","properties":{"id":{"type":"string","example":"CDRS_PER_ID#123"},"dataSrcId":{"type":"string","example":"DefaultDS"}}}},"datasourceId":{"type":"array","title":"The datasource identifier that this identity belongs to. Contains multiple datasources whenever identities across different datasources are merged.","items":{"properties":{"id":{"type":"string","example":"CDRS_PER_ID"}}}},"facilityLocalId":{"type":"array","title":"Medical Record Numbers (MRN). Ids assigned by the Facility/Organization.","items":{"properties":{"id":{"type":"string","title":"The ID assigned by the facility to this identity.","example":"A178954"},"idSrc":{"type":"string","title":"Contains the identifier of the source Organization/facility which assigned the corresponding facilityLocalId to this identity. The name of the Organization will be displayed on the screen if the id to name mapping is pre-configured in the database.","example":"QL"}}}},"firstname":{"$ref":"#/components/schemas/firstname"},"lastname":{"$ref":"#/components/schemas/lastname"},"middlename":{"$ref":"#/components/schemas/middlename"},"suffix":{"$ref":"#/components/schemas/suffix"},"nickname":{"$ref":"#/components/schemas/nickname"},"sex":{"$ref":"#/components/schemas/sex"},"dateOfBirth":{"$ref":"#/components/schemas/dateOfBirth"},"personalId":{"$ref":"#/components/schemas/personalId"},"ssn":{"$ref":"#/components/schemas/ssn"},"address":{"$ref":"#/components/schemas/address"},"phone":{"$ref":"#/components/schemas/phone"},"email":{"$ref":"#/components/schemas/email"},"race":{"$ref":"#/components/schemas/race"},"ethnicity":{"$ref":"#/components/schemas/ethnicity"},"custom":{"$ref":"#/components/schemas/custom"},"createdTime":{"type":"string","title":"Date and time when this record was first created.","example":"Mon Nov 07 01:49:24 PST 2018"},"updatedTime":{"type":"string","title":"Date and time when this record was last updated.","example":"Mon Nov 07 01:49:24 PST 2018"}}},"identity":{"properties":{"id":{"type":"string","description":"Internal or external unique identifier assigned to this identity by 4medica Big Data MPI or the client during registration.","example":"31f52d34-806c-4d2f-9baa-4f88acf77a41"},"alternateId":{"type":"array","title":"Alternate ID that can unqiuely identify an identity (person).","description":"This is useful if the client does not want to manage 4medica Big Data MPI. ID.","items":{"type":"object","properties":{"id":{"type":"string","example":"CDRS_PER_ID#123"},"dataSrcId":{"type":"string","example":"DefaultDS"}}}},"commonKey":{"$ref":"#/components/schemas/commonKey"},"oldCommonKey":{"$ref":"#/components/schemas/oldCommonKey"},"facilityId":{"type":"string","title":"Facility/Organization identifier a.k.a Identifier Domain for which unique identity index is being created.","example":"HIN0002"},"datasourceId":{"type":"array","title":"The datasource identifier that this identity belongs to. Contains multiple datasources whenever identities across different datasources are merged.","items":{"properties":{"id":{"type":"string","example":"CDRS_PER_ID"}}}},"facilityLocalId":{"type":"array","title":"Medical Record Numbers (MRN). Ids assigned by the Facility/Organization.","items":{"properties":{"id":{"type":"string","title":"The ID assigned by the facility to this identity.","example":"A178954"},"idSrc":{"type":"string","title":"Contains the identifier of the source Organization/facility which assigned the corresponding facilityLocalId to this identity. The name of the Organization will be displayed on the screen if the id to name mapping is pre-configured in the database.","example":"QL"}}}},"firstname":{"$ref":"#/components/schemas/firstname"},"lastname":{"$ref":"#/components/schemas/lastname"},"middlename":{"$ref":"#/components/schemas/middlename"},"suffix":{"$ref":"#/components/schemas/suffix"},"nickname":{"$ref":"#/components/schemas/nickname"},"sex":{"$ref":"#/components/schemas/sex"},"dateOfBirth":{"$ref":"#/components/schemas/dateOfBirth"},"personalId":{"$ref":"#/components/schemas/personalId"},"ssn":{"$ref":"#/components/schemas/ssn"},"address":{"$ref":"#/components/schemas/address"},"phone":{"$ref":"#/components/schemas/phone"},"email":{"$ref":"#/components/schemas/email"},"race":{"$ref":"#/components/schemas/race"},"ethnicity":{"$ref":"#/components/schemas/ethnicity"},"custom":{"$ref":"#/components/schemas/custom"},"neverMergeId":{"type":"array","items":{"type":"string","example":"31f52d34-806c-4d2f-9baa-4f88acf77a41"},"title":"The ids of the identities that should be never merged with this identity. This is usually the case when there are identical twins with the exact same last name and/or very similar first names."},"createdTime":{"type":"string","title":"Date and time when this record was first created.","example":"Mon Nov 07 01:49:24 PST 2018"},"updatedTime":{"type":"string","title":"Date and time when this record was last updated.","example":"Mon Nov 07 01:49:24 PST 2018"},"matchCode":{"type":"string","title":"Identity's match code with searching identity (M/PM/WM).","example":"M"},"score":{"type":"number","format":"float","title":"Identity's match score with searching identity (Float).","example":4000},"scorePercentage":{"type":"number","format":"float","title":"Identity's match score percentage with searching identity.","example":75.5},"ruleId":{"type":"string","title":"The ruleId. Only applicable if any rule applied on identity.","example":"appliedRuleId1234"},"ruleAdjustmentScore":{"type":"number","format":"float","title":"Rule applied adjusted score for identity. Only applicable if any rule applied on identity.","example":500.0},"deceased":{"type":"boolean","format":"Boolean","title":"This is to indicate, The identity is deceased or not.","example":true}}},"common-match-input":{"properties":{"facilityLocalId":{"type":"array","title":"Medical Record Numbers (MRN). Ids assigned by the Facility/Organization.","items":{"properties":{"id":{"type":"string","title":"The ID assigned by the facility to this identity.","example":"A178954"},"idSrc":{"type":"string","title":"Contains the identifier of the source Organization/facility which assigned the corresponding facilityLocalId to this identity. The name of the Organization will be displayed on the screen if the id to name mapping is pre-configured in the database.","example":"QL"}}}},"firstname":{"$ref":"#/components/schemas/firstname"},"lastname":{"$ref":"#/components/schemas/lastname"},"middlename":{"$ref":"#/components/schemas/middlename"},"suffix":{"$ref":"#/components/schemas/suffix"},"nickname":{"$ref":"#/components/schemas/nickname"},"sex":{"$ref":"#/components/schemas/sex"},"dateOfBirth":{"$ref":"#/components/schemas/dateOfBirth"},"personalId":{"$ref":"#/components/schemas/personalId"},"ssn":{"$ref":"#/components/schemas/ssn"},"address":{"$ref":"#/components/schemas/address"},"phone":{"$ref":"#/components/schemas/phone"},"email":{"$ref":"#/components/schemas/email"},"race":{"$ref":"#/components/schemas/race"},"ethnicity":{"$ref":"#/components/schemas/ethnicity"},"custom":{"$ref":"#/components/schemas/custom"}}},"address":{"type":"array","title":"Address where the identity is/was located.","items":{"type":"object","properties":{"addressLine1":{"type":"string","title":"Identity's street house number, street address etc.","example":"123 Main Street"},"addressLine2":{"type":"string","title":"Identity's aptmt number, suite number etc.","example":"Suite 250"},"city":{"type":"string","title":"City the identity's address belongs to.","example":"Phoenix"},"county":{"type":"string","title":"Identity's address county name.","example":"Pinal"},"state":{"type":"string","title":"Identity's address state code.","example":"AZ"},"postalCode":{"type":"string","title":"Identity's address zipcode/postal code.","example":85123},"addressValidity":{"type":"boolean","default":true,"title":"Whether this Identity's address is still valid or not."},"addressNormalized":{"type":"boolean","default":false,"title":"Whether this address is normalized from smarty streets API or not."},"postalCode5Digits":{"type":"string","title":"Identity's address zipcode/postal 5 code.","example":85123}}}},"phone":{"type":"array","title":"Identity's contact phone number, type and validity.","items":{"type":"object","properties":{"number":{"type":"string","description":"Identity's phone number. Hyphen in between is permitted. For eg- 839-555-9559 is a valid format, 8395559559 is a valid format. But 839-55599 is not a valid format.","example":8395559559},"type":{"type":"string","description":"Whether the phone is a work phone, home phone, mobile etc.","example":"H"},"validity":{"type":"boolean","description":"Whether this Identity's phone number is still valid and in use or not.","default":true,"example":true}}}},"email":{"type":"array","title":"Identity's contact phone number, type and validity.","items":{"type":"object","properties":{"address":{"type":"string","description":"Identity's email address.","example":"mark_tom@usmail.com"},"validity":{"type":"boolean","description":"Whether this Identity's email address is still valid and in use or not.","default":true,"example":true}}}},"personalId":{"type":"array","title":"Person’s personal identification such as drivers license","items":{"properties":{"id":{"type":"string","description":"Personal identification number for this identity.","example":"DL10089"},"type":{"type":"string","description":"Personal Id Type corresponding to the id of this identity.","example":"DL"},"validity":{"type":"boolean","description":"Specifies whether this id is still valid for this identity or not.","default":true}}}},"oldCommonKey":{"type":"string","description":"The old common key that was assigned. This is returned when a record is unmerged from another record thus returning in this attribute the previous commonkey assigned to it since after unmerging new commonkey will be assigned.","example":"CK-MIHIN#8933654asddf4353452500"},"commonKey":{"type":"string","description":"Common key that can unqiuely identify an identity (person). This is useful if the client does not want to manage 4medica Big Data MPI ID. Common Key is only applicable to Common Key Service enabled organizations.","example":"CK-MIHIN#1789654asddf4353454354"},"custom":{"type":"array","title":"Identity's custom traits such as birth order, eye color etc.","description":"This attribute is usually predefined during an implementation as the semantical meaning for such an attribute is only known to the system that 4medica Big Data MPI is interacting with.","items":{"properties":{"value":{"type":"string","description":"Custom traits (attributes) for search ONLY.","example":"Blue"},"type":{"type":"string","description":"Type of custom field, BIRTH_ORDER, BLOOD_GROUP etc.","example":"PrId"}}}},"ethnicity":{"title":"Identity's ethnicity.","type":"array","items":{"type":"string","description":"Default value will be one of \"H\" (Hispanic/Latino),\"N\" (Not Hispanic/Latino),\"D\" (Declined), \"U\" (Unknown)."},"example":["H"]},"race":{"title":"Identity's race.","type":"array","items":{"type":"string","description":"Default input will be one of \"I\" (American Indian/Alaskan Native),\"A\" (Asian),\"B\" (Black/African American),\"N\" (Native Hawaiian/Other Pacific Islanders),\"C\" (White),\"O\" (Other),\"D\" (Declined),\"U\" (Unknown),\"L\" (Blank)."},"example":["C"]},"firstname":{"title":"Identity's first or given name.","type":"array","items":{"type":"string"},"example":["John"]},"lastname":{"type":"array","title":"Identity's last name.","items":{"type":"string"},"description":"There can be more than one last name for this identity. The value in index 0 is considered to be the primary, index 1 is secondary etc.","example":["Smith"]},"middlename":{"type":"string","description":"Identity's middle name or initial.","example":"C"},"suffix":{"type":"array","items":{"type":"string"},"title":"Identity's name suffix.","example":["Jr."]},"nickname":{"type":"array","title":"Identity's nickname.","items":{"type":"string"},"example":["Johhny"]},"sex":{"type":"string","title":"Identity's gender.","description":"Identity's gender.Valid values- M or F or O or U. Description :- M=Male F=Female O=Other U=Unknown. Other values can be mapped for a Facility/Organization during implementation.","pattern":"^[MFOU]$","example":"M"},"dateOfBirth":{"type":"string","description":"Identity's date of birth.  It should be in format YYYYMMDD. For e.g. 19911129. 1991-11-29 is an invalid format. 19911512 is an invalid date.","format":"date-time","example":"19891015"},"ssn":{"type":"string","description":"Identitiy's social security number. It can either be the entire 9 digits or just the last 4 digits. Hyphen in between is permitted. For eg. 771-89-8852 is a valid format, so is 8852 and 771-898852. But 771-89 is not valid.","example":"771-89-8852"},"deceased":{"type":"boolean","description":"Identity's deceased information.","example":true},"commonMatchIdentities":{"type":"array","title":"Identity's contact phone number, type and validity.","items":{"type":"array","items":{"$ref":"#/components/schemas/identity"}}},"facilityInfo":{"properties":{"facilityId":{"description":"facility id .","type":"string","example":"P00001"},"name":{"description":"organization name.","type":"string","example":"4medica"},"shortName":{"description":"organization short name.","type":"string","example":"4medica"},"identitiesCount":{"description":"number of identities in a facility","type":"integer","example":104},"config":{"$ref":"#/components/schemas/organizationConfig"}}},"organizationConfig":{"properties":{"_id":{"description":"organization config id.","type":"string","example":"d5f321dc6f99166e6ba90668"},"notificationType":{"description":"notification type description.","type":"string","example":"http"},"notificationKafkaUrl":{"description":"kafa url","type":"string","example":"http://kafka"},"notificationKafkaTopic":{"description":"Skafka topic name.","type":"string","example":"P00001"},"notificationUrl":{"description":"notification url.","type":"string","example":"https://192.168.101.41/autotesttest123"},"autoMergePriority":{"type":"array","title":"auto merge priority","description":"auto merge priority","items":{"type":"object","properties":{"id":{"type":"string","example":"dsPriorityList"}}}},"commonKeyFunc":{"description":"is common key functionality enabled.","type":"boolean","example":true},"isAuditEnabledSARUpload":{"description":"is audit enabled for this organization.","type":"boolean","example":true},"facilityId":{"description":"organization id.","type":"string","example":"P00001"},"notificationUrlValidInChild":{"description":"is notification url valid for child organizations.","type":"boolean","example":true},"parentOrgId":{"description":"parent organization id.","type":"string","example":"d5f321db6f99166e6ba9065f"},"disassociatedFromParent":{"description":"whether dis associated from parent","type":"boolean","example":true},"isRegRecalEnabled":{"description":"is registration recalculation enabled.","type":"boolean","example":true},"isStateInQueryNotRequired":{"description":"is state in query not required","type":"boolean","example":true},"clientNotificationEmails":{"type":"array","title":"client notification emails","description":"client notification emails","items":{"type":"object","properties":{"id":{"type":"string","example":"user@client.com"}}}},"isMultivaluedFieldAppendedToBeggining":{"description":"is mutli valued field appended to beginning description.","type":"boolean","example":true},"orgId":{"description":"organization id","type":"string","example":"d5f321db6f99166e6ba9065f"},"isFieldValidationNotRequired":{"description":"is field validation not required","type":"boolean","example":true},"bestMatchScoreNotApplicable":{"description":"is best match score not applicable","type":"boolean","example":true},"doNotCalculateBestMatchScore":{"description":"do not calculate best match score","type":"boolean","example":true},"addressNormalizationRequired":{"description":"is adderess normalization required","type":"boolean","example":true},"normalizedAddressToBeOverrided":{"description":"is the normalized address to be overrided description.","type":"boolean","example":true},"autoHideMergeUnmergeNotificationPopup":{"description":"is auto hide merge or unmerge notification popup description.","type":"boolean","example":true},"mergeUnmergeNotificationPopupFadeoutTime":{"description":"merge or un merge notification popup fade out time.","type":"string","example":2},"phonePrefixMaskRequired":{"description":"is phone prefix mask required.","type":"boolean","example":true},"phonePrefixToBeMasked":{"type":"array","title":"phone prefix to be masked","description":"phone prefix to be masked","items":{"type":"object","properties":{"id":{"type":"string","example":"XX"}}}},"additionalStatisticsForIdentity":{"description":"additional statistics for identity","type":"boolean","example":true},"additionalStatisticsForUploadIdentity":{"description":"additional statistics for upload identity","type":"boolean","example":true},"matchDatasourcesStorageRequired":{"description":"is match data sources storage required.","type":"boolean","example":true},"addressFieldExactMatchRequired":{"description":"is exact match required for address field.","type":"boolean","example":true},"enableDatasourceRepresentation":{"description":"is data source representation enabled","type":"boolean","example":true},"normalizedAddressAtBeginning":{"description":"is normalized address at beginning","type":"boolean","example":true},"ssnNonMandatoryForCK":{"description":"is ssn not mandatory for CK","type":"boolean","example":true},"findMatchMaxRecordsCount":{"description":"Success message description.","type":"integer","example":100}}}},"parameters":{"txId":{"name":"txId","description":"The transaction ID for this request. 4medica Big Data MPI will generate a random transaction ID if this parameter is not passed. The transaction ID will be returned in the response header. This is useful for the calling program to reconcile transactions if necessary.","in":"query","required":false,"schema":{"type":"string"}},"isAlternateId":{"name":"isAlternateId","description":"If set to 'true', the id value in the request PATH will be considered to be the alternateId to identify this identity.","in":"query","schema":{"type":"boolean"}},"isCommonKey":{"name":"isCommonKey","description":"If set to 'true', the id value in the request PATH will be considered as Common Key to identify this identity. This parameter is only applicable to Common Key Service enabled organizations. Both 'isAlternateId' and 'isCommonKey' cannot be set to 'true'.","in":"query","schema":{"type":"boolean"}}}}}