static void Main(string[] args)
        {
            DoctorMonitoringServiceClient client = new DoctorMonitoringServiceClient(new InstanceContext(new DoctorMonitoringClient()));

            Console.WriteLine("Service Client Running");
            client.SubscribeToVitals("111", "100");
            Console.Read();
        }
Exemple #2
0
        static void Main(string[] args)
        {
            DeviceRegistration();
            PatientRegistration();
            DoctorRegistration();
            HospitalBedRegistration();
            NewPatientAdmission();

            var doc1Client = new DoctorMonitoringServiceClient(new InstanceContext(new DoctorMonitoringCallback()));

            doc1Client.SubscribeToVitals("111", "100");
            doc1Client.SubscribeToPatientAlerts("100");

            var doc2Client = new DoctorMonitoringServiceClient(new InstanceContext(new DoctorMonitoringCallback()));

            doc2Client.SubscribeToVitals("222", "200");
            doc2Client.SubscribeToPatientAlerts("200");

            var nurse1Client = new NurseMonitoringServiceClient(new InstanceContext(new NurseMonitoringCallback()));

            nurse1Client.SubscribeToVitals("111", "PIC-2F-2A");
            nurse1Client.SubscribeToPatientAlerts("PIC-2F-2A");

            var nurse2Client = new NurseMonitoringServiceClient(new InstanceContext(new NurseMonitoringCallback()));

            nurse2Client.SubscribeToVitals("222", "PIC-2F");
            nurse2Client.SubscribeToPatientAlerts("PIC-2F");

            VitalsDataServiceClient client = new VitalsDataServiceClient();

            VitalsDataService.PatientVitals vitals = new VitalsDataService.PatientVitals();
            for (int i = 0; i < 20; i++)
            {
                vitals.PatientId = "111";
                vitals.Vitals    = new VitalsDataService.Vitals[] { new VitalsDataService.Vitals {
                                                                        DeviceId = "Temperature", Value = 85
                                                                    } };
                client.WriteVitals(vitals);
                Thread.Sleep(2000);
                vitals.PatientId = "222";
                vitals.Vitals    = new VitalsDataService.Vitals[] { new VitalsDataService.Vitals {
                                                                        DeviceId = "Temperature", Value = 20
                                                                    }, new VitalsDataService.Vitals {
                                                                        DeviceId = "SPO2", Value = 78
                                                                    } };
                Thread.Sleep(2000);
                client.WriteVitals(vitals);
            }
        }