ONC.FindPatient

The FindPatient endpoint is used to retrieve a unique API key for the given patient that can be passed to subsequent methods. To execute this method, you must supply a token (provided by the patient, located within MyMedicalLocker > Account> Connected Practices > API Connections) as well as the patient’s date of birth, first name, and last name.

Example Request

<request>  
  <security>
    <key>UserID~Password~onc_api</key>
    <version>1.0</version>
    <userid />
    <account>39985F47-62E0-4533-918F-317695A6BFEB</account>
  </security>
  <token>123</token>
  <birth_date>01/01/1965</birth_date>
  <first_name>Test</first_name>
  <last_name>Patient</last_name>
</request>
ParentTagTypeMax LengthDescription
requestsecuritytag-Contains security information for accessing the API’s
securitykeystring(required)-Security information used to access the API. Key is made up of a user identifier, password and connection point separated by a tilde character.
The user identifier and password were assigned to you when you signed up to use the API’s. The connection point will always be cw_api.
securityversionstring-Used for backwards compatibility. For now always use 1.0.
securityuseridstring-UserId for the user of your application. Currently not used.
requestaccountstring-Account identifier. This will always be 39985F47-62E0-4533-918F-317695A6BFEB
requesttokenstring(required)39 charToken that has been given to the patient to connect with external API’s.
requestbirth_datestring(required)10 charBirth date of the patient in the form of mm/dd/yyyy
requestfirst_namestring(required)25 charFirst name of the patient
requestlast_namestring(required)95 charLast name of the patient

Example Response

Success: The patient was found and an API key was returned

<response xmlns="http://www.isalushealthcare.webservices/">
  <api_key>D6000A1268434C7F4EBC758CB42463657535FA4410A1C2DF9F</api_key>
</response>

Failure: The patient was not found

<response xmlns="http://www.isalushealthcare.webservices/">
  <api_key />
</response>

Failure: The security key information was not valid

<response xmlns="http://www.isalushealthcare.webservices/">
  <error>
    <code>1</code>
    <description>The login credentials are not valid.</description>
    <log_id>1234</log_id>
</response>
ParentTagTypeMax LengthDescription
responseerrortag-Contains security information for accessing the API’s
errorcodenumeric-
Code identifying the error
errordescriptionstring-
Description of the error
errorlog_idnumeric-
Value which can be used internally to help further identify the error
responseapi_keystring50 charValue used gain access to subsequent API methods. This key is only good for a limited time (Generally less than 30 minutes).
The API key expiration gets extended each time the API key is used.