Contents
PersonAdd
This adds a new empty person record. It returns a GUID as an Id for the new record. After adding the record you must use PersonUpdate to set the demographic fields. http://example.interfaceware.com:6544/demographics?Method=PersonAdd username = admin and password = password
Note: This implementation has the potential to create many blank person records, if you run PersonAdd and forget to run PersonUpdate. You could modify PersonAdd to include demographic data, you could implement this by calling PersonUpdate from within PersonAdd.
PersonUpdate
This call requires an Id in the form of a GUID and allows one to set the data for an existing person record. To create a new person first get a new GUID using PersonAdd. Every parameter needs to present in the HTTP request, although they can be blank. Sex needs to use one of the following codes:
- M = Male
- F = Female
- U = Unknown
- O = Other
Here are some example calls: http://example.interfaceware.com:6544/demographics?Method=PersonUpdate&Id=7AA1FA52A9029411DD08DB9DFAFAFCF3&LastName=Smith&GivenName=Fred&Dob=19841112&Sex=M&MiddleInitial=T&Suffix=e&Prefix= http://example.interfaceware.com:6544/demographics?Method=PersonUpdate&Id=A3AAFA528E03EA6224B38196DC510879&LastName=Eliot&GivenName=Tim&Dob=19641112&Sex=M&MiddleInitial=S&Suffix=Mr&Prefix= The return from a successful call looks like this: { “Description”: “Person updated”, “Id”: “A3AAFA528E03EA6224B38196DC510879” }
PersonQuery
This method provides two mechanisms to search for a person record. We can search by Keyword: http://example.interfaceware.com:6544/demographics?Method=PersonQuery&Keyword=Eliot username = admin and password = password Or by Id: http://example.interfaceware.com:6544/demographics?Method=PersonQuery&Id=A3AAFA528E03EA6224B38196DC510879 username = admin and password = password
The Keyword may have spaces, if so we break it up and search for multiple words. The API does not provide the means to search for other fields like date of birth. The assumption is that since this is an interoperability API that the software using the API can search on those parameters. Good enough?
Tip: We did include a function FetchPersonByGivenName()
in the demographics module, which you could use to add a search on the GivenName field.
List
The List call simply returns a JSON formatted list of the supported methods.
http://example.interfaceware.com:6544/demographics?Method=List
username = admin and password = password
Pingback: Auto-Generating Code for Easy Reporting and Alerts