Exemplo n.º 1
0
        public async Task AddOperationAsync(CreateOperationVm operationDto)
        {
            var entity = new EavEntity {
                Id              = Guid.NewGuid(),
                EntityType      = EntityType.Operation,
                AttributeValues = new List <AttributeValueEntity> {
                    new AttributeValueEntity
                    {
                        AttributeType = AttributeType.PatientId, Value = operationDto.PatientId.ToString()
                    },
                    new AttributeValueEntity
                    {
                        AttributeType = AttributeType.OperationName, Value = operationDto.OperationName
                    }
                }
            };

            _dbContext.Entities.Add(entity);
            await _dbContext.SaveChangesAsync();
        }
Exemplo n.º 2
0
        public async Task <IActionResult> CreateNewPatient(CreateOperationVm createOperationVm)
        {
            await _clinicService.AddOperationAsync(createOperationVm);

            return(Ok());
        }