Beispiel #1
0
        /// <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);
        }
Beispiel #2
0
        /// <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;
 }
Beispiel #5
0
 /// <summary>
 /// Destroys the lab specimen.
 /// </summary>
 /// <param name="labSpecimen">The lab specimen.</param>
 public void DestroyLabSpecimen(LabSpecimen labSpecimen)
 {
     _labSpecimenRepository.MakeTransient(labSpecimen);
 }
Beispiel #6
0
        /// <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;
        }
Beispiel #7
0
 /// <summary>
 /// Destroys the lab specimen.
 /// </summary>
 /// <param name="labSpecimen">The lab specimen.</param>
 public void DestroyLabSpecimen(LabSpecimen labSpecimen)
 {
     _labSpecimenRepository.MakeTransient(labSpecimen);
 }
Beispiel #8
0
        /// <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;
        }