예제 #1
0
        /// <summary>
        /// Creates the problem.
        /// </summary>
        /// <param name="clinicalCase">The clinical case.</param>
        /// <param name="problemCodeCodedConcept">The problem code coded concept.</param>
        /// <returns>A Problem.</returns>
        public Problem CreateProblem(
            ClinicalCase clinicalCase,
            CodedConcept problemCodeCodedConcept)
        {
            var problem = new Problem(clinicalCase, problemCodeCodedConcept);

            _problemRepository.MakePersistent(problem);

            return(problem);
        }
예제 #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Problem"/> class.
        /// </summary>
        /// <param name="clinicalCase">The clinical case.</param>
        /// <param name="problemCodeCodedConcept">The problem code coded concept.</param>
        protected internal Problem(
            ClinicalCase clinicalCase,
            CodedConcept problemCodeCodedConcept)
        {
            Check.IsNotNull(clinicalCase, "Clinical case is required.");
            Check.IsNotNull(problemCodeCodedConcept, "Problem code coded concept is required.");

            _clinicalCase            = clinicalCase;
            _problemCodeCodedConcept = problemCodeCodedConcept;
        }
예제 #3
0
        /// <summary>
        /// Creates the clinical case.
        /// </summary>
        /// <param name="patient">The patient.</param>
        /// <param name="clinicalCaseProfile">The clinical case profile.</param>
        /// <returns>A ClinicalCase.</returns>
        public ClinicalCase CreateClinicalCase(
            Patient patient,
            ClinicalCaseProfile clinicalCaseProfile)
        {
            Check.IsNotNull(patient, "Patient is required.");
            Check.IsNotNull(clinicalCaseProfile, "Clinical case profile is required.");

            long mostRecentCaseNumber = _clinicalCaseRepository.GetMostRecentCaseNumber(patient.Key);

            var clinicalCase = new ClinicalCase(patient, clinicalCaseProfile, mostRecentCaseNumber);

            _clinicalCaseRepository.MakePersistent(clinicalCase);

            return(clinicalCase);
        }
예제 #4
0
 /// <summary>
 /// Destroys the clinical case.
 /// </summary>
 /// <param name="clinicalCase">The clinical case.</param>
 public void DestroyClinicalCase(ClinicalCase clinicalCase)
 {
     _clinicalCaseRepository.MakeTransient(clinicalCase);
 }