using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Pluto.Api;
using Sdaleo.Systems.SQLServer;
using Sdaleo;
using PlutoServer.MSL.Connectors;
using Sdaleo.Systems.Advantage;
using RegistrationAPI;
using Pluto.Registration;
namespace PlutoServer.MSL
{
///
/// Only used for Debugging / Testing
///
internal static class DEBUGGING_ONLY
{
#region Debug Step Credentials (For Testing)
const string LYTEC_KEY = "$616866C0D12EC1641A5#L";
const string MEDISOFT_KEY = "$616866C0D12EC1641A5#M";
///
/// Advantage User Test Credential
///
internal static AdvantageCredential AdvantageTestCredential = new AdvantageCredential(@"\\10.97.156.4\Medidata\Tutor\mwddf.add", "user", "password", AdvantageCredential.ServerType.REMOTE);
///
/// Advantage Shared Test Credential
///
internal static AdvantageCredential AdvantageTestSharedCredential = new AdvantageCredential(@"\\10.97.156.4\Medidata\SharedData.add", "SharedDataUser", "AndPassword", AdvantageCredential.ServerType.REMOTE);
///
/// SQLServer User Test Credential
///
internal static SQLServerCredential SQLServerTestCredential = new SQLServerCredential("10.97.156.22", "LytecMD", "Lytec Tutorial", "sa", "Clinical$1");
///
/// SQLServer Shared Test Credential
///
internal static SQLServerCredential SQLServerTestSharedCredential = new SQLServerCredential("10.97.156.22", "LytecMD", "Lytec SharedData", "sa", "Clinical$1");
#endregion
///
/// Called in Debug Mode to allow us to step into specific things and
/// easier test them straight thru the service, called before OnStart(),
/// makes it easier to directly test Medisoft/Lytec Connectors
///
internal static void DEBUGSTEP_INTO()
{
MSLSpecific.Setup_Test_Logger();
DBCache.IsMachine_Used_ForTesting = true;
DBCache.TestMedisoftDBCredential = AdvantageTestCredential;
DBCache.TestLytecUserDBCredential = SQLServerTestCredential;
//Could you please run the script for IP address thing for orgs with key 2A66B402F-4041-E491M and E2G4Y3777-4F3E-BFEDL
//SystemAccessVerifier v = new SystemAccessVerifier("CC67BA96B-4E85-57BBM");
//SystemAccessVerifier v = new SystemAccessVerifier("930CY6704-42FE-1D1FL");
//SystemAccessVerifier v = new SystemAccessVerifier("2A66B402F-4041-E491M"); // "$194E114069F204446A2#M"
SystemAccessVerifier v = new SystemAccessVerifier("E2G4Y3777-4F3E-BFEDL"); // "$DE3BDE3F4E777F34E2E#L"
//string pin = RegistrationAPI.API.RetrieveUserApiKeyPin("CC67BA96B-4E85-57BBM");
string apikey = v.SystemApiKey;
Pluto.Registration.Host host = RegistrationAPI.API.GetApiMobile(v.SystemApiKey);
string ip = host.host;
int port = host.port;
bool bTest = RegistrationAPI.API.IsApiMobileReachable(v.SystemApiKey);
//RegistrationAPI.API.SetNetworkSettings("172.19.73.26", 443);
RegistrationAPI.API.SetNetworkSettings("ppsmobile.mckesson.com", 443);
//RegistrationAPI.API.SetNetworkSettings("services.ndchealthvar.com", 443);
string strApiKey;
string strPin;
bool bSuccess = RegistrationAPI.API.RegisterNewServerPractice(new Guid("7c18db98-3c34-4382-963c-1175f0d20f44"), "Happy Valley Medical Clinic (Mck)", "10.24.52.25", "", 1945, "Medisoft", out strApiKey, out strPin);
//SuperBillLoadingSavingDebugStep();
}
private static void SuperBillLoadingSavingDebugStep()
{
//string path = Path.GetTempPath();
//string str = "DefaultOffice Visit (New)00010
0Diagnosis199201Problem focused0Diagnosis299202Expanded problem focused0Diagnosis399203Detailed0Diagnosis499204Comprehensive0Diagnosis599205Comprehensive (new patient)0Diagnosis6-25Significant, separate service0Office Visit (Est)00021
0Diagnosis199211Minimal0Diagnosis299212Expanded problem focused0Diagnosis399213Detailed0Diagnosis499214Comprehensive0Diagnosis599215Comprehensive (new patient)0Diagnosis6-25Significant, separate service0Discharge Instructions00032
0Diagnosis1Comeback in 2 weeks0Diagnosis1Comeback in 4 weeks0Diagnosis1Comeback in 6 weeks0Diagnosis1Comeback in 8 weeks0Diagnosis1Comeback in 6 months0Skin procedures00043
0Other services00054
0";
//string strPath = ProductType.GetProductSpecificSuperBillDirectoryPath("");
//XmlDocument xmlDocument = new XmlDocument();
//XmlNode Data = xmlDocument.CreateNode(XmlNodeType.Element, "SuperBillTemplate", "SuperBillTemplate");
//Data.InnerXml = str;
//XmlNode oNode = xmlDocument.ImportNode(Data, true);
//xmlDocument.AppendChild(oNode);
//xmlDocument.Save(strPath + "\\" + "Default" + ".msb");
//xmlDocument.Load(strPath + "\\" + "Default" + ".msb");
//XmlNode oNode2 = (XmlNode) xmlDocument;
}
}
}