Exemplo n.º 1
0
 public static EncounterNote AddNewNote(this PatientNoteAdd patientNotAdd)
 {
     return(new EncounterNote
     {
         Comment = patientNotAdd.Comment,
         DateOfDocumentation = patientNotAdd.DateOfDocumentation,
         EncounterId = patientNotAdd.EncounterId,
         Feeling = patientNotAdd.FeelingMode.Select(s => new Feeling
         {
             FeelingType = EnumConverter.ConverterFeelingType(s.FeelingType),
             Value = EnumConverter.ConverterValue(s.Value).ToString()
         }
                                                    ).ToList()
     });
 }
Exemplo n.º 2
0
        public PatientNoteDt AddNotes(PatientNoteAdd patientNoteAdd)
        {
            var encounter = UnitOfWork.PatientNoteRepository.GetEncounter(patientNoteAdd.EncounterId);

            if (encounter == null)
            {
                throw new Exception($"No encounter found for {patientNoteAdd.EncounterId}");
            }

            UnitOfWork.EncounterNoteRepository
            .Create(patientNoteAdd
                    .AddNewNote());

            return(GetAllNotes(encounter.Id).Last());
        }
 public IActionResult AddNote([FromBody] PatientNoteAdd patientNoteAdd)
 {
     return(Ok(patientNoteService.AddNotes(patientNoteAdd)));
 }
Exemplo n.º 4
0
 public static Feeling PatientNotes(this Feeling feeling, PatientNoteAdd patientNoteAdd)
 {
     return(new Feeling
     {
     });
 }