/// <summary> /// Creates the lab specimen. /// </summary> /// <param name="clinicalCase">The clinical case.</param> /// <param name="provenance">The provenance.</param> /// <param name="activityDateTimeRange">The activity date time range.</param> /// <returns>A LabSpecimen.</returns> public LabSpecimen CreateLabSpecimen(ClinicalCase clinicalCase, Provenance provenance, DateTimeRange activityDateTimeRange) { var type = _lookupValueRepository.GetLookupByWellKnownName <VisitModule.ActivityType>(ActivityType.LabSpecimen); var labSpecimen = new LabSpecimen(clinicalCase, type, provenance, activityDateTimeRange); _labSpecimenRepository.MakePersistent(labSpecimen); return(labSpecimen); }
/// <summary> /// Creates the lab specimen. /// </summary> /// <param name="visit">The visit.</param> /// <returns>A LabSpecimen.</returns> public LabSpecimen CreateLabSpecimen(Visit visit) { var type = _lookupValueRepository.GetLookupByWellKnownName <VisitModule.ActivityType>(ActivityType.LabSpecimen); var labSpecimen = new LabSpecimen(visit, type); _labSpecimenRepository.MakePersistent(labSpecimen); return(labSpecimen); }
private LabTest BuildLabTest( LabSpecimen labSpecimen, LabTestName labTestNameCodedConcept ) { var labTest = labSpecimen.AddLabTest(new LabTestInfoBuilder().WithLabTestName(labTestNameCodedConcept)); Session.SaveOrUpdate ( labTest ); return labTest; }
private LabSpecimen BuildLabSpecimen(Visit visit, ActivityType activityType) { var labSpecimen = new LabSpecimen(visit, activityType); Session.SaveOrUpdate(labSpecimen); return labSpecimen; }
/// <summary> /// Destroys the lab specimen. /// </summary> /// <param name="labSpecimen">The lab specimen.</param> public void DestroyLabSpecimen(LabSpecimen labSpecimen) { _labSpecimenRepository.MakeTransient(labSpecimen); }
/// <summary> /// Creates the lab specimen. /// </summary> /// <param name="visit">The visit.</param> /// <returns>A LabSpecimen.</returns> public LabSpecimen CreateLabSpecimen(Visit visit) { var type = _lookupValueRepository.GetLookupByWellKnownName<VisitModule.ActivityType>(ActivityType.LabSpecimen); var labSpecimen = new LabSpecimen(visit, type); _labSpecimenRepository.MakePersistent(labSpecimen); return labSpecimen; }
/// <summary> /// Creates the lab specimen. /// </summary> /// <param name="clinicalCase">The clinical case.</param> /// <param name="provenance">The provenance.</param> /// <param name="activityDateTimeRange">The activity date time range.</param> /// <returns>A LabSpecimen.</returns> public LabSpecimen CreateLabSpecimen(ClinicalCase clinicalCase, Provenance provenance, DateTimeRange activityDateTimeRange) { var type = _lookupValueRepository.GetLookupByWellKnownName<VisitModule.ActivityType>(ActivityType.LabSpecimen); var labSpecimen = new LabSpecimen(clinicalCase, type, provenance, activityDateTimeRange); _labSpecimenRepository.MakePersistent(labSpecimen); return labSpecimen; }