public static async Task <int> CallPatientInfoService() { var service = new PatientDataIntegrationServiceClient(); var header = new MessageHeader() { MessageID = "101", TransactionID = "101", SenderID = "101", SenderApplication = "Debug", ReceiverID = "101", ReceiverApplication = "Effica", CharacterSet = "UTF-16" }; var common = new LisCommon() { ContractKey = ContractKey, UserId = UserId, CallingSystem = CallingSystem, CallingUserId = UserId }; var patient = new PatientId() { Identifier = "010101-0101" }; PatientDataServiceReference.Patient[] patients = new Patient[1]; service.GetPatientData(ref header, common, patient, out patients); return(0); }
public static async Task <int> CallDiagnosisService() { var service = new DiagnosisServiceClient(); var header = new MessageHeader() { MessageID = "101", TransactionID = "101", SenderID = "101", SenderApplication = "Debug", ReceiverID = "101", ReceiverApplication = "Effica", CharacterSet = "UTF-16" }; var common = new LisCommon() { ContractKey = ContractKey, UserId = UserId, CallingSystem = CallingSystem, CallingUserId = UserId }; // Initialize Request var req = new DiagnosisReq() { Organisation = new Code() { CodeSetName = "Effica/Lifecare", CodeValue = "317" }, Area = new Code() { CodeSetName = "Effica/Lifecare", CodeValue = "kotih" }, EffectiveTime = new EffectiveTime() { StartDateTime = DateTime.Now.AddDays(-365.0), EndDateTime = DateTime.Now }, PatientId = new PatientId() { Identifier = "121221-A020" } }; // Structure for return data var patientId = new PatientId(); var diagnoses = new Diagnose[100]; try { service.GetPatientDiagnoses(ref header, common, req, out patientId, out diagnoses); } catch (Exception e) { Debug.Write(e.Message); } return(0); }
public static async Task <int> CallMedicationService() { var service = new MedicationServiceClient(); var header = new MessageHeader() { MessageID = "101", TransactionID = "101", SenderID = "101", SenderApplication = "Debug", ReceiverID = "101", ReceiverApplication = "Effica", CharacterSet = "UTF-16" }; var common = new LisCommon() { ContractKey = ContractKey, UserId = UserId, CallingSystem = CallingSystem, CallingUserId = UserId }; var medicationReq = new MedicationReq() { Area = new Code() { CodeSetName = "Effica/Lifecare", CodeValue = "pth" }, Organisation = new Code { CodeSetName = "Effica/Lifecare", CodeValue = "317" }, PatientId = new PatientId() { Identifier = "010101-0101" } }; // Structures for return data var patientMedication = new PatientMedication[1]; try { service.GetOpenCareMedicationData(ref header, common, medicationReq, out patientMedication); } catch (Exception e) { Debug.Write(e.Message); } return(0); }
public static async Task <int> CallRiskService() { var service = new RiskDataIntegrationServiceClient(); var header = new MessageHeader() { MessageID = "101", TransactionID = "101", SenderID = "101", SenderApplication = "Debug", ReceiverID = "101", ReceiverApplication = "Effica", CharacterSet = "UTF-16" }; var common = new LisCommon() { ContractKey = ContractKey, UserId = UserId, CallingSystem = CallingSystem, CallingUserId = UserId }; // Initialize Request var req = new Patient() { PatientId = new PatientId() { Identifier = "010101-0101" } }; // Structure for return data var rsp = new RiskData(); try { service.GetRiskData(ref header, common, req, out rsp); } catch (Exception e) { Debug.Write(e.Message); } return(0); }
public static async Task <int> CallWardService() { var service = new WardStatusServiceClient(); var header = new MessageHeader() { MessageID = "101", TransactionID = "101", SenderID = "101", SenderApplication = "Debug", ReceiverID = "101", ReceiverApplication = "Effica", CharacterSet = "UTF-16" }; var common = new LisCommon() { ContractKey = ContractKey, UserId = UserId, CallingSystem = CallingSystem, CallingUserId = UserId }; // Initialize Request var req = new WardReq() { Collection = "M", // M - Changes after given Timestamp, K - Everything Timestamp = DateTime.Now.AddDays(-30.0), Hospital = "317", // Hospital ID Ward = "1111T" // Ward ID }; // Structure for return data var rsp = new WardStatus(); try { service.GetPaikkatilanne(ref header, common, req, out rsp); } catch (Exception e) { Debug.Write(e.Message); } return(0); }
public static async Task <int> CallCodeService() { var service = new CodeServiceClient(); var header = new MessageHeader() { MessageID = "101", TransactionID = "101", SenderID = "101", SenderApplication = "Debug", ReceiverID = "101", ReceiverApplication = "Effica", CharacterSet = "UTF-16" }; var common = new LisCommon() { ContractKey = ContractKey, UserId = UserId, CallingSystem = CallingSystem, CallingUserId = UserId }; // Initialize Request var req = new CodeReq() { CodeSetId = CodeSet.KHPalv }; // Structure for return data var rsp = new IntegrationCodeService(); service.GetCodeService(ref header, common, req, out rsp); return(0); }
public static async Task <int> CallStatisticsService() { var service = new StatisticsClient(); var header = new MessageHeader() { MessageID = "101", TransactionID = "101", SenderID = "101", SenderApplication = "Debug", ReceiverID = "101", ReceiverApplication = "Effica", CharacterSet = "UTF-16" }; var common = new LisCommon() { ContractKey = ContractKey, UserId = UserId, CallingSystem = CallingSystem, CallingUserId = UserId }; // Initialize Request var req = new CommonRequestData() { Area = new Code() { CodeSetName = "Effica/Lifecare", CodeValue = "Kkesk" }, // Department ID ContactAuthor = new ContactAuthor() { ContactAuthorCodeId = CaCodeId.EfficaUserId, ContactAuthorCode = UserId } // FunctionType = new Code() { CodeSetName = "Effica/Lifecare", CodeValue = "08" } // Optional }; var commonStats = new CommonStatisticsData() { /* * EventType = new EventType() * { * Event="ADD", // ADD/MOD/DEL * PatientId = new PatientId() { Identifier = "010101-0101" }, * StartDateTime = DateTime.Now, * UserId = UserId * } */ }; var StatsData = new StatisticsData() { PatientId = new PatientId() { Identifier = "010101-0101" }, UserId = UserId, Area = new Code() { CodeSetName = "Effica/Lifecare", CodeValue = "Kkesk" }, RequestArea = new Code() { CodeSetName = "Effica/Lifecare", CodeValue = "Kkesk" }, Function = new Code() { CodeSetName = "Effica/Lifecare", CodeValue = "kotih" }, ContactType = new Code() { CodeSetName = "Effica/Lifecare", CodeValue = "1" }, // 1 = doctor appointment, 2 = home visit VisitType = new Code() { CodeSetName = "Effica/Lifecare", CodeValue = "2" }, // Visit type data as numeral value, E.g 1 = first time visit 2= revisit ContentNotes = new ContentNote[] { new ContentNote() { Content = "INFL1", Amount = 1 } }, // Content note for Influenza flue shot ProcedureClasses = new Code[] { new Code() { CodeSetName = "", CodeValue = "SPAT1009" } }, // SPAT codes, see coding in "koodistopalvelu", http://koodistopalvelu.kanta.fi/codeserver/pages/classification-view-page.xhtml?classificationKey=310&versionKey=387 StartDateTime = DateTime.Now.AddDays(-1.0), EndDateTime = DateTime.Now, VisitUrgency = new Code() { CodeSetName = "Effica/Lifecare", CodeValue = "E" }, // E - No, K - Yes IsFirstVisit = new Code() { CodeSetName = "Effica/Lifecare", CodeValue = "E" }, // E - No, K - Yes FollowUpCares = new Code[] { new Code() { CodeSetName = "", CodeValue = "SPAT1334" } }, // SPAT codes (SPAT1334 no follow-up actions) VisitReasons = new Code[] { new Code() { CodeSetName = "Effica/Lifecare", CodeValue = "A25" } } // ICPC2 code }; var GenericStats = new GenericStatData() { }; // Not in use // Structure for return data var rsp = new StatisticsOperation(); try { service.AddStatistics(ref header, common, req, commonStats, StatsData, GenericStats, out rsp); } catch (Exception e) { Debug.Write(e.Message); } return(0); }
public static async Task <int> CallAnamnesisService() { var service = new EsitiedotClient(); var header = new MessageHeader() { MessageID = "101", TransactionID = "101", SenderID = "101", SenderApplication = "Debug", ReceiverID = "101", ReceiverApplication = "Effica", CharacterSet = "UTF-16" }; var common = new LisCommon() { ContractKey = ContractKey, UserId = UserId, CallingSystem = CallingSystem, CallingUserId = UserId }; // Initialize Request var contact = new Contact() { // 010100-A011 -- RID 1, ServiceEvent 1.2.246.10.19623654.10.1.14010.2013.947 // 010101-0101 -- ServiceEvent 1.2.246.10.19623654.10.3.14669.2015.87 PatientId = new PatientId() { Identifier = "010101-0101" }, Originator = "Hackathon", Created = DateTime.Now.AddDays(-1.0), Finished = DateTime.Now, FormsetCode = "E121", FormsetCodesystem = "1.123.234.567", FormsetName = "Testaajan testikysely", Organisation = "Kalvolan TK", OrganisationOid = "1.2.246.10.19623654.19.1", OrgUnit = "Kehvon Anamneesitutkimuskeskus", OrgUnitOid = "121.121.121.234.0", Severity = 1, Status = Status.FORMSET_RECEIVED // Status - enumeration: [FORMSET_SENT,FORMSET_RECEIVED,DATA_AS_IMAGE] }; var contactMeta = new ContactMetadata[] { new ContactMetadata() { Key = "AR12312", Value = "MetaValue1" } }; var forms = new Form[] { new Form() { FormCode = "A3399T", FormCodeSystem = "123.123.123.444", FormName = "Testform", Order = 1, Severity = 1, Questions = new Question[] { new Question() { QuestionCode = "1", QuestionCodeSystem = "123.456.789.10", QuestionText = "Kysymys yksi", Order = 1, Language = "fi", Answer = new Answer() { AnswerCode = 1, AnswerCodeSystem = "123.456.123.10", AnswerText = "Vastaus kysymykseen yksi" } }, new Question() { QuestionCode = "2", QuestionCodeSystem = "123.456.789.10", QuestionText = "Kysymys kaksi", Order = 1, Language = "fi", Severity = 1, ParentQuestion = "1", Answer = new Answer() { AnswerCode = 2, AnswerCodeSystem = "123.123.123", AnswerText = "Vastaus kysymykseen kaksi joka liittyy parentquestion-arvon kautta kysymykseen yksi" } }, new Question() { QuestionCode = "3", QuestionCodeSystem = "123.456.789.10", QuestionText = "Kysymys kolme, jolle ei ole annettu vastausta. Answer osuus puuttuu.", Order = 3, Language = "fi", Severity = 2 } } } }; // Structure for return data var patient = new PatientId(); try { service.AddEsitieto(ref header, common, contact, contactMeta, forms, out patient); } catch (Exception e) { Debug.Write(e.Message); } return(0); }