{"openapi":"3.0.0","servers":[{"url":"/person-lookup"}],"info":{"version":"1.0","title":"4medica Person Lookup Service","description":"This is 4medica Person Lookup Service - REST API specification document. It provides detailed information about lookup service 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>May 13th, 2020</b></i>","contact":{"name":"Support","email":"support@4medica.com"},"license":{"name":"4medica Inc.","url":"http://www.4medica.com"}},"paths":{"/identity":{"post":{"summary":"Lookup for identity and response contain single result","description":"Lookup requested identity in US GPI & Vendor Service. Returns last 4 SSN & One extra address.","security":[{"Authorization":[]}],"parameters":[{"name":"txnId","description":"Transaction Id of requested MPI search & register. If txnId is blank person-lookup service creates one.","in":"query","schema":{"type":"string"}}],"requestBody":{"$ref":"#/components/requestBodies/identity"},"responses":{"200":{"$ref":"#/components/responses/identityLookupResponse"},"400":{"$ref":"#/components/responses/standard400Response"},"401":{"$ref":"#/components/responses/standard401Response"},"404":{"$ref":"#/components/responses/standard404Response"},"500":{"$ref":"#/components/responses/standard500Response"}},"tags":["person-lookup"]}},"/identities":{"post":{"summary":"Lookup for identity and response will contain multiple results.","description":"Lookup requested identity in US GPI & Vendor Service. Returns last 4 SSN & one extra address.","security":[{"Authorization":[]}],"parameters":[{"name":"txnId","description":"Transaction Id of requested MPI search & register. If txnId is blank person-lookup service creates a new one.","in":"query","schema":{"type":"string"}}],"requestBody":{"$ref":"#/components/requestBodies/identity"},"responses":{"200":{"$ref":"#/components/responses/identitiesLookupResponse"},"400":{"$ref":"#/components/responses/standard400Response"},"401":{"$ref":"#/components/responses/standard401Response"},"404":{"$ref":"#/components/responses/standard404Response"},"500":{"$ref":"#/components/responses/standard500Response"}},"tags":["person-lookup"]}}},"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. Contact 4medica support team for access token.","type":"apiKey","name":"Authorization","in":"header"}},"requestBodies":{"identity":{"description":"Sample request body","required":true,"content":{"application/json":{"schema":{"required":["requestedIdentity"],"properties":{"instanceId":{"type":"string","title":"Instance id of MPI instance","description":"Instance Id of the requested MPI instance","example":"demo"},"requestedIdentity":{"required":["firstname","lastname","sex","dateOfBirth","address"],"title":"Identity to lookup in person-lookup service","allOf":[{"$ref":"#/components/schemas/identity"}]}}}}}}},"responses":{"standard400Response":{"description":"Invalid request. Please see 4medica Big Data MPI API documentation for more details.","content":{"application/json":{"schema":{"properties":{"errorName":{"description":"Error status code.","type":"string","example":"Bad Request"},"errorMessage":{"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":{"errorName":{"description":"Error status code.","type":"string","example":"Technical Error"},"errorMessage":{"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":"object","example":""}}}},"standard401Response":{"description":"Invalid authToken.","content":{"application/json":{"schema":{"properties":{"errorName":{"description":"Error name.","type":"string","example":"Authentication Exception"},"message":{"description":"Error message description.","type":"string","example":"Invalid authentication token"}}}}}},"identityLookupResponse":{"description":"Lookup response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity"}}}},"identitiesLookupResponse":{"description":"Lookup response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identities"}}}}},"schemas":{"identity":{"properties":{"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"]},"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"},"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"},"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."}}}},"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}}}},"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":"QUEST_DIAGNOSTICS"}}}},"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}}}},"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"]},"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"]}}},"identity1":{"properties":{"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"]},"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"},"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 Stre"},"addressLine2":{"type":"string","title":"Identity's aptmt number, suite number etc.","example":"Suite 255"},"city":{"type":"string","title":"City the identity's address belongs to.","example":"Phoenix"},"state":{"type":"string","title":"Identity's address state code.","example":"AZ"},"postalCode":{"type":"string","title":"Identity's address zipcode/postal code.","example":85121},"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."}}}},"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}}}},"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":"QUEST_DIAGNOSTICS"}}}},"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}}}},"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"]},"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"]}}},"identities":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/identity"},{"$ref":"#/components/schemas/identity1"}]}}}}}