Initial Commit
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
namespace Pluto.Api {
|
||||
using System;
|
||||
using RemObjects.SDK;
|
||||
using RemObjects.SDK.Types;
|
||||
using RemObjects.SDK.Server;
|
||||
using RemObjects.SDK.Server.ClassFactories;
|
||||
using PlutoServer.PracticeChoice;
|
||||
|
||||
|
||||
[RemObjects.SDK.Server.ClassFactories.StandardClassFactory()]
|
||||
[RemObjects.SDK.Server.Service(Name = "Authentication", InvokerClass = typeof(Authentication_Invoker), ActivatorClass = typeof(Authentication_Activator))]
|
||||
public class Authentication : RemObjects.SDK.Server.Service, IAuthentication {
|
||||
|
||||
private System.ComponentModel.Container components = null;
|
||||
public Authentication() :
|
||||
base() {
|
||||
this.InitializeComponent();
|
||||
}
|
||||
|
||||
private void InitializeComponent() {
|
||||
|
||||
}
|
||||
|
||||
protected override void Dispose(bool aDisposing) {
|
||||
if(aDisposing) {
|
||||
if((this.components != null)) {
|
||||
this.components.Dispose();
|
||||
}
|
||||
}
|
||||
base.Dispose(aDisposing);
|
||||
}
|
||||
|
||||
public virtual UserInfo1 Login1(string apiKey, PracticeInfo1 practiceInfo, string userId, string password) {
|
||||
UserInfo1 userInfo = null;
|
||||
var auth = new PlutoServer.PracticeChoice.Security.Authentication();
|
||||
try {
|
||||
userInfo = auth.Login(userId, password, practiceInfo.Id);
|
||||
if(!string.IsNullOrEmpty(userInfo.AuthToken)) {
|
||||
System.Diagnostics.Debug.WriteLine(this.SessionID.ToString());
|
||||
this.Session[SessionKeys.AuthToken] = userInfo.AuthToken;
|
||||
}
|
||||
} catch(Exception ex) {
|
||||
this.DestroySession();
|
||||
throw;
|
||||
}
|
||||
return userInfo;
|
||||
}
|
||||
|
||||
#region IAuthentication Members
|
||||
|
||||
|
||||
public PracticeInfo1[] GetPracticeList1(string apiKey) {
|
||||
return null;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
10
TomcatServer/PlutoServer.PracticeChoice/Constants.cs
Normal file
10
TomcatServer/PlutoServer.PracticeChoice/Constants.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace PlutoServer.PracticeChoice {
|
||||
public static class SessionKeys {
|
||||
public static readonly string AuthToken = "AUTH_TOKEN";
|
||||
}
|
||||
}
|
||||
31
TomcatServer/PlutoServer.PracticeChoice/Installer.Designer.cs
generated
Normal file
31
TomcatServer/PlutoServer.PracticeChoice/Installer.Designer.cs
generated
Normal file
@@ -0,0 +1,31 @@
|
||||
namespace PlutoServer.PracticeChoice {
|
||||
partial class Installer {
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing) {
|
||||
if(disposing && (components != null)) {
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Component Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent() {
|
||||
components = new System.ComponentModel.Container();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
34
TomcatServer/PlutoServer.PracticeChoice/Installer.cs
Normal file
34
TomcatServer/PlutoServer.PracticeChoice/Installer.cs
Normal file
@@ -0,0 +1,34 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Configuration.Install;
|
||||
using System.Linq;
|
||||
using System.ServiceProcess;
|
||||
|
||||
namespace PlutoServer.PracticeChoice {
|
||||
[RunInstaller(true)]
|
||||
public partial class Installer : System.Configuration.Install.Installer {
|
||||
public Installer() {
|
||||
InitializeComponent();
|
||||
|
||||
ServiceProcessInstaller serviceProcessInstaller = new ServiceProcessInstaller();
|
||||
ServiceInstaller serviceInstaller = new ServiceInstaller();
|
||||
|
||||
//# Service Account Information
|
||||
serviceProcessInstaller.Account = ServiceAccount.LocalSystem;
|
||||
serviceProcessInstaller.Username = null;
|
||||
serviceProcessInstaller.Password = null;
|
||||
|
||||
//# Service Information
|
||||
serviceInstaller.ServiceName = "PlutoServer.PracticeChoice";
|
||||
serviceInstaller.DisplayName = "McKesson Pratice Choice Mobile Api Server";
|
||||
serviceInstaller.Description = "Manages data updates and retrieval for McKesson's PPS Mobile App from Practice Choice";
|
||||
serviceInstaller.StartType = ServiceStartMode.Automatic;
|
||||
|
||||
// # Done
|
||||
this.Installers.Add(serviceProcessInstaller);
|
||||
this.Installers.Add(serviceInstaller);
|
||||
}
|
||||
}
|
||||
}
|
||||
41
TomcatServer/PlutoServer.PracticeChoice/Medication_Impl.cs
Normal file
41
TomcatServer/PlutoServer.PracticeChoice/Medication_Impl.cs
Normal file
@@ -0,0 +1,41 @@
|
||||
namespace Pluto.Api {
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using RemObjects.SDK;
|
||||
using RemObjects.SDK.Types;
|
||||
using RemObjects.SDK.Server;
|
||||
using RemObjects.SDK.Server.ClassFactories;
|
||||
using PlutoServer.PracticeChoice;
|
||||
|
||||
[RemObjects.SDK.Server.ClassFactories.StandardClassFactory()]
|
||||
[RemObjects.SDK.Server.Service(Name = "Medication", InvokerClass = typeof(Medication_Invoker), ActivatorClass = typeof(Medication_Activator))]
|
||||
public class Medication : RemObjects.SDK.Server.Service, IMedication {
|
||||
private System.ComponentModel.Container components = null;
|
||||
public Medication() :
|
||||
base() {
|
||||
this.InitializeComponent();
|
||||
}
|
||||
private void InitializeComponent() {
|
||||
}
|
||||
protected override void Dispose(bool aDisposing) {
|
||||
if(aDisposing) {
|
||||
if((this.components != null)) {
|
||||
this.components.Dispose();
|
||||
}
|
||||
}
|
||||
base.Dispose(aDisposing);
|
||||
}
|
||||
public virtual MedicationInfo1[] Search(string apiKey, string searchString) {
|
||||
if(Utility.IsAPIKeyValid(apiKey)) {
|
||||
var authToken = (string)this.Session[SessionKeys.AuthToken];
|
||||
var medication = new PlutoServer.PracticeChoice.Core.Medication();
|
||||
var medsList = medication.Search(authToken, searchString);
|
||||
return medsList.ToArray();
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
120
TomcatServer/PlutoServer.PracticeChoice/Patient_Impl.cs
Normal file
120
TomcatServer/PlutoServer.PracticeChoice/Patient_Impl.cs
Normal file
@@ -0,0 +1,120 @@
|
||||
namespace Pluto.Api {
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using RemObjects.SDK;
|
||||
using RemObjects.SDK.Types;
|
||||
using RemObjects.SDK.Server;
|
||||
using RemObjects.SDK.Server.ClassFactories;
|
||||
using PlutoServer.PracticeChoice;
|
||||
|
||||
[RemObjects.SDK.Server.ClassFactories.StandardClassFactory()]
|
||||
[RemObjects.SDK.Server.Service(Name = "Patient", InvokerClass = typeof(Patient_Invoker), ActivatorClass = typeof(Patient_Activator))]
|
||||
public class Patient : RemObjects.SDK.Server.Service, IPatient {
|
||||
private System.ComponentModel.Container components = null;
|
||||
public Patient() :
|
||||
base() {
|
||||
this.InitializeComponent();
|
||||
}
|
||||
private void InitializeComponent() {
|
||||
}
|
||||
protected override void Dispose(bool aDisposing) {
|
||||
if(aDisposing) {
|
||||
if((this.components != null)) {
|
||||
this.components.Dispose();
|
||||
}
|
||||
}
|
||||
base.Dispose(aDisposing);
|
||||
}
|
||||
|
||||
#region IPatient Members
|
||||
|
||||
public virtual PrescribedMedicationInfo1[] GetMedications(string apiKey, int chartId) {
|
||||
if(Utility.IsAPIKeyValid(apiKey)){
|
||||
var authToken = (string)this.Session[SessionKeys.AuthToken];
|
||||
var patient = new PlutoServer.PracticeChoice.Core.Patient();
|
||||
var medsList = patient.GetMedications(authToken, chartId);
|
||||
return medsList.ToArray();
|
||||
}else{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public virtual AllergyInfo1[] GetAllergies(string apiKey, int chartId) {
|
||||
if(Utility.IsAPIKeyValid(apiKey)) {
|
||||
var authToken = (string)this.Session[SessionKeys.AuthToken];
|
||||
var patient = new PlutoServer.PracticeChoice.Core.Patient();
|
||||
var allergyList = patient.GetAllergies(authToken, chartId);
|
||||
return allergyList.ToArray();
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public ProblemInfo1[] GetProblems(string apiKey, int chartId) {
|
||||
if(Utility.IsAPIKeyValid(apiKey)) {
|
||||
var authToken = (string)this.Session[SessionKeys.AuthToken];
|
||||
var patient = new PlutoServer.PracticeChoice.Core.Patient();
|
||||
var problemList = patient.GetProblems(authToken, chartId);
|
||||
return problemList.ToArray();
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public ChartInfo1 GetChart(string apiKey, int patientId, int chartId) {
|
||||
if(Utility.IsAPIKeyValid(apiKey)) {
|
||||
var authToken = (string)this.Session[SessionKeys.AuthToken];
|
||||
var patient = new PlutoServer.PracticeChoice.Core.Patient();
|
||||
var chartInfo = patient.GetChart(authToken, patientId, chartId);
|
||||
return chartInfo;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public VitalSignInfo1[] GetVitalSigns(string apiKey, int patientId, int chartId) {
|
||||
if(Utility.IsAPIKeyValid(apiKey)) {
|
||||
var authToken = (string)this.Session[SessionKeys.AuthToken];
|
||||
var patient = new PlutoServer.PracticeChoice.Core.Patient();
|
||||
var vsList = patient.GetVitalSigns(authToken, chartId, patientId);
|
||||
return vsList.ToArray();
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public void AddNote(string apiKey, int patientId, int chartId, PatientNoteInfo1 patientNote) {
|
||||
if(Utility.IsAPIKeyValid(apiKey)) {
|
||||
var authToken = (string)this.Session[SessionKeys.AuthToken];
|
||||
var patient = new PlutoServer.PracticeChoice.Core.Patient();
|
||||
patient.AddPatientNote(authToken, patientId, chartId, patientNote);
|
||||
}
|
||||
}
|
||||
|
||||
public PatientNoteInfo1[] GetNotes(string apiKey, int patientId, int chartId) {
|
||||
if(Utility.IsAPIKeyValid(apiKey)) {
|
||||
var authToken = (string)this.Session[SessionKeys.AuthToken];
|
||||
var patient = new PlutoServer.PracticeChoice.Core.Patient();
|
||||
var notes = patient.GetNotes(authToken, patientId, chartId);
|
||||
return notes.ToArray();
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public ProcedureInfo1[] GetProcedures(string apiKey, int chartId) {
|
||||
if(Utility.IsAPIKeyValid(apiKey)) {
|
||||
var authToken = (string)this.Session[SessionKeys.AuthToken];
|
||||
var patient = new PlutoServer.PracticeChoice.Core.Patient();
|
||||
var procedures = patient.GetProcedures(authToken, chartId);
|
||||
return procedures.ToArray();
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,142 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
|
||||
<ProductVersion>8.0.30703</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{0BA7EDF2-454C-48A2-A569-579D6D3357FE}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>PlutoServer.PracticeChoice</RootNamespace>
|
||||
<AssemblyName>PlutoServer.PracticeChoice</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<TargetFrameworkProfile>
|
||||
</TargetFrameworkProfile>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>..\Target\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="RemObjects.InternetPack">
|
||||
<HintPath>..\..\3rdParty\RemObjects\Server\RemObjects.InternetPack.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="RemObjects.SDK">
|
||||
<HintPath>..\..\3rdParty\RemObjects\Server\RemObjects.SDK.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="RemObjects.SDK.Server">
|
||||
<HintPath>..\..\3rdParty\RemObjects\Server\RemObjects.SDK.Server.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="RemObjects.SDK.ZLib">
|
||||
<HintPath>..\..\3rdParty\RemObjects\Server\RemObjects.SDK.ZLib.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.configuration" />
|
||||
<Reference Include="System.Configuration.Install" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Management" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.ServiceProcess" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="..\PlutoServer\PlutoApi_Events.cs">
|
||||
<Link>PlutoApi_Events.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\PlutoServer\PlutoApi_Invk.cs">
|
||||
<Link>PlutoApi_Invk.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="Authentication_Impl.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Constants.cs" />
|
||||
<Compile Include="Installer.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Installer.Designer.cs">
|
||||
<DependentUpon>Installer.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Medication_Impl.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Patient_Impl.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="PlutoService.PraticeChoice.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="PlutoService.PraticeChoice.Designer.cs">
|
||||
<DependentUpon>PlutoService.PraticeChoice.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Practice_Impl.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Provider_Impl.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Schedule_Impl.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Terminology_Impl.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Utility.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="PlutoService.PraticeChoice.resx">
|
||||
<DependentUpon>PlutoService.PraticeChoice.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\licenses.licx" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\PlutoServer.PracticeChoice.Core\PlutoServer.PracticeChoice.Core.csproj">
|
||||
<Project>{1EB2E991-1DC5-4EC4-993A-77F1762E7703}</Project>
|
||||
<Name>PlutoServer.PracticeChoice.Core</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\PlutoServer.PracticeChoice.Interfaces\PlutoServer.PracticeChoice.Interfaces.csproj">
|
||||
<Project>{77B7DE2F-677F-49E7-A452-D60FC4D27944}</Project>
|
||||
<Name>PlutoServer.PracticeChoice.Interfaces</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\PlutoServer.PracticeChoice.Scheduling\PlutoServer.PracticeChoice.Scheduling.csproj">
|
||||
<Project>{24B30553-0E52-479C-93A0-FEA2CC512A58}</Project>
|
||||
<Name>PlutoServer.PracticeChoice.Scheduling</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\PlutoServer.PracticeChoice.Security\PlutoServer.PracticeChoice.Security.csproj">
|
||||
<Project>{B8DB8F11-ADFC-4BC4-89A1-EA0D47CFAE71}</Project>
|
||||
<Name>PlutoServer.PracticeChoice.Security</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
76
TomcatServer/PlutoServer.PracticeChoice/PlutoService.PraticeChoice.Designer.cs
generated
Normal file
76
TomcatServer/PlutoServer.PracticeChoice/PlutoService.PraticeChoice.Designer.cs
generated
Normal file
@@ -0,0 +1,76 @@
|
||||
namespace PlutoServer.PracticeChoice {
|
||||
partial class PlutoService {
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing) {
|
||||
if(disposing && (components != null)) {
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Component Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent() {
|
||||
this.components = new System.ComponentModel.Container();
|
||||
this.PracticeChoiceBinMessage = new RemObjects.SDK.BinMessage();
|
||||
this.PracticeChoiceTcpServerChannel = new RemObjects.SDK.Server.IpTcpServerChannel(this.components);
|
||||
this.PlutoOlympiaipSuperTcpClientChannel = new RemObjects.SDK.IpSuperTcpClientChannel(this.components);
|
||||
this.PlutoOlympiaServerSessionManager = new RemObjects.SDK.Server.OlympiaServerSessionManager(this.components);
|
||||
((System.ComponentModel.ISupportInitialize)(this.PracticeChoiceTcpServerChannel)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.PlutoOlympiaipSuperTcpClientChannel)).BeginInit();
|
||||
//
|
||||
// PracticeChoiceBinMessage
|
||||
//
|
||||
this.PracticeChoiceBinMessage.ContentType = "application/octet-stream";
|
||||
this.PracticeChoiceBinMessage.SerializerInstance = null;
|
||||
//
|
||||
// PracticeChoiceTcpServerChannel
|
||||
//
|
||||
this.PracticeChoiceTcpServerChannel.Dispatchers.Add(new RemObjects.SDK.Server.MessageDispatcher("bin", this.PracticeChoiceBinMessage));
|
||||
this.PracticeChoiceTcpServerChannel.Port = 1947;
|
||||
//
|
||||
//
|
||||
//
|
||||
this.PracticeChoiceTcpServerChannel.TcpServer.Port = 1947;
|
||||
//
|
||||
// PlutoOlympiaipSuperTcpClientChannel
|
||||
//
|
||||
this.PlutoOlympiaipSuperTcpClientChannel.ClientGuid = new System.Guid("20e5e874-3677-40e1-9bd1-da83a197cb29");
|
||||
this.PlutoOlympiaipSuperTcpClientChannel.EventThreadPool = null;
|
||||
this.PlutoOlympiaipSuperTcpClientChannel.Hostname = "127.0.0.1";
|
||||
this.PlutoOlympiaipSuperTcpClientChannel.Port = 8011;
|
||||
//
|
||||
// PlutoOlympiaServerSessionManager
|
||||
//
|
||||
this.PlutoOlympiaServerSessionManager.ApplicationId = new System.Guid("c49aa0c8-2bce-4a43-89b2-cf00644bedac");
|
||||
this.PlutoOlympiaServerSessionManager.Channel = this.PlutoOlympiaipSuperTcpClientChannel;
|
||||
this.PlutoOlympiaServerSessionManager.MaxPoolSize = 1;
|
||||
//
|
||||
// PlutoService
|
||||
//
|
||||
this.ServiceName = "Service1";
|
||||
((System.ComponentModel.ISupportInitialize)(this.PracticeChoiceTcpServerChannel)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.PlutoOlympiaipSuperTcpClientChannel)).EndInit();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private RemObjects.SDK.BinMessage PracticeChoiceBinMessage;
|
||||
private RemObjects.SDK.Server.IpTcpServerChannel PracticeChoiceTcpServerChannel;
|
||||
private RemObjects.SDK.IpSuperTcpClientChannel PlutoOlympiaipSuperTcpClientChannel;
|
||||
private RemObjects.SDK.Server.OlympiaServerSessionManager PlutoOlympiaServerSessionManager;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.ServiceProcess;
|
||||
using System.Text;
|
||||
|
||||
namespace PlutoServer.PracticeChoice {
|
||||
public partial class PlutoService : ServiceBase {
|
||||
public PlutoService() {
|
||||
InitializeComponent();
|
||||
|
||||
// Log to the Application System Log
|
||||
this.EventLog.Log = "Application";
|
||||
}
|
||||
|
||||
protected override void OnStart(string[] args) {
|
||||
PracticeChoiceTcpServerChannel.Activate();
|
||||
}
|
||||
|
||||
protected override void OnStop() {
|
||||
PracticeChoiceTcpServerChannel.Deactivate();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,135 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="PracticeChoiceBinMessage.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 56</value>
|
||||
</metadata>
|
||||
<metadata name="PracticeChoiceTcpServerChannel.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 95</value>
|
||||
</metadata>
|
||||
<metadata name="PlutoOlympiaipSuperTcpClientChannel.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 134</value>
|
||||
</metadata>
|
||||
<metadata name="PlutoOlympiaServerSessionManager.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>284, 55</value>
|
||||
</metadata>
|
||||
<metadata name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
</root>
|
||||
87
TomcatServer/PlutoServer.PracticeChoice/Practice_Impl.cs
Normal file
87
TomcatServer/PlutoServer.PracticeChoice/Practice_Impl.cs
Normal file
@@ -0,0 +1,87 @@
|
||||
namespace Pluto.Api {
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using PlutoServer.PracticeChoice;
|
||||
|
||||
[RemObjects.SDK.Server.ClassFactories.StandardClassFactory()]
|
||||
[RemObjects.SDK.Server.Service(Name = "Practice", InvokerClass = typeof(Practice_Invoker), ActivatorClass = typeof(Practice_Activator))]
|
||||
public class Practice : RemObjects.SDK.Server.Service, IPractice {
|
||||
private System.ComponentModel.Container components = null;
|
||||
public Practice() :
|
||||
base() {
|
||||
this.InitializeComponent();
|
||||
}
|
||||
|
||||
private void InitializeComponent() {
|
||||
this.RequireSession = true;
|
||||
//this.
|
||||
}
|
||||
|
||||
protected override void Dispose(bool aDisposing) {
|
||||
if(aDisposing) {
|
||||
if((this.components != null)) {
|
||||
this.components.Dispose();
|
||||
}
|
||||
}
|
||||
base.Dispose(aDisposing);
|
||||
}
|
||||
|
||||
public virtual PracticeInfo1[] GetPracticeList1(string apiKey) {
|
||||
// Validate the apiKey
|
||||
//System.Threading.Thread.Sleep(1000 * 10);
|
||||
if(Utility.IsAPIKeyValid(apiKey)) {
|
||||
var practiceInfos = new List<PracticeInfo1>();
|
||||
practiceInfos.Add(new PracticeInfo1() { Id = 1, Name = "North Side" });
|
||||
practiceInfos.Add(new PracticeInfo1() { Id = 2, Name = "East Side" });
|
||||
practiceInfos.Add(new PracticeInfo1() { Id = 3, Name = "West Side" });
|
||||
practiceInfos.Add(new PracticeInfo1() { Id = 4, Name = "South Side" });
|
||||
return practiceInfos.ToArray();
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public virtual ProviderInfo1[] GetProviderList1(string apiKey, PracticeInfo1 practiceInfo) {
|
||||
if(Utility.IsAPIKeyValid(apiKey)) {
|
||||
System.Diagnostics.Debug.WriteLine(this.SessionID.ToString());
|
||||
var authToken = (string)this.Session[SessionKeys.AuthToken];
|
||||
var practice = new PlutoServer.PracticeChoice.Core.Practice();
|
||||
var providerList = practice.GetProviderList(authToken);
|
||||
return providerList.ToArray();
|
||||
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
#region IPractice Members
|
||||
|
||||
|
||||
public virtual PatientInfo1[] GetPatientList1(string apiKey, string lastName, string firstName, string dateOfBirth) {
|
||||
if(Utility.IsAPIKeyValid(apiKey)){
|
||||
var authToken = (string)this.Session[SessionKeys.AuthToken];
|
||||
var practice = new PlutoServer.PracticeChoice.Core.Practice();
|
||||
var patientList = practice.GetPatientList(authToken, lastName, firstName, dateOfBirth);
|
||||
return patientList.ToArray();
|
||||
}else{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public MessageRecipientInfo1[] GetMessageRecipientList(string apiKey) {
|
||||
if(Utility.IsAPIKeyValid(apiKey)) {
|
||||
var authToken = (string)this.Session[SessionKeys.AuthToken];
|
||||
var practice = new PlutoServer.PracticeChoice.Core.Practice();
|
||||
var recipientList = practice.GetMessageRecipients(authToken);
|
||||
return recipientList.ToArray();
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
21
TomcatServer/PlutoServer.PracticeChoice/Program.cs
Normal file
21
TomcatServer/PlutoServer.PracticeChoice/Program.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.ServiceProcess;
|
||||
using System.Text;
|
||||
|
||||
namespace PlutoServer.PracticeChoice {
|
||||
static class Program {
|
||||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
/// </summary>
|
||||
static void Main() {
|
||||
ServiceBase[] ServicesToRun;
|
||||
ServicesToRun = new ServiceBase[]
|
||||
{
|
||||
new PlutoService()
|
||||
};
|
||||
ServiceBase.Run(ServicesToRun);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("PlutoServer.PracticeChoice")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("PlutoServer.PracticeChoice")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2012")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("39f4aba4-d6b7-4b72-bd11-e65504574739")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
@@ -0,0 +1,4 @@
|
||||
RemObjects.SDK.Server.IpTcpServerChannel, RemObjects.SDK.Server, Version=6.0.57.993, Culture=neutral, PublicKeyToken=3df3cad1b7aa5098
|
||||
RemObjects.SDK.Server.IpTcpServerChannel, RemObjects.SDK.Server, Version=6.0.61.1033, Culture=neutral, PublicKeyToken=3df3cad1b7aa5098
|
||||
RemObjects.SDK.Server.OlympiaServerSessionManager, RemObjects.SDK.Server, Version=6.0.57.993, Culture=neutral, PublicKeyToken=3df3cad1b7aa5098
|
||||
RemObjects.SDK.Server.OlympiaServerSessionManager, RemObjects.SDK.Server, Version=6.0.61.1033, Culture=neutral, PublicKeyToken=3df3cad1b7aa5098
|
||||
74
TomcatServer/PlutoServer.PracticeChoice/Provider_Impl.cs
Normal file
74
TomcatServer/PlutoServer.PracticeChoice/Provider_Impl.cs
Normal file
@@ -0,0 +1,74 @@
|
||||
namespace Pluto.Api {
|
||||
using System;
|
||||
using RemObjects.SDK;
|
||||
using RemObjects.SDK.Types;
|
||||
using RemObjects.SDK.Server;
|
||||
using RemObjects.SDK.Server.ClassFactories;
|
||||
using PlutoServer.PracticeChoice;
|
||||
using System.Linq;
|
||||
|
||||
[RemObjects.SDK.Server.ClassFactories.StandardClassFactory()]
|
||||
[RemObjects.SDK.Server.Service(Name = "Provider", InvokerClass = typeof(Provider_Invoker), ActivatorClass = typeof(Provider_Activator))]
|
||||
public class Provider : RemObjects.SDK.Server.Service, IProvider {
|
||||
private System.ComponentModel.Container components = null;
|
||||
public Provider() :
|
||||
base() {
|
||||
this.InitializeComponent();
|
||||
}
|
||||
private void InitializeComponent() {
|
||||
}
|
||||
protected override void Dispose(bool aDisposing) {
|
||||
if(aDisposing) {
|
||||
if((this.components != null)) {
|
||||
this.components.Dispose();
|
||||
}
|
||||
}
|
||||
base.Dispose(aDisposing);
|
||||
}
|
||||
|
||||
#region IProvider Members
|
||||
|
||||
public MailboxFolderInfo1[] GetMailboxFoldersInfo(string apiKey, int providerId) {
|
||||
if(Utility.IsAPIKeyValid(apiKey)) {
|
||||
var authToken = (string)this.Session[SessionKeys.AuthToken];
|
||||
var provider = new PlutoServer.PracticeChoice.Core.Provider();
|
||||
var folderInfoList = provider.GetMailboxFoldersInfo(authToken, providerId);
|
||||
return folderInfoList.ToArray();
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public FolderItemInfo1[] GetMailboxItems(string apiKey, MailboxFolderTypeEnum folderType) {
|
||||
if(Utility.IsAPIKeyValid(apiKey)) {
|
||||
var authToken = (string)this.Session[SessionKeys.AuthToken];
|
||||
var provider = new PlutoServer.PracticeChoice.Core.Provider();
|
||||
var mailItemsList = provider.GetMailboxItems(authToken, folderType);
|
||||
return mailItemsList.ToArray();
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public MessageInfo1 GetMessage(string apiKey, long messageId) {
|
||||
if(Utility.IsAPIKeyValid(apiKey)) {
|
||||
var authToken = (string)this.Session[SessionKeys.AuthToken];
|
||||
var provider = new PlutoServer.PracticeChoice.Core.Provider();
|
||||
var message = provider.GetMessage(authToken, messageId);
|
||||
return message;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public void SendMessage(string apiKey, MessageInfo1 message) {
|
||||
if(Utility.IsAPIKeyValid(apiKey)) {
|
||||
var authToken = (string)this.Session[SessionKeys.AuthToken];
|
||||
var provider = new PlutoServer.PracticeChoice.Core.Provider();
|
||||
provider.SendMessage(authToken, message);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
49
TomcatServer/PlutoServer.PracticeChoice/Schedule_Impl.cs
Normal file
49
TomcatServer/PlutoServer.PracticeChoice/Schedule_Impl.cs
Normal file
@@ -0,0 +1,49 @@
|
||||
namespace Pluto.Api {
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using PlutoServer.PracticeChoice;
|
||||
|
||||
[RemObjects.SDK.Server.ClassFactories.StandardClassFactory()]
|
||||
[RemObjects.SDK.Server.Service(Name = "Schedule", InvokerClass = typeof(Schedule_Invoker), ActivatorClass = typeof(Schedule_Activator))]
|
||||
public class Schedule : RemObjects.SDK.Server.Service, ISchedule {
|
||||
private System.ComponentModel.Container components = null;
|
||||
public Schedule() :
|
||||
base() {
|
||||
this.InitializeComponent();
|
||||
}
|
||||
|
||||
private void InitializeComponent() {
|
||||
this.RequireSession = true;
|
||||
}
|
||||
|
||||
protected override void Dispose(bool aDisposing) {
|
||||
if(aDisposing) {
|
||||
if((this.components != null)) {
|
||||
this.components.Dispose();
|
||||
}
|
||||
}
|
||||
base.Dispose(aDisposing);
|
||||
}
|
||||
public virtual AppointmentInfo1[] GetAppointments1(string apiKey, ProviderInfo1 providerInfo, System.DateTime startDate, System.DateTime endDate) {
|
||||
if(Utility.IsAPIKeyValid(apiKey)) {
|
||||
var authToken = (string)this.Session[SessionKeys.AuthToken];
|
||||
var calendar = new PlutoServer.PracticeChoice.Scheduling.Calendar();
|
||||
var apptList = calendar.GetAppointments(authToken, providerInfo, calendarId:0, startDateTime:startDate, endDateTime:endDate);
|
||||
return apptList.ToArray();
|
||||
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
#region ISchedule Members
|
||||
|
||||
|
||||
public bool AddAppointment1(string apiKey, AppointmentInfo1 appointmentInfo) {
|
||||
return true;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
46
TomcatServer/PlutoServer.PracticeChoice/Terminology_Impl.cs
Normal file
46
TomcatServer/PlutoServer.PracticeChoice/Terminology_Impl.cs
Normal file
@@ -0,0 +1,46 @@
|
||||
namespace Pluto.Api {
|
||||
using System;
|
||||
using RemObjects.SDK;
|
||||
using RemObjects.SDK.Types;
|
||||
using RemObjects.SDK.Server;
|
||||
using RemObjects.SDK.Server.ClassFactories;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using PlutoServer.PracticeChoice;
|
||||
|
||||
[RemObjects.SDK.Server.ClassFactories.StandardClassFactory()]
|
||||
[RemObjects.SDK.Server.Service(Name = "Terminology", InvokerClass = typeof(Terminology_Invoker), ActivatorClass = typeof(Terminology_Activator))]
|
||||
public class Terminology : RemObjects.SDK.Server.Service, ITerminology {
|
||||
private System.ComponentModel.Container components = null;
|
||||
public Terminology() :
|
||||
base() {
|
||||
this.InitializeComponent();
|
||||
}
|
||||
private void InitializeComponent() {
|
||||
}
|
||||
protected override void Dispose(bool aDisposing) {
|
||||
if(aDisposing) {
|
||||
if((this.components != null)) {
|
||||
this.components.Dispose();
|
||||
}
|
||||
}
|
||||
base.Dispose(aDisposing);
|
||||
}
|
||||
|
||||
#region ITerminology Members
|
||||
|
||||
public TerminologyInfo1[] SearchTerminology(string apiKey, string searchString, TerminologySearchTypeEnum searchType, TerminologyDomainEnum terminologyDomain) {
|
||||
if(Utility.IsAPIKeyValid(apiKey)) {
|
||||
var authToken = (string)this.Session[SessionKeys.AuthToken];
|
||||
var terminology = new PlutoServer.PracticeChoice.Core.Terminology();
|
||||
|
||||
var termList = terminology.SearchTerminology(authToken, searchString, searchType, terminologyDomain);
|
||||
return termList.ToArray();
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
12
TomcatServer/PlutoServer.PracticeChoice/Utility.cs
Normal file
12
TomcatServer/PlutoServer.PracticeChoice/Utility.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace PlutoServer.PracticeChoice {
|
||||
public static class Utility {
|
||||
public static bool IsAPIKeyValid(string apiKey) {
|
||||
return string.Equals(apiKey, "PracticeChoice");
|
||||
}
|
||||
}
|
||||
}
|
||||
127
TomcatServer/PlutoServer.PracticeChoice/app.config
Normal file
127
TomcatServer/PlutoServer.PracticeChoice/app.config
Normal file
@@ -0,0 +1,127 @@
|
||||
<?xml version="1.0"?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<section name="loggingConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.LoggingSettings, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.505.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="true" />
|
||||
<section name="exceptionHandling" type="Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Configuration.ExceptionHandlingSettings, Microsoft.Practices.EnterpriseLibrary.ExceptionHandling, Version=5.0.505.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="true" />
|
||||
</configSections>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
|
||||
</startup>
|
||||
<connectionStrings configSource="User.Local.Config">
|
||||
</connectionStrings>
|
||||
<loggingConfiguration name="Logging Application Block" tracingEnabled="true"
|
||||
defaultCategory="Default Category" logWarningsWhenNoCategoriesMatch="false">
|
||||
<listeners>
|
||||
<add name="Event Log Destination" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.FormattedEventLogTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.505.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
|
||||
listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.FormattedEventLogTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.505.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
|
||||
source="McKesson Fusion Application" formatter="Default Formatter"
|
||||
log="" machineName="." traceOutputOptions="None" filter="All" />
|
||||
<add name="Flat File Destination" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.FlatFileTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.505.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
|
||||
listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.FlatFileTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.505.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
|
||||
fileName="trace.log" header="" footer="" formatter="" traceOutputOptions="None"
|
||||
filter="All" />
|
||||
<add databaseInstanceName="Logging"
|
||||
writeLogStoredProcName="WriteLog"
|
||||
addCategoryStoredProcName="AddCategory"
|
||||
formatter="Default Formatter"
|
||||
listenerDataType="Business.Common.ExceptionHandling.FormattedDatabaseTraceListenerData, Business.Common.ExceptionHandling, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"
|
||||
traceOutputOptions="None"
|
||||
type="Business.Common.ExceptionHandling.FormattedDatabaseTraceListener, Business.Common.ExceptionHandling, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"
|
||||
name="Database Trace Listener" />
|
||||
</listeners>
|
||||
<formatters>
|
||||
<add type="Microsoft.Practices.EnterpriseLibrary.Logging.Formatters.TextFormatter, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.505.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
|
||||
template="Timestamp: {timestamp}
Message: {message}
Category: {category}
Priority: {priority}
EventId: {eventid}
Severity: {severity}
Title:{title}
Machine: {machine}
Application Domain: {appDomain}
Process Id: {processId}
Process Name: {processName}
Win32 Thread Id: {win32ThreadId}
Thread Name: {threadName}
Extended Properties: {dictionary({key} - {value}
)}"
|
||||
name="Default Formatter" />
|
||||
<add type="Microsoft.Practices.EnterpriseLibrary.Logging.Formatters.TextFormatter, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.505.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
|
||||
template="Timestamp: {timestamp}{newline}
Message: {message}{newline}
Category: {category}{newline}
Priority: {priority}{newline}
EventId: {eventid}{newline}
Severity: {severity}{newline}
Title:{title}{newline}
Machine: {localMachine}{newline}
App Domain: {localAppDomain}{newline}
ProcessId: {localProcessId}{newline}
Process Name: {localProcessName}{newline}
Thread Name: {threadName}{newline}
Win32 ThreadId:{win32ThreadId}{newline}
Extended Properties: {dictionary({key} - {value}{newline})}"
|
||||
name="Text Formatter" />
|
||||
</formatters>
|
||||
<logFilters>
|
||||
<add type="Microsoft.Practices.EnterpriseLibrary.Logging.Filters.CategoryFilter, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.505.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
|
||||
categoryFilterMode="AllowAllExceptDenied" name="Category" />
|
||||
<add type="Microsoft.Practices.EnterpriseLibrary.Logging.Filters.PriorityFilter, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.505.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
|
||||
minimumPriority="0" maximumPriority="2147483647" name="Priority" />
|
||||
</logFilters>
|
||||
<categorySources>
|
||||
<add switchValue="All" name="Default Category">
|
||||
<listeners>
|
||||
<add name="Event Log Destination" />
|
||||
</listeners>
|
||||
</add>
|
||||
<add switchValue="All" name="Tracing">
|
||||
<listeners>
|
||||
<add name="Flat File Destination" />
|
||||
</listeners>
|
||||
</add>
|
||||
|
||||
<add switchValue="All" name="McKesson Fusion Category">
|
||||
<listeners>
|
||||
<!--<add name="Event Log Destination" /> -->
|
||||
<add name="Event Log Destination"/>
|
||||
</listeners>
|
||||
</add>
|
||||
|
||||
<add switchValue="Error" name="McKesson Fusion Server Tracing Category">
|
||||
<listeners>
|
||||
<add name="Event Log Destination" />
|
||||
</listeners>
|
||||
</add>
|
||||
<add switchValue="All" name="McKesson Fusion Client Tracing Category">
|
||||
<listeners>
|
||||
<add name="Event Log Destination" />
|
||||
</listeners>
|
||||
</add>
|
||||
|
||||
</categorySources>
|
||||
<specialSources>
|
||||
<allEvents switchValue="All" name="All Events" />
|
||||
<notProcessed switchValue="All" name="Unprocessed Category" />
|
||||
<errors switchValue="All" name="Logging Errors & Warnings" />
|
||||
</specialSources>
|
||||
</loggingConfiguration>
|
||||
|
||||
<exceptionHandling>
|
||||
<exceptionPolicies>
|
||||
<add name="BO Policy">
|
||||
<exceptionTypes>
|
||||
<add name="All Exceptions" type="System.Exception, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
|
||||
postHandlingAction="NotifyRethrow">
|
||||
<exceptionHandlers>
|
||||
<add name="Logging Exception Handler" type="Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging.LoggingExceptionHandler, Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging, Version=5.0.505.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
|
||||
logCategory="McKesson Fusion Category" eventId="100" severity="Error"
|
||||
title="FUSION BO General Exception" formatterType="Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.TextExceptionFormatter, Microsoft.Practices.EnterpriseLibrary.ExceptionHandling"
|
||||
priority="0" />
|
||||
<add name="Replace Handler" type="Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.ReplaceHandler, Microsoft.Practices.EnterpriseLibrary.ExceptionHandling, Version=5.0.505.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
|
||||
exceptionMessageResourceName="BO_Exception" exceptionMessageResourceType="Mckesson.PPS.Fusion.Business.Common.ExceptionHandling.Errors, Business.Common.ExceptionHandling, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"
|
||||
replaceExceptionType="Mckesson.PPS.Fusion.Business.Common.ExceptionHandling.BusinessException, Business.Common.ExceptionHandling, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
|
||||
</exceptionHandlers>
|
||||
</add>
|
||||
<add name="ValidationException" type="Mckesson.PPS.Fusion.Business.Common.ExceptionHandling.ValidationException, Business.Common.ExceptionHandling, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"
|
||||
postHandlingAction="NotifyRethrow" />
|
||||
</exceptionTypes>
|
||||
</add>
|
||||
<add name="CSLA Client Policy">
|
||||
<exceptionTypes>
|
||||
<add name="All Exceptions" type="System.Exception, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
|
||||
postHandlingAction="None">
|
||||
<exceptionHandlers>
|
||||
<add name="Logging Exception Handler" type="Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging.LoggingExceptionHandler, Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging, Version=5.0.505.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
|
||||
logCategory="McKesson Fusion Category" eventId="100" severity="Error"
|
||||
title="FUSION Client General Exception" formatterType="Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.TextExceptionFormatter, Microsoft.Practices.EnterpriseLibrary.ExceptionHandling"
|
||||
priority="0" />
|
||||
</exceptionHandlers>
|
||||
</add>
|
||||
</exceptionTypes>
|
||||
</add>
|
||||
</exceptionPolicies>
|
||||
</exceptionHandling>
|
||||
<system.web>
|
||||
<roleManager defaultProvider="FusionRoleProvider" enabled="true">
|
||||
<providers>
|
||||
<clear />
|
||||
<add name="FusionRoleProvider" type="McKesson.PPS.Fusion.Business.Common.Security.FusionRoleProvider, Business.Common.Security" />
|
||||
</providers>
|
||||
</roleManager>
|
||||
</system.web>
|
||||
</configuration>
|
||||
Reference in New Issue
Block a user