public void Handle(PatientCreated args) { //TODO: Remove hard codede ModuleID,VisitType,LocationID values _sqlActions = new List <SqlAction>(); _patient = args.Patient; _location = args.Location; _module = args.Module; _visittype = args.VisitType; _notification = $"Creating Patient[{args.Patient}] Encounters[{args.Patient.Encounters?.Count ?? 0}]"; Log.Debug(_notification); GenerateSqlActions(); }
public async Task Handle(PatientCreated message) { var obj = this.ParseMessage(message); var usual = obj.Name.First(n => n.Use == HumanName.NameUse.Usual); var notification = new Notification { Ods = message.Destination, System = message.System, NhsNumber = obj.Identifier[0]?.Value, DateCreated = DateTime.UtcNow, Type = obj.TypeName, Summary = $"Patient Created: {obj.Identifier[0]?.Value}", Details = $"{usual?.Family}, {string.Join(" ", usual?.Given)} ({string.Join(" ", usual?.Prefix)})", Json = this.ToString() }; await this.Notifications.AddOrUpdate(notification); await this.Hub.Clients.Group(message.Destination?.ToLowerInvariant()).SendAsync("notification", notification); }
public async Task Handle(PatientCreated message) { }
public void CreatePatient(PatientCreated args) { CreateEmrPatientHandler.Handle(args); EmrRepository.CreatePatient(CreateEmrPatientHandler.GetSqlActions(), args.Patient.UuId); }
protected virtual void PatientService_PatientCreatedEvent(object sender, PatientCreated e) { CreatePatient(e); }
protected virtual void OnPatientCreatedEvent(PatientCreated e) { PatientCreatedEvent?.Invoke(this, e); }