├── nuget.exe ├── PowerScribe360API ├── dictation.ico ├── App.config ├── Properties │ ├── Settings.settings │ ├── Settings.Designer.cs │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ └── Resources.resx ├── XmlObjects │ ├── OrderData.cs │ ├── XmlDeserialize.cs │ └── Report.cs ├── PowerscribeHttpClient.cs ├── PowerScribe360Api.csproj └── Powerscribe.cs ├── PowerScribe360SampleApp ├── App.config ├── packages.config ├── Properties │ ├── Settings.settings │ ├── Settings.Designer.cs │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ └── Resources.resx ├── PowerScribe360Api │ ├── XmlObjects │ │ ├── OrderData.cs │ │ ├── XmlDeserialize.cs │ │ └── Report.cs │ ├── PowerscribeHttpClient.cs │ └── Powerscribe.cs ├── Program.cs ├── PowerScribe360SampleApp.csproj ├── Form1.cs ├── Form1.resx └── Form1.Designer.cs ├── PowerScribe360ApiTests ├── packages.config ├── Properties │ └── AssemblyInfo.cs ├── PowerscribeTests.cs └── PowerScribe360ApiTests.csproj ├── Package.nuspec ├── PowerScribe360API.sln ├── README.md ├── .gitattributes └── .gitignore /nuget.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amin2997/PowerScribe360API/HEAD/nuget.exe -------------------------------------------------------------------------------- /PowerScribe360API/dictation.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amin2997/PowerScribe360API/HEAD/PowerScribe360API/dictation.ico -------------------------------------------------------------------------------- /PowerScribe360API/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /PowerScribe360SampleApp/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /PowerScribe360SampleApp/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /PowerScribe360ApiTests/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /PowerScribe360API/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /PowerScribe360SampleApp/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /PowerScribe360API/XmlObjects/OrderData.cs: -------------------------------------------------------------------------------- 1 | namespace PowerScribe360Api.XmlObjects 2 | { 3 | public class OrderData 4 | { 5 | public string OrderID { get; set; } 6 | public string ReportID { get; set; } 7 | public string Accession { get; set; } 8 | public string Site { get; set; } 9 | public string OrderDate { get; set; } 10 | public string Procedures { get; set; } 11 | public string Status { get; set; } 12 | public string Patient { get; set; } 13 | public string Signer { get; set; } 14 | } 15 | } -------------------------------------------------------------------------------- /PowerScribe360SampleApp/PowerScribe360Api/XmlObjects/OrderData.cs: -------------------------------------------------------------------------------- 1 | namespace PowerScribe360Api.XmlObjects 2 | { 3 | public class OrderData 4 | { 5 | public string OrderID { get; set; } 6 | public string ReportID { get; set; } 7 | public string Accession { get; set; } 8 | public string Site { get; set; } 9 | public string OrderDate { get; set; } 10 | public string Procedures { get; set; } 11 | public string Status { get; set; } 12 | public string Patient { get; set; } 13 | public string Signer { get; set; } 14 | } 15 | } -------------------------------------------------------------------------------- /PowerScribe360SampleApp/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using System.Windows.Forms; 6 | 7 | namespace PowerScribe360SampleApp 8 | { 9 | static class Program 10 | { 11 | /// 12 | /// The main entry point for the application. 13 | /// 14 | [STAThread] 15 | static void Main() 16 | { 17 | Application.EnableVisualStyles(); 18 | Application.SetCompatibleTextRenderingDefault(false); 19 | Application.Run(new Form1()); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /PowerScribe360API/XmlObjects/XmlDeserialize.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | using System.Xml.Serialization; 3 | 4 | namespace PowerScribe360Api.XmlObjects 5 | { 6 | public static class XmlDeserialize 7 | { 8 | public static T Deserialize(string xmlContent, string xmlRootAttribute="") 9 | { 10 | XmlSerializer serializer = null; 11 | 12 | if(string.IsNullOrWhiteSpace(xmlRootAttribute)) 13 | serializer = new XmlSerializer(typeof(T)); 14 | else 15 | serializer = new XmlSerializer(typeof(T), new XmlRootAttribute(xmlRootAttribute)); 16 | 17 | 18 | using (TextReader reader = new StringReader(xmlContent)) 19 | { 20 | return (T)serializer.Deserialize(reader); 21 | } 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /PowerScribe360SampleApp/PowerScribe360Api/XmlObjects/XmlDeserialize.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | using System.Xml.Serialization; 3 | 4 | namespace PowerScribe360Api.XmlObjects 5 | { 6 | public static class XmlDeserialize 7 | { 8 | public static T Deserialize(string xmlContent, string xmlRootAttribute="") 9 | { 10 | XmlSerializer serializer = null; 11 | 12 | if(string.IsNullOrWhiteSpace(xmlRootAttribute)) 13 | serializer = new XmlSerializer(typeof(T)); 14 | else 15 | serializer = new XmlSerializer(typeof(T), new XmlRootAttribute(xmlRootAttribute)); 16 | 17 | 18 | using (TextReader reader = new StringReader(xmlContent)) 19 | { 20 | return (T)serializer.Deserialize(reader); 21 | } 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /PowerScribe360API/PowerscribeHttpClient.cs: -------------------------------------------------------------------------------- 1 | using System.Net.Http; 2 | 3 | namespace PowerScribe360Api 4 | { 5 | public class PowerscribeHttpClient : HttpClient 6 | { 7 | private string _url; 8 | public PowerscribeHttpClient(string url) 9 | { 10 | _url = url; 11 | } 12 | public bool TryPost(string uri, string param, out string result) 13 | { 14 | var response = Post(uri, param); 15 | result = response.Content.ReadAsStringAsync().Result; 16 | System.Diagnostics.Debug.WriteLine(result); 17 | return response.IsSuccessStatusCode; 18 | } 19 | public HttpResponseMessage Post(string uri, string param="") 20 | { 21 | 22 | StringContent content = string.IsNullOrWhiteSpace(param) ? new StringContent("") : new StringContent(param, System.Text.Encoding.UTF8, "application/x-www-form-urlencoded"); 23 | string fullUrl = _url + uri; 24 | return PostAsync(fullUrl, content).Result; 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /PowerScribe360SampleApp/PowerScribe360Api/PowerscribeHttpClient.cs: -------------------------------------------------------------------------------- 1 | using System.Net.Http; 2 | 3 | namespace PowerScribe360Api 4 | { 5 | public class PowerscribeHttpClient : HttpClient 6 | { 7 | private string _url; 8 | public PowerscribeHttpClient(string url) 9 | { 10 | _url = url; 11 | } 12 | public bool TryPost(string uri, string param, out string result) 13 | { 14 | var response = Post(uri, param); 15 | result = response.Content.ReadAsStringAsync().Result; 16 | System.Diagnostics.Debug.WriteLine(result); 17 | return response.IsSuccessStatusCode; 18 | } 19 | public HttpResponseMessage Post(string uri, string param="") 20 | { 21 | 22 | StringContent content = string.IsNullOrWhiteSpace(param) ? new StringContent("") : new StringContent(param, System.Text.Encoding.UTF8, "application/x-www-form-urlencoded"); 23 | string fullUrl = _url + uri; 24 | return PostAsync(fullUrl, content).Result; 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /PowerScribe360API/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace PowerScribe360Api.Properties 12 | { 13 | 14 | 15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] 17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase 18 | { 19 | 20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 21 | 22 | public static Settings Default 23 | { 24 | get 25 | { 26 | return defaultInstance; 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /PowerScribe360SampleApp/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace PowerScribe360SampleApp.Properties 12 | { 13 | 14 | 15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] 17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase 18 | { 19 | 20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 21 | 22 | public static Settings Default 23 | { 24 | get 25 | { 26 | return defaultInstance; 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /PowerScribe360API/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("PowerScribe360Api")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("PowerScribe360Api")] 13 | [assembly: AssemblyCopyright("Copyright © 2019")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("998d963c-768c-4f41-93fa-5a5732ab46c4")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /PowerScribe360ApiTests/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("PowerScribe360ApiTests")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("PowerScribe360ApiTests")] 13 | [assembly: AssemblyCopyright("Copyright © 2019")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("b6aed931-5e52-446c-93bf-0a560f8c4a2f")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /PowerScribe360SampleApp/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("PowerScribe360SampleApp")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("PowerScribe360SampleApp")] 13 | [assembly: AssemblyCopyright("Copyright © 2019")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("f674827b-95eb-4f6c-9302-32c9f19087cf")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Package.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | PowerScribe360Api 5 | 1.0.0 6 | Amin2997 7 | Amin2997 8 | MIT 9 | false 10 | https://github.com/amin2997/PowerScribe360Api 11 | https://raw.githubusercontent.com/amin2997/PowerScribe360API/master/PowerScribe360API/dictation.ico 12 | This is a REST API implementation for Radiology Nuance PowerScribe 360 dictation system. This API will allow you to send and retrieve data points into prebuilt custom fields that populates radiologist final report. For example, you can push radiation dose information into custom field that will populate the radiologist final report. 13 | none 14 | Copyright 2019 15 | Radiology Nuance PowerScribe 360 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /PowerScribe360API.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.29020.237 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PowerScribe360Api", "PowerScribe360API\PowerScribe360Api.csproj", "{998D963C-768C-4F41-93FA-5A5732AB46C4}" 7 | EndProject 8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PowerScribe360ApiTests", "PowerScribe360ApiTests\PowerScribe360ApiTests.csproj", "{B6AED931-5E52-446C-93BF-0A560F8C4A2F}" 9 | EndProject 10 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PowerScribe360SampleApp", "PowerScribe360SampleApp\PowerScribe360SampleApp.csproj", "{F674827B-95EB-4F6C-9302-32C9F19087CF}" 11 | EndProject 12 | Global 13 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 14 | Debug|Any CPU = Debug|Any CPU 15 | Release|Any CPU = Release|Any CPU 16 | EndGlobalSection 17 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 18 | {998D963C-768C-4F41-93FA-5A5732AB46C4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 19 | {998D963C-768C-4F41-93FA-5A5732AB46C4}.Debug|Any CPU.Build.0 = Debug|Any CPU 20 | {998D963C-768C-4F41-93FA-5A5732AB46C4}.Release|Any CPU.ActiveCfg = Release|Any CPU 21 | {998D963C-768C-4F41-93FA-5A5732AB46C4}.Release|Any CPU.Build.0 = Release|Any CPU 22 | {B6AED931-5E52-446C-93BF-0A560F8C4A2F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 23 | {B6AED931-5E52-446C-93BF-0A560F8C4A2F}.Debug|Any CPU.Build.0 = Debug|Any CPU 24 | {B6AED931-5E52-446C-93BF-0A560F8C4A2F}.Release|Any CPU.ActiveCfg = Release|Any CPU 25 | {B6AED931-5E52-446C-93BF-0A560F8C4A2F}.Release|Any CPU.Build.0 = Release|Any CPU 26 | {F674827B-95EB-4F6C-9302-32C9F19087CF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 27 | {F674827B-95EB-4F6C-9302-32C9F19087CF}.Debug|Any CPU.Build.0 = Debug|Any CPU 28 | {F674827B-95EB-4F6C-9302-32C9F19087CF}.Release|Any CPU.ActiveCfg = Release|Any CPU 29 | {F674827B-95EB-4F6C-9302-32C9F19087CF}.Release|Any CPU.Build.0 = Release|Any CPU 30 | EndGlobalSection 31 | GlobalSection(SolutionProperties) = preSolution 32 | HideSolutionNode = FALSE 33 | EndGlobalSection 34 | GlobalSection(ExtensibilityGlobals) = postSolution 35 | SolutionGuid = {52B32835-95E6-4736-9999-86480DD32BCC} 36 | EndGlobalSection 37 | EndGlobal 38 | -------------------------------------------------------------------------------- /PowerScribe360API/XmlObjects/Report.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Diagnostics; 4 | using System.Text.RegularExpressions; 5 | 6 | namespace PowerScribe360Api.XmlObjects 7 | { 8 | public class Report 9 | { 10 | public string ReportID { get; set; } 11 | public List Accessions { get; set; } 12 | public string ReportStatus { get; set; } 13 | public string TransferStatus { get; set; } 14 | public string CreateDate { get; set; } 15 | public string LastModifiedDate { get; set; } 16 | public string ContentText { get; set; } 17 | public string ContentRTF { get; set; } 18 | public string IsAddendum { get; set; } 19 | public string IsStat { get; set; } 20 | public Signer Signer { get; set; } 21 | public Person Person { get; set; } 22 | public override string ToString() => ContentText; 23 | 24 | 25 | private static string _extractPattern = "(mergename=\")\\w+(\")>(\\w+)(\\w+)"; 26 | private static Regex _regex = new Regex(_extractPattern, RegexOptions.Multiline | RegexOptions.IgnoreCase); 27 | public List> GetCustomFeilds() 28 | { 29 | List> result = new List>(); 30 | if (string.IsNullOrWhiteSpace(ContentRTF)) return result; 31 | 32 | try 33 | { 34 | var matches = _regex.Matches(ContentRTF); 35 | foreach (Match match in matches) 36 | { 37 | if (match.Success == false) continue; 38 | Debug.WriteLine($"Value:{match.Value}, Group:{match.Groups}"); 39 | if (match.Groups.Count == 5) 40 | { 41 | string feildName = match.Groups[3].Value; 42 | string feildValue = match.Groups[4].Value; 43 | 44 | Tuple feild = new Tuple(feildName, feildValue); 45 | result.Add(feild); 46 | } 47 | } 48 | } 49 | catch (Exception ex) 50 | { 51 | Debug.WriteLine(ex.Message); 52 | } 53 | 54 | 55 | return result; 56 | } 57 | } 58 | public class Signer 59 | { 60 | public string AccountID { get; set; } 61 | public string Site { get; set; } 62 | public string Identifier { get; set; } 63 | } 64 | public class Person 65 | { 66 | public string FirstName { get; set; } 67 | public string LastName { get; set; } 68 | public string Country { get; set; } 69 | public override string ToString() => $"{FirstName} {LastName}"; 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # PowerScribe360API 2 | 3 | This is a REST API implementation for Radiology Nuance PowerScribe 360 dictation system. This API will allow you to send and retrieve data points into pre-built custom fields that populates radiologist final report. For example, you can push radiation dose information into custom field that will populate the radiologist final report. 4 | 5 | ## Installation Options 6 | 7 | 1. Import nuget to your project 8 | 9 | [https://www.nuget.org/packages/PowerScribe360Api/](https://www.nuget.org/packages/PowerScribe360Api/) 10 | ``` 11 | Install-Package PowerScribe360Api -Version 1.0.0 12 | ``` 13 | 14 | 2. Clone GitHub code 15 | ``` 16 | cd folder/to/clone-into/ 17 | git clone https://github.com/amin2997/PowerScribe360API.git 18 | ``` 19 | 3. Download GitHub Zip 20 | https://codeload.github.com/amin2997/PowerScribe360API/zip/master 21 | 22 | 23 | 24 | ## Sample Implementation 25 | 26 | The following will allow you to connect to PowerScribe 360 server and send custom field to the radiologist report. 27 | ``` csharp 28 | static void Main() 29 | { 30 | using(PowerScribe360Api.Powerscribe ps360 = new PowerScribe360Api.Powerscribe("http://ps360/RadPortal")) 31 | { 32 | if(ps360.SignIn("username", "***password***")) 33 | { 34 | Console.WriteLine("Connectd to PS360 server"); 35 | 36 | string accessionNumber = "123546"; 37 | string customFieldName = "CT_RAD_DOSE"; 38 | string customFieldValue = "501"; 39 | 40 | if(ps360.SetCustomField(accessionNumber, customFieldName, customFieldValue)) 41 | { 42 | Console.WriteLine("Data was sent successfully to PS360"); 43 | } 44 | else 45 | { 46 | Console.WriteLine("Error sending data to PS360"); 47 | } 48 | 49 | ps360.SignOut(); 50 | } 51 | else 52 | { 53 | Console.WriteLine("Error Unable to connect to PS360 Server."); 54 | } 55 | } 56 | } 57 | 58 | ``` 59 | 60 | For further details please refer to the test file and sample application. 61 | 62 | API Test Code: 63 | [https://github.com/amin2997/PowerScribe360API/blob/master/PowerScribe360ApiTests/PowerscribeTests.cs](https://github.com/amin2997/PowerScribe360API/blob/master/PowerScribe360ApiTests/PowerscribeTests.cs) 64 | 65 | Sample App Code: 66 | [https://github.com/amin2997/PowerScribe360API/blob/master/PowerScribe360SampleApp/Form1.cs](https://github.com/amin2997/PowerScribe360API/blob/master/PowerScribe360SampleApp/Form1.cs) 67 | -------------------------------------------------------------------------------- /PowerScribe360SampleApp/PowerScribe360Api/XmlObjects/Report.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Diagnostics; 4 | using System.Text.RegularExpressions; 5 | 6 | namespace PowerScribe360Api.XmlObjects 7 | { 8 | public class Report 9 | { 10 | public string ReportID { get; set; } 11 | public List Accessions { get; set; } 12 | public string ReportStatus { get; set; } 13 | public string TransferStatus { get; set; } 14 | public string CreateDate { get; set; } 15 | public string LastModifiedDate { get; set; } 16 | public string ContentText { get; set; } 17 | public string ContentRTF { get; set; } 18 | public string IsAddendum { get; set; } 19 | public string IsStat { get; set; } 20 | public Signer Signer { get; set; } 21 | public Person Person { get; set; } 22 | public override string ToString() => ContentText; 23 | 24 | 25 | private static string _extractPattern = "(mergename=\")\\w+(\")>(\\w+)(\\w+)"; 26 | private static Regex _regex = new Regex(_extractPattern, RegexOptions.Multiline | RegexOptions.IgnoreCase); 27 | public List> GetCustomFeilds() 28 | { 29 | List> result = new List>(); 30 | if (string.IsNullOrWhiteSpace(ContentRTF)) return result; 31 | 32 | try 33 | { 34 | var matches = _regex.Matches(ContentRTF); 35 | foreach (Match match in matches) 36 | { 37 | if (match.Success == false) continue; 38 | Debug.WriteLine($"Value:{match.Value}, Group:{match.Groups}"); 39 | if (match.Groups.Count == 5) 40 | { 41 | string feildName = match.Groups[3].Value; 42 | string feildValue = match.Groups[4].Value; 43 | 44 | Tuple feild = new Tuple(feildName, feildValue); 45 | result.Add(feild); 46 | } 47 | } 48 | } 49 | catch (Exception ex) 50 | { 51 | Debug.WriteLine(ex.Message); 52 | } 53 | 54 | 55 | return result; 56 | } 57 | } 58 | public class Signer 59 | { 60 | public string AccountID { get; set; } 61 | public string Site { get; set; } 62 | public string Identifier { get; set; } 63 | } 64 | public class Person 65 | { 66 | public string FirstName { get; set; } 67 | public string LastName { get; set; } 68 | public string Country { get; set; } 69 | public override string ToString() => $"{FirstName} {LastName}"; 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # Set default behavior for command prompt diff. 8 | # 9 | # This is need for earlier builds of msysgit that does not have it on by 10 | # default for csharp files. 11 | # Note: This is only used by command line 12 | ############################################################################### 13 | #*.cs diff=csharp 14 | 15 | ############################################################################### 16 | # Set the merge driver for project and solution files 17 | # 18 | # Merging from the command prompt will add diff markers to the files if there 19 | # are conflicts (Merging from VS is not affected by the settings below, in VS 20 | # the diff markers are never inserted). Diff markers may cause the following 21 | # file extensions to fail to load in VS. An alternative would be to treat 22 | # these files as binary and thus will always conflict and require user 23 | # intervention with every merge. To do so, just uncomment the entries below 24 | ############################################################################### 25 | #*.sln merge=binary 26 | #*.csproj merge=binary 27 | #*.vbproj merge=binary 28 | #*.vcxproj merge=binary 29 | #*.vcproj merge=binary 30 | #*.dbproj merge=binary 31 | #*.fsproj merge=binary 32 | #*.lsproj merge=binary 33 | #*.wixproj merge=binary 34 | #*.modelproj merge=binary 35 | #*.sqlproj merge=binary 36 | #*.wwaproj merge=binary 37 | 38 | ############################################################################### 39 | # behavior for image files 40 | # 41 | # image files are treated as binary by default. 42 | ############################################################################### 43 | #*.jpg binary 44 | #*.png binary 45 | #*.gif binary 46 | 47 | ############################################################################### 48 | # diff behavior for common document formats 49 | # 50 | # Convert binary document formats to text before diffing them. This feature 51 | # is only available from the command line. Turn it on by uncommenting the 52 | # entries below. 53 | ############################################################################### 54 | #*.doc diff=astextplain 55 | #*.DOC diff=astextplain 56 | #*.docx diff=astextplain 57 | #*.DOCX diff=astextplain 58 | #*.dot diff=astextplain 59 | #*.DOT diff=astextplain 60 | #*.pdf diff=astextplain 61 | #*.PDF diff=astextplain 62 | #*.rtf diff=astextplain 63 | #*.RTF diff=astextplain 64 | -------------------------------------------------------------------------------- /PowerScribe360API/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace PowerScribe360Api.Properties 12 | { 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources 26 | { 27 | 28 | private static global::System.Resources.ResourceManager resourceMan; 29 | 30 | private static global::System.Globalization.CultureInfo resourceCulture; 31 | 32 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 33 | internal Resources() 34 | { 35 | } 36 | 37 | /// 38 | /// Returns the cached ResourceManager instance used by this class. 39 | /// 40 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 41 | internal static global::System.Resources.ResourceManager ResourceManager 42 | { 43 | get 44 | { 45 | if ((resourceMan == null)) 46 | { 47 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("PowerScribe360Api.Properties.Resources", typeof(Resources).Assembly); 48 | resourceMan = temp; 49 | } 50 | return resourceMan; 51 | } 52 | } 53 | 54 | /// 55 | /// Overrides the current thread's CurrentUICulture property for all 56 | /// resource lookups using this strongly typed resource class. 57 | /// 58 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 59 | internal static global::System.Globalization.CultureInfo Culture 60 | { 61 | get 62 | { 63 | return resourceCulture; 64 | } 65 | set 66 | { 67 | resourceCulture = value; 68 | } 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /PowerScribe360SampleApp/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace PowerScribe360SampleApp.Properties 12 | { 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources 26 | { 27 | 28 | private static global::System.Resources.ResourceManager resourceMan; 29 | 30 | private static global::System.Globalization.CultureInfo resourceCulture; 31 | 32 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 33 | internal Resources() 34 | { 35 | } 36 | 37 | /// 38 | /// Returns the cached ResourceManager instance used by this class. 39 | /// 40 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 41 | internal static global::System.Resources.ResourceManager ResourceManager 42 | { 43 | get 44 | { 45 | if ((resourceMan == null)) 46 | { 47 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("PowerScribe360SampleApp.Properties.Resources", typeof(Resources).Assembly); 48 | resourceMan = temp; 49 | } 50 | return resourceMan; 51 | } 52 | } 53 | 54 | /// 55 | /// Overrides the current thread's CurrentUICulture property for all 56 | /// resource lookups using this strongly typed resource class. 57 | /// 58 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 59 | internal static global::System.Globalization.CultureInfo Culture 60 | { 61 | get 62 | { 63 | return resourceCulture; 64 | } 65 | set 66 | { 67 | resourceCulture = value; 68 | } 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /PowerScribe360API/PowerScribe360Api.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {998D963C-768C-4F41-93FA-5A5732AB46C4} 8 | Library 9 | PowerScribe360Api 10 | PowerScribe360Api 11 | v4.5.1 12 | 512 13 | true 14 | true 15 | 16 | 17 | AnyCPU 18 | true 19 | full 20 | false 21 | bin\Debug\ 22 | DEBUG;TRACE 23 | prompt 24 | 4 25 | true 26 | 27 | 28 | AnyCPU 29 | pdbonly 30 | true 31 | bin\Release\ 32 | TRACE 33 | prompt 34 | 4 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | ResXFileCodeGenerator 56 | Resources.Designer.cs 57 | Designer 58 | 59 | 60 | True 61 | Resources.resx 62 | 63 | 64 | SettingsSingleFileGenerator 65 | Settings.Designer.cs 66 | 67 | 68 | True 69 | Settings.settings 70 | True 71 | 72 | 73 | 74 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /PowerScribe360ApiTests/PowerscribeTests.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using PowerScribe360Api; 3 | using PowerScribe360Api.XmlObjects; 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Threading.Tasks; 9 | 10 | namespace PowerScribe360Api.Tests 11 | { 12 | [TestClass()] 13 | public class PowerscribeTests 14 | { 15 | private static Powerscribe ps360; 16 | 17 | 18 | [ClassInitialize] 19 | public static void InitializeComponent(TestContext context) 20 | { 21 | ps360 = new Powerscribe("http://tps360/RadPortal"); 22 | ps360.SignIn("Valid_PowerScribe360_UserName", "Valid_PowerScribe360_Password"); 23 | 24 | } 25 | [ClassCleanup] 26 | public static void ClassCleanup() 27 | { 28 | ps360?.SignOut(); 29 | } 30 | 31 | [TestMethod()] 32 | [Priority(0)] 33 | public void SignIn_with_invalid_account() 34 | { 35 | Assert.IsFalse(ps360.SignIn("Valid_PowerScribe360_UserName", "Invalid_Password")); 36 | } 37 | 38 | [TestMethod()] 39 | [Priority(1)] 40 | public void SignIn_with_valid_account() 41 | { 42 | Assert.IsTrue(ps360.SignIn("Valid_PowerScribe360_UserName", "Valid_PowerScribe360_Password") && ps360.SetCustomField("32908176", "AI_Report", "")); 43 | } 44 | [DataTestMethod()] 45 | [DataRow("8656512")] 46 | [DataRow("8677891")] 47 | [DataRow("8502455")] 48 | [DataRow("8954810")] 49 | [DataRow("8974902")] 50 | [DataRow("8979657")] 51 | public void TryGetOrder_order_exists(string accession) 52 | { 53 | bool ok = ps360.TryGetOrder(accession, out OrderData order) && order.Accession == accession; 54 | Assert.IsTrue(ok); 55 | } 56 | [DataTestMethod()] 57 | [DataRow("8656512x")] 58 | [DataRow("8677891x")] 59 | [DataRow("8502455x")] 60 | [DataRow("8954810x")] 61 | [DataRow("8974902x")] 62 | [DataRow("8979657x")] 63 | public void TryGetOrder_order_does_not_exists(string accession) 64 | { 65 | Assert.IsFalse(ps360.TryGetOrder(accession, out OrderData order)); 66 | } 67 | 68 | [DataTestMethod()] 69 | [DataRow("33173265", "AI_Report", "Intriguing")] 70 | [DataRow("8677891", "AI_Report", "502")] 71 | [DataRow("8502455", "AI_Report", "503")] 72 | [DataRow("8954810", "AI_Report", "504")] 73 | [DataRow("8974902", "AI_Report", "505")] 74 | [DataRow("8979657", "AI_Report", "506")] 75 | public void SetCustomField_Valid_Accession(string accession, string fieldName, string fieldValue) 76 | { 77 | Assert.IsTrue(ps360.SetCustomField(accession, fieldName, fieldValue)); 78 | } 79 | public int RandomNumber(int min, int max) 80 | { 81 | Random random = new Random(); 82 | return random.Next(min, max); 83 | } 84 | [DataTestMethod()] 85 | [DataRow("8656512x", "CTRAD", "501")] 86 | [DataRow("8677891x", "CTRAD", "502")] 87 | [DataRow("8502455x", "CTRAD", "503")] 88 | [DataRow("8954810x", "CTRAD", "504")] 89 | [DataRow("8974902x", "CTRAD", "505")] 90 | [DataRow("8979657x", "CTRAD", "506")] 91 | public void SetCustomField_Invalid_Accession(string accession, string fieldName, string fieldValue) 92 | { 93 | Assert.IsFalse(ps360.SetCustomField(accession, fieldName, fieldValue)); 94 | } 95 | 96 | [DataTestMethod()] 97 | [DataRow("8656512", "CTRADx", "501")] 98 | [DataRow("8677891", "CTRADx", "502")] 99 | [DataRow("8502455", "CTRADx", "503")] 100 | [DataRow("8954810", "CTRADx", "504")] 101 | [DataRow("8974902", "CTRADx", "505")] 102 | [DataRow("8979657", "CTRADx", "506")] 103 | public void SetCustomField_Invalid_FieldName(string accession, string fieldName, string fieldValue) 104 | { 105 | Assert.IsFalse(ps360.SetCustomField(accession, fieldName, fieldValue)); 106 | } 107 | 108 | 109 | [DataTestMethod()] 110 | [DataRow("8656512")] 111 | public void TryGetReportTest(string accession) 112 | { 113 | Assert.IsTrue(ps360.TryGetReport(accession, out Report report)); 114 | } 115 | 116 | [DataTestMethod()] 117 | [DataRow("8656512")] 118 | public void TryGetReport_FeildsTest(string accession) 119 | { 120 | 121 | var ok = ps360.TryGetReport(accession, out Report report); 122 | 123 | Assert.IsNotNull(report.GetCustomFeilds()); 124 | } 125 | } 126 | } -------------------------------------------------------------------------------- /PowerScribe360SampleApp/PowerScribe360SampleApp.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {F674827B-95EB-4F6C-9302-32C9F19087CF} 8 | WinExe 9 | PowerScribe360SampleApp 10 | PowerScribe360SampleApp 11 | v4.5.1 12 | 512 13 | true 14 | true 15 | 16 | 17 | AnyCPU 18 | true 19 | full 20 | false 21 | bin\Debug\ 22 | DEBUG;TRACE 23 | prompt 24 | 4 25 | 26 | 27 | AnyCPU 28 | pdbonly 29 | true 30 | bin\Release\ 31 | TRACE 32 | prompt 33 | 4 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | Form 51 | 52 | 53 | Form1.cs 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | Form1.cs 64 | 65 | 66 | ResXFileCodeGenerator 67 | Resources.Designer.cs 68 | Designer 69 | 70 | 71 | True 72 | Resources.resx 73 | 74 | 75 | 76 | SettingsSingleFileGenerator 77 | Settings.Designer.cs 78 | 79 | 80 | True 81 | Settings.settings 82 | True 83 | 84 | 85 | 86 | 87 | 88 | 89 | -------------------------------------------------------------------------------- /PowerScribe360SampleApp/Form1.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Threading.Tasks; 9 | using System.Windows.Forms; 10 | 11 | namespace PowerScribe360SampleApp 12 | { 13 | public partial class Form1 : Form 14 | { 15 | PowerScribe360Api.Powerscribe _ps360; 16 | 17 | public Form1() 18 | { 19 | InitializeComponent(); 20 | 21 | //disable all data sending controls 22 | EnableDataSending(false); 23 | btnConnect.Text = "&Connect"; 24 | 25 | //When you close the sample application logout from PS360 server. 26 | FormClosing += delegate (object sender, FormClosingEventArgs e) { PS360Disconnect(); }; 27 | } 28 | 29 | private void BtnConnect_Click(object sender, EventArgs e) 30 | { 31 | try 32 | { 33 | btnConnect.Enabled = false; 34 | 35 | if (btnConnect.Text == "&Connect") 36 | { 37 | if (PS360Connect()) 38 | { 39 | EnableDataSending(); 40 | btnConnect.Text = "&Disconnect"; 41 | MessageBox.Show("You have successfuly connected to PS360 Server", "Connected", MessageBoxButtons.OK, MessageBoxIcon.Information); 42 | } 43 | } 44 | else //Disconnect 45 | { 46 | if (PS360Disconnect()) 47 | { 48 | EnableDataSending(false); 49 | btnConnect.Text = "&Connect"; 50 | } 51 | } 52 | } 53 | finally 54 | { 55 | btnConnect.Enabled = true; 56 | } 57 | } 58 | private bool PS360Connect() 59 | { 60 | bool validUserInput = string.IsNullOrWhiteSpace(txtPS360Url.Text) == false && 61 | string.IsNullOrWhiteSpace(txtPS360UserName.Text) == false && 62 | string.IsNullOrWhiteSpace(txtPS360Password.Text) == false && 63 | Uri.IsWellFormedUriString(txtPS360Url.Text.Trim(), UriKind.RelativeOrAbsolute); 64 | if (validUserInput) 65 | { 66 | // if user input is valid then login into PS360 Server 67 | _ps360 = new PowerScribe360Api.Powerscribe(txtPS360Url.Text.Trim()); 68 | if (_ps360.SignIn(txtPS360UserName.Text.Trim(), txtPS360Password.Text.Trim())) 69 | { 70 | return true; 71 | } 72 | } 73 | else 74 | { 75 | MessageBox.Show( "Please enter a valid URL, user name, and password.", "Invalid Input", MessageBoxButtons.OK, MessageBoxIcon.Error); 76 | } 77 | return false; 78 | } 79 | private bool PS360Disconnect() 80 | { 81 | if (_ps360 != null) 82 | { 83 | if (_ps360.IsSignIn) 84 | { 85 | return _ps360.SignOut(); 86 | } 87 | } 88 | return false; 89 | } 90 | private void BtnSend_Click(object sender, EventArgs e) 91 | { 92 | try 93 | { 94 | btnSend.Enabled = false; 95 | 96 | bool validUserInput = string.IsNullOrWhiteSpace(txtAccessionNumber.Text) == false && 97 | string.IsNullOrWhiteSpace(txtCustomFieldName.Text) == false && 98 | string.IsNullOrWhiteSpace(txtCustomFieldValue.Text) == false && 99 | IsNumeric(txtAccessionNumber.Text.Trim()); 100 | 101 | if (validUserInput) 102 | { 103 | if (_ps360.SetCustomField(txtAccessionNumber.Text.Trim(), txtCustomFieldName.Text.Trim(), txtCustomFieldValue.Text.Trim())) 104 | { 105 | MessageBox.Show($"The following data was sent successfully:\nAccession: {txtAccessionNumber.Text}\nCustom Field:{txtCustomFieldName.Text}\nField Value:{txtCustomFieldValue.Text}\n", "Data Sent", MessageBoxButtons.OK, MessageBoxIcon.Information); 106 | } 107 | else 108 | { 109 | MessageBox.Show($"There is a problem sending the following data point:\nAccession: {txtAccessionNumber.Text}\nCustom Field:{txtCustomFieldName.Text}\nField Value:{txtCustomFieldValue.Text}\n", "Problem sending", MessageBoxButtons.OK, MessageBoxIcon.Information); 110 | } 111 | } 112 | else 113 | { 114 | MessageBox.Show("Please enter a valid accession number, PowerScribe 360 custom field name and value.", "Invalid Input", MessageBoxButtons.OK, MessageBoxIcon.Error); 115 | } 116 | } 117 | finally 118 | { 119 | btnSend.Enabled = true; 120 | } 121 | 122 | } 123 | private static bool IsNumeric(string num) =>int.TryParse(num, out int result); 124 | private void EnableDataSending(bool enable = true) 125 | { 126 | foreach (Control cnt in groupBox2.Controls) 127 | { 128 | cnt.Enabled = enable; 129 | } 130 | } 131 | } 132 | } 133 | -------------------------------------------------------------------------------- /PowerScribe360API/Powerscribe.cs: -------------------------------------------------------------------------------- 1 | using PowerScribe360Api.XmlObjects; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Diagnostics; 5 | using System.Linq; 6 | 7 | namespace PowerScribe360Api 8 | { 9 | public class Powerscribe : IDisposable 10 | { 11 | private PowerscribeHttpClient _client; 12 | public bool IsSignIn { get; private set; } = false; 13 | 14 | public Powerscribe(string url) 15 | { 16 | url = url.TrimEnd('/') + '/'; 17 | _client = new PowerscribeHttpClient(url); 18 | } 19 | public bool SignIn(string serviceUser, string servicePassword) 20 | { 21 | if (string.IsNullOrWhiteSpace(serviceUser) || string.IsNullOrWhiteSpace(servicePassword)) return false; 22 | 23 | try 24 | { 25 | string uri = "services/auth.asmx/SignIn"; 26 | serviceUser = Uri.EscapeDataString(serviceUser); 27 | servicePassword = Uri.EscapeDataString(servicePassword); 28 | string param = $"systemID=0&accessCode=&username={serviceUser}&password={servicePassword}"; 29 | 30 | IsSignIn =_client.Post(uri, param).IsSuccessStatusCode; 31 | } 32 | catch (Exception ex) 33 | { 34 | Debug.WriteLine(ex.Message + "\n" + ex.StackTrace); 35 | } 36 | return IsSignIn; 37 | } 38 | 39 | //If this method is not called, the session will automatically expire after some period of inactivity (default 30 minutes). 40 | public bool SignOut () 41 | { 42 | bool signOut = false; 43 | try 44 | { 45 | if (IsSignIn) 46 | { 47 | string uri = "services/auth.asmx/SignOut"; 48 | signOut = _client.Post(uri, "").IsSuccessStatusCode; 49 | IsSignIn = !signOut; 50 | } 51 | } 52 | catch (Exception ex) 53 | { 54 | Debug.WriteLine(ex.Message + "\n" + ex.StackTrace); 55 | } 56 | return signOut; 57 | } 58 | 59 | public bool SetCustomField(string accession, string fieldName, string fieldValue) 60 | { 61 | if (string.IsNullOrWhiteSpace(accession) || string.IsNullOrWhiteSpace(fieldName)) 62 | { 63 | return false; 64 | } 65 | else if (fieldValue == null) 66 | { 67 | fieldValue = ""; 68 | } 69 | //remove unicode characters. 70 | fieldValue = System.Text.RegularExpressions.Regex.Replace(fieldValue, @"[^\u0000-\u007F]+", string.Empty); 71 | 72 | 73 | try 74 | { 75 | if (TryGetOrder(accession, out OrderData order)) 76 | { 77 | string uri = "services/customfield.asmx/SetOrderCustomFieldByName"; 78 | string param = $"orderID={order.OrderID}&name={fieldName}&value={fieldValue}"; 79 | return _client.TryPost(uri, param, out string result); 80 | } 81 | else 82 | { 83 | return false; // order does not exist. 84 | } 85 | } 86 | catch (Exception ex) 87 | { 88 | Debug.WriteLine(ex.Message + "\n" + ex.StackTrace); 89 | } 90 | return false; 91 | } 92 | public bool TryGetOrder(string accession, out OrderData orderData) 93 | { 94 | orderData = null; 95 | try 96 | { 97 | string uri = "services/explorer.asmx/SearchByAccession"; 98 | string param = $"site=&accessions={accession}&sort="; 99 | 100 | if (_client.TryPost(uri, param, out string xmlContent)) 101 | { 102 | //TODO: figure out how to ignore xml namespaces. 103 | xmlContent = xmlContent.Replace("xmlns=\"http://nuance.com/commissure/webservices/explorer/2010/06\"", ""); 104 | orderData = XmlDeserialize>.Deserialize(xmlContent).FirstOrDefault(); 105 | return orderData != null; 106 | } 107 | else 108 | { 109 | return false; 110 | } 111 | } 112 | catch (Exception ex) 113 | { 114 | Debug.WriteLine(ex.Message + "\n" + ex.StackTrace); 115 | } 116 | return false; 117 | } 118 | public bool TryGetReport(string accession, out Report report) 119 | { 120 | report = null; 121 | if (string.IsNullOrWhiteSpace(accession)) 122 | { 123 | return false; 124 | } 125 | 126 | try 127 | { 128 | if (TryGetOrder(accession, out OrderData order)) 129 | { 130 | string uri = "services/report.asmx/GetReport"; 131 | string param = $"reportID={order.ReportID}"; 132 | if(_client.TryPost(uri, param, out string xmlReport)) 133 | { 134 | //TODO: figure out how to ignore xml namespaces. 135 | xmlReport = xmlReport.Replace("xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://nuance.com/commissure/webservices/report/2010/06\"", ""); 136 | report = XmlDeserialize.Deserialize(xmlReport); 137 | return report != null; 138 | } 139 | } 140 | else 141 | { 142 | return false; // order does not exist. 143 | } 144 | } 145 | catch (Exception ex) 146 | { 147 | Debug.WriteLine(ex.Message + "\n" + ex.StackTrace); 148 | } 149 | return false; 150 | } 151 | 152 | #region IDisposable Support 153 | private bool _disposed = false; // To detect redundant calls 154 | 155 | protected virtual void Dispose(bool disposing) 156 | { 157 | if (!_disposed) 158 | { 159 | if (disposing) 160 | { 161 | SignOut(); 162 | _client?.Dispose(); 163 | } 164 | _disposed = true; 165 | } 166 | } 167 | public void Dispose() 168 | { 169 | Dispose(true); 170 | GC.SuppressFinalize(this); 171 | } 172 | #endregion 173 | 174 | 175 | 176 | } 177 | } 178 | -------------------------------------------------------------------------------- /PowerScribe360SampleApp/PowerScribe360Api/Powerscribe.cs: -------------------------------------------------------------------------------- 1 | using PowerScribe360Api.XmlObjects; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Diagnostics; 5 | using System.Linq; 6 | 7 | namespace PowerScribe360Api 8 | { 9 | public class Powerscribe : IDisposable 10 | { 11 | private PowerscribeHttpClient _client; 12 | public bool IsSignIn { get; private set; } = false; 13 | 14 | public Powerscribe(string url) 15 | { 16 | url = url.TrimEnd('/') + '/'; 17 | _client = new PowerscribeHttpClient(url); 18 | } 19 | public bool SignIn(string serviceUser, string servicePassword) 20 | { 21 | if (string.IsNullOrWhiteSpace(serviceUser) || string.IsNullOrWhiteSpace(servicePassword)) return false; 22 | 23 | try 24 | { 25 | string uri = "services/auth.asmx/SignIn"; 26 | serviceUser = Uri.EscapeDataString(serviceUser); 27 | servicePassword = Uri.EscapeDataString(servicePassword); 28 | string param = $"systemID=0&accessCode=&username={serviceUser}&password={servicePassword}"; 29 | 30 | IsSignIn =_client.Post(uri, param).IsSuccessStatusCode; 31 | } 32 | catch (Exception ex) 33 | { 34 | Debug.WriteLine(ex.Message + "\n" + ex.StackTrace); 35 | } 36 | return IsSignIn; 37 | } 38 | 39 | //If this method is not called, the session will automatically expire after some period of inactivity (default 30 minutes). 40 | public bool SignOut () 41 | { 42 | bool signOut = false; 43 | try 44 | { 45 | if (IsSignIn) 46 | { 47 | string uri = "services/auth.asmx/SignOut"; 48 | signOut = _client.Post(uri, "").IsSuccessStatusCode; 49 | IsSignIn = !signOut; 50 | } 51 | } 52 | catch (Exception ex) 53 | { 54 | Debug.WriteLine(ex.Message + "\n" + ex.StackTrace); 55 | } 56 | return signOut; 57 | } 58 | 59 | public bool SetCustomField(string accession, string fieldName, string fieldValue) 60 | { 61 | if (string.IsNullOrWhiteSpace(accession) || string.IsNullOrWhiteSpace(fieldName)) 62 | { 63 | return false; 64 | } 65 | else if (fieldValue == null) 66 | { 67 | fieldValue = ""; 68 | } 69 | //remove unicode characters. 70 | fieldValue = System.Text.RegularExpressions.Regex.Replace(fieldValue, @"[^\u0000-\u007F]+", string.Empty); 71 | 72 | 73 | try 74 | { 75 | if (TryGetOrder(accession, out OrderData order)) 76 | { 77 | string uri = "services/customfield.asmx/SetOrderCustomFieldByName"; 78 | string param = $"orderID={order.OrderID}&name={fieldName}&value={fieldValue}"; 79 | return _client.TryPost(uri, param, out string result); 80 | } 81 | else 82 | { 83 | return false; // order does not exist. 84 | } 85 | } 86 | catch (Exception ex) 87 | { 88 | Debug.WriteLine(ex.Message + "\n" + ex.StackTrace); 89 | } 90 | return false; 91 | } 92 | public bool TryGetOrder(string accession, out OrderData orderData) 93 | { 94 | orderData = null; 95 | try 96 | { 97 | string uri = "services/explorer.asmx/SearchByAccession"; 98 | string param = $"site=&accessions={accession}&sort="; 99 | 100 | if (_client.TryPost(uri, param, out string xmlContent)) 101 | { 102 | //TODO: figure out how to ignore xml namespaces. 103 | xmlContent = xmlContent.Replace("xmlns=\"http://nuance.com/commissure/webservices/explorer/2010/06\"", ""); 104 | orderData = XmlDeserialize>.Deserialize(xmlContent).FirstOrDefault(); 105 | return orderData != null; 106 | } 107 | else 108 | { 109 | return false; 110 | } 111 | } 112 | catch (Exception ex) 113 | { 114 | Debug.WriteLine(ex.Message + "\n" + ex.StackTrace); 115 | } 116 | return false; 117 | } 118 | public bool TryGetReport(string accession, out Report report) 119 | { 120 | report = null; 121 | if (string.IsNullOrWhiteSpace(accession)) 122 | { 123 | return false; 124 | } 125 | 126 | try 127 | { 128 | if (TryGetOrder(accession, out OrderData order)) 129 | { 130 | string uri = "services/report.asmx/GetReport"; 131 | string param = $"reportID={order.ReportID}"; 132 | if(_client.TryPost(uri, param, out string xmlReport)) 133 | { 134 | //TODO: figure out how to ignore xml namespaces. 135 | xmlReport = xmlReport.Replace("xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://nuance.com/commissure/webservices/report/2010/06\"", ""); 136 | report = XmlDeserialize.Deserialize(xmlReport); 137 | return report != null; 138 | } 139 | } 140 | else 141 | { 142 | return false; // order does not exist. 143 | } 144 | } 145 | catch (Exception ex) 146 | { 147 | Debug.WriteLine(ex.Message + "\n" + ex.StackTrace); 148 | } 149 | return false; 150 | } 151 | 152 | #region IDisposable Support 153 | private bool _disposed = false; // To detect redundant calls 154 | 155 | protected virtual void Dispose(bool disposing) 156 | { 157 | if (!_disposed) 158 | { 159 | if (disposing) 160 | { 161 | SignOut(); 162 | _client?.Dispose(); 163 | } 164 | _disposed = true; 165 | } 166 | } 167 | public void Dispose() 168 | { 169 | Dispose(true); 170 | GC.SuppressFinalize(this); 171 | } 172 | #endregion 173 | 174 | 175 | 176 | } 177 | } 178 | -------------------------------------------------------------------------------- /PowerScribe360API/Properties/Resources.resx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | text/microsoft-resx 107 | 108 | 109 | 2.0 110 | 111 | 112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 113 | 114 | 115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | -------------------------------------------------------------------------------- /PowerScribe360SampleApp/Properties/Resources.resx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | text/microsoft-resx 107 | 108 | 109 | 2.0 110 | 111 | 112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 113 | 114 | 115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | -------------------------------------------------------------------------------- /PowerScribe360SampleApp/Form1.resx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | -------------------------------------------------------------------------------- /PowerScribe360ApiTests/PowerScribe360ApiTests.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {B6AED931-5E52-446C-93BF-0A560F8C4A2F} 8 | Library 9 | Properties 10 | PowerScribe360ApiTests 11 | PowerScribe360ApiTests 12 | v4.5.1 13 | 512 14 | {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 15 | 10.0 16 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 17 | $(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages 18 | False 19 | UnitTest 20 | 21 | 22 | 23 | 24 | 25 | true 26 | full 27 | false 28 | bin\Debug\ 29 | DEBUG;TRACE 30 | prompt 31 | 4 32 | 33 | 34 | pdbonly 35 | true 36 | bin\Release\ 37 | TRACE 38 | prompt 39 | 4 40 | 41 | 42 | 43 | ..\packages\MSTest.TestFramework.1.3.2\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.dll 44 | 45 | 46 | ..\packages\MSTest.TestFramework.1.3.2\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | {998D963C-768C-4F41-93FA-5A5732AB46C4} 68 | PowerScribe360Api 69 | 70 | 71 | 72 | 73 | 74 | 75 | False 76 | 77 | 78 | False 79 | 80 | 81 | False 82 | 83 | 84 | False 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. 94 | 95 | 96 | 97 | 98 | 99 | 106 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | ## 4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 5 | 6 | # User-specific files 7 | *.rsuser 8 | *.suo 9 | *.user 10 | *.userosscache 11 | *.sln.docstates 12 | 13 | # User-specific files (MonoDevelop/Xamarin Studio) 14 | *.userprefs 15 | 16 | # Build results 17 | [Dd]ebug/ 18 | [Dd]ebugPublic/ 19 | [Rr]elease/ 20 | [Rr]eleases/ 21 | x64/ 22 | x86/ 23 | [Aa][Rr][Mm]/ 24 | [Aa][Rr][Mm]64/ 25 | bld/ 26 | [Bb]in/ 27 | [Oo]bj/ 28 | [Ll]og/ 29 | 30 | # Visual Studio 2015/2017 cache/options directory 31 | .vs/ 32 | # Uncomment if you have tasks that create the project's static files in wwwroot 33 | #wwwroot/ 34 | 35 | # Visual Studio 2017 auto generated files 36 | Generated\ Files/ 37 | 38 | # MSTest test Results 39 | [Tt]est[Rr]esult*/ 40 | [Bb]uild[Ll]og.* 41 | 42 | # NUNIT 43 | *.VisualState.xml 44 | TestResult.xml 45 | 46 | # Build Results of an ATL Project 47 | [Dd]ebugPS/ 48 | [Rr]eleasePS/ 49 | dlldata.c 50 | 51 | # Benchmark Results 52 | BenchmarkDotNet.Artifacts/ 53 | 54 | # .NET Core 55 | project.lock.json 56 | project.fragment.lock.json 57 | artifacts/ 58 | 59 | # StyleCop 60 | StyleCopReport.xml 61 | 62 | # Files built by Visual Studio 63 | *_i.c 64 | *_p.c 65 | *_h.h 66 | *.ilk 67 | *.meta 68 | *.obj 69 | *.iobj 70 | *.pch 71 | *.pdb 72 | *.ipdb 73 | *.pgc 74 | *.pgd 75 | *.rsp 76 | *.sbr 77 | *.tlb 78 | *.tli 79 | *.tlh 80 | *.tmp 81 | *.tmp_proj 82 | *_wpftmp.csproj 83 | *.log 84 | *.vspscc 85 | *.vssscc 86 | .builds 87 | *.pidb 88 | *.svclog 89 | *.scc 90 | 91 | # Chutzpah Test files 92 | _Chutzpah* 93 | 94 | # Visual C++ cache files 95 | ipch/ 96 | *.aps 97 | *.ncb 98 | *.opendb 99 | *.opensdf 100 | *.sdf 101 | *.cachefile 102 | *.VC.db 103 | *.VC.VC.opendb 104 | 105 | # Visual Studio profiler 106 | *.psess 107 | *.vsp 108 | *.vspx 109 | *.sap 110 | 111 | # Visual Studio Trace Files 112 | *.e2e 113 | 114 | # TFS 2012 Local Workspace 115 | $tf/ 116 | 117 | # Guidance Automation Toolkit 118 | *.gpState 119 | 120 | # ReSharper is a .NET coding add-in 121 | _ReSharper*/ 122 | *.[Rr]e[Ss]harper 123 | *.DotSettings.user 124 | 125 | # JustCode is a .NET coding add-in 126 | .JustCode 127 | 128 | # TeamCity is a build add-in 129 | _TeamCity* 130 | 131 | # DotCover is a Code Coverage Tool 132 | *.dotCover 133 | 134 | # AxoCover is a Code Coverage Tool 135 | .axoCover/* 136 | !.axoCover/settings.json 137 | 138 | # Visual Studio code coverage results 139 | *.coverage 140 | *.coveragexml 141 | 142 | # NCrunch 143 | _NCrunch_* 144 | .*crunch*.local.xml 145 | nCrunchTemp_* 146 | 147 | # MightyMoose 148 | *.mm.* 149 | AutoTest.Net/ 150 | 151 | # Web workbench (sass) 152 | .sass-cache/ 153 | 154 | # Installshield output folder 155 | [Ee]xpress/ 156 | 157 | # DocProject is a documentation generator add-in 158 | DocProject/buildhelp/ 159 | DocProject/Help/*.HxT 160 | DocProject/Help/*.HxC 161 | DocProject/Help/*.hhc 162 | DocProject/Help/*.hhk 163 | DocProject/Help/*.hhp 164 | DocProject/Help/Html2 165 | DocProject/Help/html 166 | 167 | # Click-Once directory 168 | publish/ 169 | 170 | # Publish Web Output 171 | *.[Pp]ublish.xml 172 | *.azurePubxml 173 | # Note: Comment the next line if you want to checkin your web deploy settings, 174 | # but database connection strings (with potential passwords) will be unencrypted 175 | *.pubxml 176 | *.publishproj 177 | 178 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 179 | # checkin your Azure Web App publish settings, but sensitive information contained 180 | # in these scripts will be unencrypted 181 | PublishScripts/ 182 | 183 | # NuGet Packages 184 | *.nupkg 185 | # The packages folder can be ignored because of Package Restore 186 | **/[Pp]ackages/* 187 | # except build/, which is used as an MSBuild target. 188 | !**/[Pp]ackages/build/ 189 | # Uncomment if necessary however generally it will be regenerated when needed 190 | #!**/[Pp]ackages/repositories.config 191 | # NuGet v3's project.json files produces more ignorable files 192 | *.nuget.props 193 | *.nuget.targets 194 | 195 | # Microsoft Azure Build Output 196 | csx/ 197 | *.build.csdef 198 | 199 | # Microsoft Azure Emulator 200 | ecf/ 201 | rcf/ 202 | 203 | # Windows Store app package directories and files 204 | AppPackages/ 205 | BundleArtifacts/ 206 | Package.StoreAssociation.xml 207 | _pkginfo.txt 208 | *.appx 209 | 210 | # Visual Studio cache files 211 | # files ending in .cache can be ignored 212 | *.[Cc]ache 213 | # but keep track of directories ending in .cache 214 | !?*.[Cc]ache/ 215 | 216 | # Others 217 | ClientBin/ 218 | ~$* 219 | *~ 220 | *.dbmdl 221 | *.dbproj.schemaview 222 | *.jfm 223 | *.pfx 224 | *.publishsettings 225 | orleans.codegen.cs 226 | 227 | # Including strong name files can present a security risk 228 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 229 | #*.snk 230 | 231 | # Since there are multiple workflows, uncomment next line to ignore bower_components 232 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 233 | #bower_components/ 234 | 235 | # RIA/Silverlight projects 236 | Generated_Code/ 237 | 238 | # Backup & report files from converting an old project file 239 | # to a newer Visual Studio version. Backup files are not needed, 240 | # because we have git ;-) 241 | _UpgradeReport_Files/ 242 | Backup*/ 243 | UpgradeLog*.XML 244 | UpgradeLog*.htm 245 | ServiceFabricBackup/ 246 | *.rptproj.bak 247 | 248 | # SQL Server files 249 | *.mdf 250 | *.ldf 251 | *.ndf 252 | 253 | # Business Intelligence projects 254 | *.rdl.data 255 | *.bim.layout 256 | *.bim_*.settings 257 | *.rptproj.rsuser 258 | *- Backup*.rdl 259 | 260 | # Microsoft Fakes 261 | FakesAssemblies/ 262 | 263 | # GhostDoc plugin setting file 264 | *.GhostDoc.xml 265 | 266 | # Node.js Tools for Visual Studio 267 | .ntvs_analysis.dat 268 | node_modules/ 269 | 270 | # Visual Studio 6 build log 271 | *.plg 272 | 273 | # Visual Studio 6 workspace options file 274 | *.opt 275 | 276 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 277 | *.vbw 278 | 279 | # Visual Studio LightSwitch build output 280 | **/*.HTMLClient/GeneratedArtifacts 281 | **/*.DesktopClient/GeneratedArtifacts 282 | **/*.DesktopClient/ModelManifest.xml 283 | **/*.Server/GeneratedArtifacts 284 | **/*.Server/ModelManifest.xml 285 | _Pvt_Extensions 286 | 287 | # Paket dependency manager 288 | .paket/paket.exe 289 | paket-files/ 290 | 291 | # FAKE - F# Make 292 | .fake/ 293 | 294 | # JetBrains Rider 295 | .idea/ 296 | *.sln.iml 297 | 298 | # CodeRush personal settings 299 | .cr/personal 300 | 301 | # Python Tools for Visual Studio (PTVS) 302 | __pycache__/ 303 | *.pyc 304 | 305 | # Cake - Uncomment if you are using it 306 | # tools/** 307 | # !tools/packages.config 308 | 309 | # Tabs Studio 310 | *.tss 311 | 312 | # Telerik's JustMock configuration file 313 | *.jmconfig 314 | 315 | # BizTalk build output 316 | *.btp.cs 317 | *.btm.cs 318 | *.odx.cs 319 | *.xsd.cs 320 | 321 | # OpenCover UI analysis results 322 | OpenCover/ 323 | 324 | # Azure Stream Analytics local run output 325 | ASALocalRun/ 326 | 327 | # MSBuild Binary and Structured Log 328 | *.binlog 329 | 330 | # NVidia Nsight GPU debugger configuration file 331 | *.nvuser 332 | 333 | # MFractors (Xamarin productivity tool) working folder 334 | .mfractor/ 335 | 336 | # Local History for Visual Studio 337 | .localhistory/ 338 | 339 | # BeatPulse healthcheck temp database 340 | healthchecksdb -------------------------------------------------------------------------------- /PowerScribe360SampleApp/Form1.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace PowerScribe360SampleApp 2 | { 3 | partial class Form1 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | this.label1 = new System.Windows.Forms.Label(); 32 | this.label2 = new System.Windows.Forms.Label(); 33 | this.txtPS360Url = new System.Windows.Forms.TextBox(); 34 | this.txtPS360UserName = new System.Windows.Forms.TextBox(); 35 | this.txtPS360Password = new System.Windows.Forms.TextBox(); 36 | this.btnConnect = new System.Windows.Forms.Button(); 37 | this.groupBox1 = new System.Windows.Forms.GroupBox(); 38 | this.label3 = new System.Windows.Forms.Label(); 39 | this.groupBox2 = new System.Windows.Forms.GroupBox(); 40 | this.txtCustomFieldName = new System.Windows.Forms.TextBox(); 41 | this.btnSend = new System.Windows.Forms.Button(); 42 | this.txtCustomFieldValue = new System.Windows.Forms.TextBox(); 43 | this.label6 = new System.Windows.Forms.Label(); 44 | this.label5 = new System.Windows.Forms.Label(); 45 | this.label4 = new System.Windows.Forms.Label(); 46 | this.txtAccessionNumber = new System.Windows.Forms.TextBox(); 47 | this.groupBox1.SuspendLayout(); 48 | this.groupBox2.SuspendLayout(); 49 | this.SuspendLayout(); 50 | // 51 | // label1 52 | // 53 | this.label1.AutoSize = true; 54 | this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 55 | this.label1.Location = new System.Drawing.Point(16, 31); 56 | this.label1.Name = "label1"; 57 | this.label1.Size = new System.Drawing.Size(216, 20); 58 | this.label1.TabIndex = 0; 59 | this.label1.Text = "PowerScribe 360 Server URL"; 60 | // 61 | // label2 62 | // 63 | this.label2.AutoSize = true; 64 | this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 65 | this.label2.Location = new System.Drawing.Point(16, 60); 66 | this.label2.Name = "label2"; 67 | this.label2.Size = new System.Drawing.Size(167, 20); 68 | this.label2.TabIndex = 0; 69 | this.label2.Text = "PowerScribe 360 User"; 70 | // 71 | // txtPS360Url 72 | // 73 | this.txtPS360Url.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 74 | this.txtPS360Url.Location = new System.Drawing.Point(238, 25); 75 | this.txtPS360Url.Name = "txtPS360Url"; 76 | this.txtPS360Url.Size = new System.Drawing.Size(476, 26); 77 | this.txtPS360Url.TabIndex = 1; 78 | // 79 | // txtPS360UserName 80 | // 81 | this.txtPS360UserName.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 82 | this.txtPS360UserName.Location = new System.Drawing.Point(238, 57); 83 | this.txtPS360UserName.Name = "txtPS360UserName"; 84 | this.txtPS360UserName.Size = new System.Drawing.Size(256, 26); 85 | this.txtPS360UserName.TabIndex = 1; 86 | // 87 | // txtPS360Password 88 | // 89 | this.txtPS360Password.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 90 | this.txtPS360Password.Location = new System.Drawing.Point(238, 89); 91 | this.txtPS360Password.Name = "txtPS360Password"; 92 | this.txtPS360Password.Size = new System.Drawing.Size(256, 26); 93 | this.txtPS360Password.TabIndex = 1; 94 | // 95 | // btnConnect 96 | // 97 | this.btnConnect.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 98 | this.btnConnect.Location = new System.Drawing.Point(591, 57); 99 | this.btnConnect.Name = "btnConnect"; 100 | this.btnConnect.Size = new System.Drawing.Size(123, 58); 101 | this.btnConnect.TabIndex = 2; 102 | this.btnConnect.Text = "&Connect"; 103 | this.btnConnect.UseVisualStyleBackColor = true; 104 | this.btnConnect.Click += new System.EventHandler(this.BtnConnect_Click); 105 | // 106 | // groupBox1 107 | // 108 | this.groupBox1.Controls.Add(this.label1); 109 | this.groupBox1.Controls.Add(this.btnConnect); 110 | this.groupBox1.Controls.Add(this.label3); 111 | this.groupBox1.Controls.Add(this.label2); 112 | this.groupBox1.Controls.Add(this.txtPS360Password); 113 | this.groupBox1.Controls.Add(this.txtPS360Url); 114 | this.groupBox1.Controls.Add(this.txtPS360UserName); 115 | this.groupBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 116 | this.groupBox1.Location = new System.Drawing.Point(12, 12); 117 | this.groupBox1.Name = "groupBox1"; 118 | this.groupBox1.Size = new System.Drawing.Size(735, 149); 119 | this.groupBox1.TabIndex = 3; 120 | this.groupBox1.TabStop = false; 121 | this.groupBox1.Text = "1. Connect to Server"; 122 | // 123 | // label3 124 | // 125 | this.label3.AutoSize = true; 126 | this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 127 | this.label3.Location = new System.Drawing.Point(16, 89); 128 | this.label3.Name = "label3"; 129 | this.label3.Size = new System.Drawing.Size(202, 20); 130 | this.label3.TabIndex = 0; 131 | this.label3.Text = "PowerScribe 360 Password"; 132 | // 133 | // groupBox2 134 | // 135 | this.groupBox2.Controls.Add(this.txtCustomFieldName); 136 | this.groupBox2.Controls.Add(this.btnSend); 137 | this.groupBox2.Controls.Add(this.txtCustomFieldValue); 138 | this.groupBox2.Controls.Add(this.label6); 139 | this.groupBox2.Controls.Add(this.label5); 140 | this.groupBox2.Controls.Add(this.label4); 141 | this.groupBox2.Controls.Add(this.txtAccessionNumber); 142 | this.groupBox2.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 143 | this.groupBox2.Location = new System.Drawing.Point(12, 187); 144 | this.groupBox2.Name = "groupBox2"; 145 | this.groupBox2.Size = new System.Drawing.Size(735, 174); 146 | this.groupBox2.TabIndex = 3; 147 | this.groupBox2.TabStop = false; 148 | this.groupBox2.Text = "2. Send data points into prebuilt PS360 custom fields"; 149 | // 150 | // txtCustomFieldName 151 | // 152 | this.txtCustomFieldName.Enabled = false; 153 | this.txtCustomFieldName.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 154 | this.txtCustomFieldName.Location = new System.Drawing.Point(238, 72); 155 | this.txtCustomFieldName.Name = "txtCustomFieldName"; 156 | this.txtCustomFieldName.Size = new System.Drawing.Size(256, 26); 157 | this.txtCustomFieldName.TabIndex = 1; 158 | this.txtCustomFieldName.Text = "CTRAD"; 159 | // 160 | // btnSend 161 | // 162 | this.btnSend.Enabled = false; 163 | this.btnSend.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 164 | this.btnSend.Location = new System.Drawing.Point(591, 56); 165 | this.btnSend.Name = "btnSend"; 166 | this.btnSend.Size = new System.Drawing.Size(123, 58); 167 | this.btnSend.TabIndex = 2; 168 | this.btnSend.Text = "&Send Data"; 169 | this.btnSend.UseVisualStyleBackColor = true; 170 | this.btnSend.Click += new System.EventHandler(this.BtnSend_Click); 171 | // 172 | // txtCustomFieldValue 173 | // 174 | this.txtCustomFieldValue.Enabled = false; 175 | this.txtCustomFieldValue.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 176 | this.txtCustomFieldValue.Location = new System.Drawing.Point(238, 104); 177 | this.txtCustomFieldValue.Name = "txtCustomFieldValue"; 178 | this.txtCustomFieldValue.Size = new System.Drawing.Size(256, 26); 179 | this.txtCustomFieldValue.TabIndex = 1; 180 | this.txtCustomFieldValue.Text = "512"; 181 | // 182 | // label6 183 | // 184 | this.label6.AutoSize = true; 185 | this.label6.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 186 | this.label6.Location = new System.Drawing.Point(16, 40); 187 | this.label6.Name = "label6"; 188 | this.label6.Size = new System.Drawing.Size(222, 20); 189 | this.label6.TabIndex = 0; 190 | this.label6.Text = "Radiology Report Accession #"; 191 | // 192 | // label5 193 | // 194 | this.label5.AutoSize = true; 195 | this.label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 196 | this.label5.Location = new System.Drawing.Point(16, 104); 197 | this.label5.Name = "label5"; 198 | this.label5.Size = new System.Drawing.Size(141, 20); 199 | this.label5.TabIndex = 0; 200 | this.label5.Text = "Custom Field Data"; 201 | // 202 | // label4 203 | // 204 | this.label4.AutoSize = true; 205 | this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 206 | this.label4.Location = new System.Drawing.Point(16, 75); 207 | this.label4.Name = "label4"; 208 | this.label4.Size = new System.Drawing.Size(207, 20); 209 | this.label4.TabIndex = 0; 210 | this.label4.Text = "PreBuilt Custom Field Name"; 211 | // 212 | // txtAccessionNumber 213 | // 214 | this.txtAccessionNumber.Enabled = false; 215 | this.txtAccessionNumber.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 216 | this.txtAccessionNumber.Location = new System.Drawing.Point(238, 40); 217 | this.txtAccessionNumber.Name = "txtAccessionNumber"; 218 | this.txtAccessionNumber.Size = new System.Drawing.Size(256, 26); 219 | this.txtAccessionNumber.TabIndex = 1; 220 | // 221 | // Form1 222 | // 223 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 224 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 225 | this.ClientSize = new System.Drawing.Size(760, 373); 226 | this.Controls.Add(this.groupBox2); 227 | this.Controls.Add(this.groupBox1); 228 | this.Name = "Form1"; 229 | this.Text = "Sample Application"; 230 | this.groupBox1.ResumeLayout(false); 231 | this.groupBox1.PerformLayout(); 232 | this.groupBox2.ResumeLayout(false); 233 | this.groupBox2.PerformLayout(); 234 | this.ResumeLayout(false); 235 | 236 | } 237 | 238 | #endregion 239 | 240 | private System.Windows.Forms.Label label1; 241 | private System.Windows.Forms.Label label2; 242 | private System.Windows.Forms.TextBox txtPS360Url; 243 | private System.Windows.Forms.TextBox txtPS360UserName; 244 | private System.Windows.Forms.TextBox txtPS360Password; 245 | private System.Windows.Forms.Button btnConnect; 246 | private System.Windows.Forms.GroupBox groupBox1; 247 | private System.Windows.Forms.Label label3; 248 | private System.Windows.Forms.GroupBox groupBox2; 249 | private System.Windows.Forms.TextBox txtCustomFieldName; 250 | private System.Windows.Forms.Button btnSend; 251 | private System.Windows.Forms.TextBox txtCustomFieldValue; 252 | private System.Windows.Forms.Label label6; 253 | private System.Windows.Forms.Label label5; 254 | private System.Windows.Forms.Label label4; 255 | private System.Windows.Forms.TextBox txtAccessionNumber; 256 | } 257 | } 258 | 259 | --------------------------------------------------------------------------------