The example shown below assumes the use of the .NET C# Starter Kit for HMS API described below.
The .NET C# Starter Kit for HMS API provides a convenient tool to allow .net C# applications to use the HMS API. The kit and instructions for use are located in this GitHub repository: Starter Kit for HMS API in C Sharp
To use the Starter Kit, you will need to have Security Credentials provided by HMS and incorporated into the code in order to use the HMS web services.
The application calling the API should explicitly set the communication for SSL to use the following:
ServicePointManager.SecurityProtocol |= SecurityProtocolType.Tls
| SecurityProtocolType.Tls11
| SecurityProtocolType.Tls12
| SecurityProtocolType.Ssl3
Note: The .NET C# Starter Kit for HMS API was built in .NET v4.5.
This code snippet assumes the use of the .NET C# Starter Kit for HMS API and would be used to query all records.
SearchResponse matches = Search.findAll(TestConstants.GetSearchParameters(), TestConstants.DEFAULT_SECRET);
matches.Practitioners.ForEach(p => p.DebugPrint());