Esempio n. 1
0
 public patient_result_collections AddCollection(patient patient, result_files file)
 {
     // Add the patient result collection for this entry
     var collection = new patient_result_collections()
     {
         patient_id = patient.id,
         received_on = DateTime.Now,
         result_file_id = file.id
     };
     entities.patient_result_collections.Add(collection);
     entities.SaveChanges();
     return collection;
 }
Esempio n. 2
0
        public void AddPatientVariantsToCollection(patient_result_collections collection, List<patient_variants> patientVariants)
        {
            foreach (var variant in patientVariants)
            {
                var member = new patient_result_members()
                {
                    collection_id = collection.id,
                    member_id = variant.id,
                    member_type = Enums.ResultMemberType.Variant,
                };
                entities.patient_result_members.Add(member);
            }

            entities.SaveChanges();
        }