/// <summary> /// Revises the clinical case profile. /// </summary> /// <param name="clinicalCaseProfile">The clinical case profile.</param> public virtual void ReviseClinicalCaseProfile(ClinicalCaseProfile clinicalCaseProfile) { Check.IsNotNull(clinicalCaseProfile, "Clinical Case Profile is required."); DomainRuleEngine.CreateRuleEngine <ClinicalCase, ClinicalCaseProfile>(this, () => ReviseClinicalCaseProfile) .WithContext(clinicalCaseProfile) .WithContext(ClinicalCaseCloseInfo) .Execute(() => ClinicalCaseProfile = clinicalCaseProfile); }
/// <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); }
/// <summary> /// Initializes a new instance of the <see cref="ClinicalCase"/> class. /// </summary> /// <param name="patient">The patient.</param> /// <param name="clinicalCaseProfile">The clinical case profile.</param> /// <param name="caseNumber">The case number.</param> protected internal ClinicalCase( Patient patient, ClinicalCaseProfile clinicalCaseProfile, long caseNumber) { Check.IsNotNull(patient, "Patient is required."); _patient = patient; _clinicalCaseProfile = clinicalCaseProfile; _clinicalCaseNumber = caseNumber; _signedComments = new List <ClinicalCaseSignedComment> (); _priorityPopulations = new List <ClinicalCasePriorityPopulation> (); _specialInitiatives = new List <ClinicalCaseSpecialInitiative> (); _visits = new List <Visit> (); _problems = new List <Problem> (); _importedActivities = new List <Activity>(); }