public void UpdateNoteCategory(PatientNoteCategoryDetail detail, PatientNoteCategory category)
 {
     category.Name = detail.Category;
     category.Description = detail.Description;
     category.Severity = EnumUtils.GetEnumValue<NoteSeverity>(detail.Severity);
     category.Deactivated = detail.Deactivated;
 }
 public PatientNoteCategorySummary CreateNoteCategorySummary(PatientNoteCategory category, IPersistenceContext context)
 {
     return new PatientNoteCategorySummary(
         category.GetRef(),
         category.Name,
         category.Description,
         EnumUtils.GetEnumValueInfo(category.Severity, context),
         category.Deactivated);
 }
Пример #3
0
        /// <summary>
        /// Constructor for creating a new patient note.
        /// </summary>
        /// <param name="author"></param>
        /// <param name="category"></param>
        /// <param name="comment"></param>
        public PatientNote(Staff author, PatientNoteCategory category, string comment)
        {
            _author = author;
            _category = category;
            _comment = comment;

            // valid from now indefinitely
            _creationTime = Platform.Time;
            _validRange = new DateTimeRange(_creationTime, null);
        }
Пример #4
0
        /// <summary>
        /// Constructor for creating a new patient note.
        /// </summary>
        /// <param name="author"></param>
        /// <param name="category"></param>
        /// <param name="comment"></param>
        public PatientNote(Staff author, PatientNoteCategory category, string comment)
        {
            _author   = author;
            _category = category;
            _comment  = comment;

            // valid from now indefinitely
            _creationTime = Platform.Time;
            _validRange   = new DateTimeRange(_creationTime, null);
        }
Пример #5
0
        public AddNoteCategoryResponse AddNoteCategory(AddNoteCategoryRequest request)
        {
            PatientNoteCategory noteCategory = new PatientNoteCategory();

            PatientNoteCategoryAssembler assembler = new PatientNoteCategoryAssembler();
            assembler.UpdateNoteCategory(request.NoteCategoryDetail, noteCategory);

            PersistenceContext.Lock(noteCategory, DirtyState.New);

            // ensure the new NoteCategory is assigned an OID before using it in the return value
            PersistenceContext.SynchState();

            return new AddNoteCategoryResponse(assembler.CreateNoteCategorySummary(noteCategory, this.PersistenceContext));
        }