Click or drag to resize

Persons

SDK provides the ability to search for people with specified criteria and retrieve their information. In other words it exposes similar functionality as the Person Search screen in the Epic UI except through an api.
Post /api/person_search

This method is used to retrieve person information based on specified criteria. In other words, this method mimics the Epic behaviour of the following screen:

Person Search

Can be accessed via the URI [Your_SDK_Service]/api/person_search.

Request Body

Response

Examples

VB
 1' Constant DATABASE preset to current database name
 2' Constant AUTHENTICATION_KEY set to current authentication key
 3
 4Try
 5  Dim webclient As WebClient = New WebClient
 6  'Provide a fully qualified computer name with the SDK service installed and a real value for last name.
 7  Dim sURI As String = $"https://Fully_Qualified_Service_Computer_Name/SDK_Service/api/person_search"
 8  Dim sPersonFilter As String = "{""last_name"" : ""{Real_Last_Name}""}"
 9  With webclient
10    .Encoding = Encoding.UTF8
11    .Headers.Add("Content-type", "application/json")
12    .Headers.Add("AuthenticationKey", AUTHENTICATION_KEY)
13    .Headers.Add("DatabaseName", DATABASE)
14  End With
15
16  Dim sResult As String = webclient.UploadString(sURI, "POST", sPersonFilter)
17
18  Dim jss As New Web.Script.Serialization.JavaScriptSerializer
19  Dim oPersons As PersonGetResult = jss.Deserialize(Of PersonGetResult)(sResult)
20  Return oPersons
21Catch ex As WebException
22  MessageBox.Show(New IO.StreamReader(ex.Response.GetResponseStream).ReadToEnd)
23Catch ex As Exception
24  MessageBox.Show(ex.Message)
25End Try
VB
 1' Constant DATABASE preset to current database name
 2' Constant AUTHENTICATION_KEY set to current authentication key
 3
 4Try
 5  Dim webclient As WebClient = New WebClient
 6  'Provide a fully qualified computer name with the SDK service installed and a real values for last and first name.
 7  Dim sURI As String = $"https://Fully_Qualified_Service_Computer_Name/SDK_Service/api/person_search"
 8  Dim sPersonFilter As String = "{""last_name"" : ""Real_Last_Name"",
 9                                  ""first_name"" : ""Real_First_Name"",
10                                  ""date_of_birth"" : ""Real_DOB""
11                                 }"
12
13  With webclient
14    .Encoding = Encoding.UTF8
15    .Headers.Add("Content-type", "application/json")
16    .Headers.Add("AuthenticationKey", AUTHENTICATION_KEY)
17    .Headers.Add("DatabaseName", DATABASE)
18  End With
19
20  Dim sResult As String = webclient.UploadString(sURI, "POST", sPersonFilter)
21
22  Dim jss As New Web.Script.Serialization.JavaScriptSerializer
23  Dim oPersons As PersonGetResult = jss.Deserialize(Of PersonGetResult)(sResult)
24  Return oPersons
25Catch ex As WebException
26  MessageBox.Show(New IO.StreamReader(ex.Response.GetResponseStream).ReadToEnd)
27Catch ex As Exception
28  MessageBox.Show(ex.Message)
29End Try
See Also

Reference

Other Resources