Beispiel #1
0
        public PatientNoteEditorComponent(PatientNoteDetail noteDetail, List <PatientNoteCategorySummary> noteCategoryChoices, bool readOnlyMode)
        {
            _readOnlyMode        = readOnlyMode;
            _note                = noteDetail;
            _noteCategoryChoices = noteCategoryChoices;

            _comment    = _note.Comment;
            _expiryDate = _note.ValidRangeUntil == null ? null : (DateTime?)_note.ValidRangeUntil.Value.Date;
            _category   = _note.Category;

            this.Validation.Add(new ValidationRule("ExpiryDate",
                                                   delegate
            {
                var valid = ExpiryDate == null || ExpiryDate > Platform.Time.Date;
                return(new ValidationResult(valid, SR.MessageInvalidExpiryDate));
            }));
        }
Beispiel #2
0
 private void SaveChanges()
 {
     Platform.GetService <INoteCategoryAdminService>(
         delegate(INoteCategoryAdminService service)
     {
         if (_isNew)
         {
             AddNoteCategoryResponse response = service.AddNoteCategory(new AddNoteCategoryRequest(_noteCategoryDetail));
             _noteCategoryRef     = response.NoteCategory.NoteCategoryRef;
             _noteCategorySummary = response.NoteCategory;
         }
         else
         {
             UpdateNoteCategoryResponse response = service.UpdateNoteCategory(new UpdateNoteCategoryRequest(_noteCategoryDetail));
             _noteCategoryRef     = response.NoteCategory.NoteCategoryRef;
             _noteCategorySummary = response.NoteCategory;
         }
     });
 }
        public PatientNoteDetail(
			EntityRef patientNoteRef,
			string comment, 
            PatientNoteCategorySummary category, 
            StaffSummary createdBy, 
            DateTime? creationTime,
            DateTime? validRangeFrom,
            DateTime? validRangeUntil,
            bool isExpired)
        {
        	this.PatientNoteRef = patientNoteRef;
            this.Comment = comment;
            this.Category = category;
            this.Author = createdBy;
            this.CreationTime = creationTime;
            this.ValidRangeFrom = validRangeFrom;
            this.ValidRangeUntil = validRangeUntil;
            this.IsExpired = isExpired;
        }
 public UpdateNoteCategoryResponse(PatientNoteCategorySummary summary)
 {
     this.NoteCategory = summary;
 }
Beispiel #5
0
 public AddNoteCategoryResponse(PatientNoteCategorySummary NoteCategory)
 {
     this.NoteCategory = NoteCategory;
 }
 public UpdateNoteCategoryResponse(PatientNoteCategorySummary summary)
 {
     this.NoteCategory = summary;
 }
 public AddNoteCategoryResponse(PatientNoteCategorySummary NoteCategory)
 {
     this.NoteCategory = NoteCategory;
 }